blit and BufferedPaintDC
Declan McMullen
declan.mcmullen at gmail.com
Mon Apr 21 09:17:29 PDT 2008
I think ive narrowed it to the graphics context
wxBufferedPaintDC pdc(this);
wxGCDC dc(pdc);
doesnt work
wxBufferedPaintDC dc(this);
works fine
On Mon, Apr 21, 2008 at 5:02 PM, Declan McMullen <declan.mcmullen at gmail.com>
wrote:
> Ive tried turning off double buffering and I still get an entitrely black
> bitmap.
> If i set the bitmap to match another bitmap its fine, so It seems the blit
> definitely isnt
> copying the content of the dc to the memory dc
>
> Any ideas ?
>
>
> On Sun, Apr 20, 2008 at 4:42 PM, Declan McMullen <
> declan.mcmullen at gmail.com> wrote:
>
> >
> > Is it possible to use blit with a double buffered paint dc ?I have the
> > following function
> >
> >
> > wxBitmap WorkspaceView::getScreenShot(wxDC& dc)
> >
> > {
> >
> > wxSize screenSize =3D dc.GetSize();
> >
> > wxBitmap screenBitmap(screenSize.GetWidth(), screenSize.GetHeight());
> >
> > wxMemoryDC memDC;
> >
> > memDC.SelectObject(screenBitmap);
> >
> > memDC.Blit(0, 0, screenSize.GetWidth(), screenSize.GetHeight(), &dc, 0,
> > 0);
> >
> > memDC.SelectObject(wxNullBitmap);
> >
> > return screenBitmap;
> >
> > }
> >
> >
> >
> > What I wanted to do with it was make a bitmap I could use for printing,
> > i.e just put everything
> >
> > thats on the screen into a bitmap, send that image to my printout object
> > and print it.
> >
> > All I'm getting though is a completely black image and I'm thinking its
> > due to my double buffering ?
> >
> >
> > Is it possible for me to get the contents of the buffer itself and use
> > that ?
> >
> >
> >
> > --
> > http://www.computing.dcu.ie/~dmcmullen<http://www.computing.dcu.ie/%7Ed=
mcmullen>
> > declan.mcmullen at computing.dcu.ie
> > School of Computing
> > Postgrad Bay A
> >
>
>
>
> --
> http://www.computing.dcu.ie/~dmcmullen<http://www.computing.dcu.ie/%7Edmc=
mullen>
> declan.mcmullen at computing.dcu.ie
> School of Computing
> Postgrad Bay A
>
-- =
http://www.computing.dcu.ie/~dmcmullen
declan.mcmullen at computing.dcu.ie
School of Computing
Postgrad Bay A
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.wxwidgets.org/pipermail/wx-users/attachments/20080421/192=
aeab6/attachment.htm
More information about the wx-users
mailing list