• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Transparent window with opaque text
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Transparent window with opaque text


  • Subject: Transparent window with opaque text
  • From: Scot Gellock <email@hidden>
  • Date: Mon, 13 Jan 2003 08:42:45 -0800

I have a transparent window. Actually, translucent is probably more
accurate as it has an alpha value of around 0.5. I'm trying to figure out
how I can draw text on the window where the background of the text honors
the transparency of the window, but the text's foreground color is 100%
opaque (alhpa value of 1.0). I don't want the foreground color of the text
to use the alpha value of the window.

I've looked at both:
http://developer.apple.com/samplecode/Sample_Code/Cocoa/RoundTransparentWind
ow.htm

and:
http://www.bignerdranch.com/Resources/Examples.html

I've tried a number of things:
In the view's drawRect, I've done drawInRect on my string. This picks up
the opaque and alpha settings of the view. This actually makes sense to me.

I've also tried putting an NSTextField on my window, but that picks up the
opaque and alpha settings of its parent window as well.

I've spent some time reading a number of posts on the archive, but they all
seem to address this issues now covered by the RoundTransparentWindow
sample, or slight derivations of the transparent window problem.

Best regards,



Scot
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.

  • Prev by Date: Re: Notes about WebCore
  • Next by Date: COM on mac
  • Previous by thread: Re: plug-ins and app-updates
  • Next by thread: COM on mac
  • Index(es):
    • Date
    • Thread