Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

BUG: wxMac 2.8.0 drawing sample, logical op

0 views
Skip to first unread message

Thomas Jansson

unread,
Jan 23, 2007, 9:09:55 PM1/23/07
to
I recently upgraded to wxMac 2.8.0 from wxMac 2.6.3 and came across an
issue with wxAND when drawing.
I checked with the included drawing sample and it doesn't draw every
operation properly (going to the Mask screen, F6 where you see the stars).

I built wxMac 2.8.0 with these configurations (on MacOS X 10.4)

../configure --disable-shared --enable-universal_binary --with-opengl

then built the sample using the included makefile in
build-osx/samples/drawing (by running make).

The result is I don't get anything on operations other than the original
image, with colour mask, the mask image, masked image and wxCOPY.

(The wxMSW 2.8.0 and samples built okay using VS express)

Hopefully this will be enough for someone to find the problem.


---------------------------------------------------------------------
To unsubscribe, e-mail: wx-users-u...@lists.wxwidgets.org
For additional commands, e-mail: wx-use...@lists.wxwidgets.org

phoenix

unread,
Jan 23, 2007, 11:36:28 PM1/23/07
to
Hi Thomas,

I have recently found a problem with wxMac drawing, probably the same
problem. Look at these messages from the developers list. If you find a
good solution, please post it here.

To summarize, it seems that CoreGraphics, the new Mac drawing engine,
does not support logical operations.

Best regards,
Phoenix.

On Tue, 2007-01-09 at 15:16 -0200, phoenix wrote:
> Hi Stefan,
>
> I hope you don't mind that we bring it back to the list.
>
> On Tue, 2007-01-09 at 15:18 +0100, Stefan Csomor wrote:
> > Hi Phoenix
> >
> > Enjoy your holidays, here was the answer line :
> >
> > > > What exactly is your code looking like, then perhaps I can offer
> > > you an
> > > > alternative.
> > >
> > > I am working with 3 memory DC's (memDC, dcGrid, dcPlot) like this:
> > >
> > > memDC->Blit(0,0,nClientWidth,nClientHeight,dcGrid,0,0);
> > > memDC->Blit(0,0,nClientWidth,nClientHeight,dcPlot,0,0,wxOR);
> > >
> > > I think it is strange that the second line of this code fails for
> > > memory
> > > DC's. Ok, CoreGraphics does not support anything but copy, but memory
> > > DC's should not have this restriction, should they? I should be able
> > > to
> > > manipulate the images in memory and then the last step would be a
> > > copy
> > > to the actual display device.
> > >
> > > Anyway, what is your suggestion in this case? If memory DC's do not
> > > support raster operations, I think I would have to change the drawing
> > > logic. The even more strange thing is that this code works with
> > > wx-2.6.3, the odd behaviour is only with wx-2.8.0.
> >
> > 2.6.3 was using the venerable QuickDraw, 2.8.0 is using CoreGraphics, as
> > all the QuickDraw calls are deprecated and may not be available on
> > future systems ...
> >
> > So the deeper question is what exactly are you XOR blitting, for most
> > things I've been using wxOverlayDC, which even gave the nicer mac look,
> > as this is a real overlay dc so rectangles etc can be semi transparently
> > filled etc...
>
> Well, my concern is how do I code it so that I achieve platform
> independency. You see, this code is supposed to run in at least 3
> platforms: Windows, GTK and Mac.
>
> This is a simple "moving graph" plot. One DC has the fixed elements, the
> axis, scales, labels, etc, the other has the moving stuff, basically the
> curves. They get combined with the wxOR (not wxXOR), because the person
> that originally coded assumed a black background.
>
> I will take a look at wxOverlayDC when I come back.
>
> Thank you very much for your help!
> Best regards,
> Phoenix.
>
> >
> > Best,
> >
> > Stefan

0 new messages