Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Window Backgrounds (again)



On Jul 30, 2004, at 1:14 AM, Jack Brindle wrote:

> Thanks David! It now looks great. The only problem I had was with a
> couple of windows for which I forgot to set the composite bit. ;-)
>
> Now, one more question. What is the Quartz equivalent to the Quickdraw
> sequence for setting the RGBBackColor? (There is one, isn't there?) As
> long as I am moving to Quartz, I might as well go as far as I can.
> Learning Quartz looks to be a challenge...

Unfortunately there are a number of things in the QuickDraw model that
don't have a direct correlation in Quartz. (little piddling things
like... pixels). One of those is the fact that Quartz doesn't have the
concept of Background and Foreground colors. Instead, you do your
drawing using a painters algorithm where whatever you draw first is
obscured by that which you draw on top of it.

What you would do in this situation is call CGContextSetRGBFillColor
and then use something like CGContextFillRect to paint the background.
Then you draw your content on top of that using whatever Quartz calls
you care to.

<note to self> I really need to start writing my introduction to Quartz
for QuickDraw programmers tutorial... </note to self>

Scott

--
Macintosh Software Engineering Consulting Services
Visit my resume at <http://homepage.mac.com/easco/RSTResume.html>

[demime 0.98b removed an attachment of type application/pkcs7-signature which had a name of smime.p7s]
_______________________________________________
carbon-development mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/carbon-development
Do not post admin requests to the list. They will be ignored.


References: 
 >Window Backgrounds (again) (From: Jack Brindle <email@hidden>)
 >Re: Window Backgrounds (again) (From: David McLeod <email@hidden>)
 >Re: Window Backgrounds (again) (From: Jack Brindle <email@hidden>)
 >Re: Window Backgrounds (again) (From: David McLeod <email@hidden>)
 >Re: Window Backgrounds (again) (From: Jack Brindle <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.