[WASTE-list] waste view

Marco Piovanelli marco.piovanelli at pobox.com
Mon May 28 12:35:00 EDT 2007


On Fri, 25 May 2007 07:31:38 +0700,
Brother Josef (thykeeper at nerdshack.com) wrote:



>Sorry I didn't respond in my other posts, I just discovered my spam

>filter started tossing out the waste list...

>

>on setting up waste as a HIView...

>

>I don't know what i'm doing to upset WASTE but calling

>WENewViewWithCGContext with a predefined CGContext or leaving the

>field null and setting it later caused crashing (in

>InvokeWEUndoUPP?). I'm using the 3.0.2.


Could you please verify whether you still get this crash with
the latest beta (3.1b1)? If you still crash, could you please
send me the crash log?


>Do i need to setup a WEView to prevent it from drawing "over" the

>current context? for example, say an image was draw over the text the

>next time waste flashes the carrot it will draw over the text, white

>background and all.


You can prevent WASTE from erasing the background to white by
setting the alpha of the background color to 0.0. This is what
HIWASTEView does when drawing to a compositing window. It makes
it very easy to have, say, a picture background under the text.

WEViewReference view;
ATSURGBAlphaColor transparentColor = {0.0, 0.0, 0.0, 0.0};
OSStatus err;

view = WEGetCurrentView(controller);
err = WESetViewInfo(weBackgroundColor, &transparentColor, view);


>Also, i would like to comment on the confusion converting between

>coordinate systems. Using HIView and Quartz origins are often not

>what waste expects and in the case of WEAdjustCursor I have no idea

>where waste thinks it is.


In general, WASTE expects local Quickdraw coordinates.
WEAdjustCursor() is an exception -- it expects global coordinates,
as it was documented back in 1998.

The HIView model is likely a source of additional confusion, since
it introduces more coordinate systems, view coordinates and window
coordinates (not the same as Quickdraw window coordinates).

Fortunately, the built-in HIView wrapper available in WASTE 3.1
handles all the coordinate translations for you, and makes APIs
like WEAdjustCursor largely unnecessary.


-- marco

--
It's not the data universe only, it's human conversation.
They want to turn it into a one-way flow that they have entirely
monetized. I look at the collective human mind as a kind of
ecosystem. They want to clear cut it. They want to go into the
rainforest of human thought and mow the thing down.



More information about the WASTE-list mailing list