Ask a Question related to Mac Programming, Design and Development.
-
Eric VERGNAUD #1
HIViews and Quickdraw
Hi,
In order to support brush metal, I am adapting my Carbon Quickdraw framework
to support compositing.
Everything works fine for standard controls. In order to handle custom
content, I have succesfully created a custom HIView, and added it to the
content view of the window.
The problem I have is when my custom control is called with
kEventControlDraw, I cannot get a quickdraw port.
I can get a valid CGContext using the following:
err = ::GetEventParameter
(inEvent,kEventParamCGContextRef,typeCGContextRef, 0,sizeof(gc),0,&gc);
But when I call
err = ::GetEventParameter
(inEvent,kEventParamGrafPort,typeGrafPtr,0,sizeof( port),0,&port);
I get a eventParameterNotFoundErr err.
Am I doing something wrong ?
Is this a known bug ?
Is there a workaround ?
I could not find any function to convert a CGContext to a grafport.
I don't want to use Quartz because the framework needs to run on MacOS 9.
AHWBA.
Eric
Eric VERGNAUD Guest
-
QuickDraw view bug?
I have a customized QuickDraw view in my nib-based Obj-C Project. It is a background image that covers the entire main window. Intermittently only... -
QuickDraw MacGraw Style
Disclaimer: I would have posted this on PVII Newsgroups, but I can't from work - plus someone here may learn from it. I have tried to duplicate... -
Arne Scheffler #2
Re: HIViews and Quickdraw
Eric VERGNAUD wrote:
Just read the documentation :> Hi,
>
> In order to support brush metal, I am adapting my Carbon Quickdraw framework
> to support compositing.
>
> Everything works fine for standard controls. In order to handle custom
> content, I have succesfully created a custom HIView, and added it to the
> content view of the window.
>
> The problem I have is when my custom control is called with
> kEventControlDraw, I cannot get a quickdraw port.
>
> I can get a valid CGContext using the following:
>
> err = ::GetEventParameter
> (inEvent,kEventParamCGContextRef,typeCGContextRef, 0,sizeof(gc),0,&gc);
>
> But when I call
>
> err = ::GetEventParameter
> (inEvent,kEventParamGrafPort,typeGrafPtr,0,sizeof( port),0,&port);
>
> I get a eventParameterNotFoundErr err.
>
> Am I doing something wrong ?
> Is this a known bug ?
> Is there a workaround ?
>
from CarbonEvents.h :
kEventControlDraw
Required parameters:
--> kEventParamDirectObject typeControlRef
Optional parameters:
--> kEventParamGrafPort typeGrafPtr
(draw into the current port if kEventParamGrafPort
is not present)
arne
Arne Scheffler Guest



Reply With Quote

