• 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
Re: Bifurcating text color in QL on X.6, how?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Bifurcating text color in QL on X.6, how?


  • Subject: Re: Bifurcating text color in QL on X.6, how?
  • From: Jens Alfke <email@hidden>
  • Date: Thu, 01 Jan 2015 14:12:47 -0800

> On Jan 1, 2015, at 1:25 PM, Eden Smallwood <email@hidden> wrote:
>
> 	If you’re thinking "Wh on Bk and Bk on Wh, therefore XOR to the rescue", I’ve tried every conceivable setting of cgBlendMode and nsCompositingMode and nothing has any effect whatsoever on the text color which results in the window.

XOR-based drawing modes are pretty much useless in anything other than 1-bit (b/w) graphics. I don't think CG even supports them.

> 	Or perhaps it’s possible to detect the “background color” of the current CGContext or NSContext?  But this notion doesn’t seem to exist.

I don't think so. The individual calls don't draw both foreground and background, so the background is simply the color of the pixels that already exist in the buffer at the time you're drawing. Or of the pixels your pixmap will be composited onto when it's drawn, if it's transparent.

I don't know much about QuickLook generators, but it looks like there are a lot of possible data types that the generator can return the preview as, including textual ones like RTF. If so, it's possible the preview you saw is textual and the Finder is overriding its text styling to force a contrasting color.

—Jens
_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden


References: 
 >Bifurcating text color in QL on X.6, how? (From: Eden Smallwood <email@hidden>)

  • Prev by Date: Bifurcating text color in QL on X.6, how?
  • Next by Date: Re: Bifurcating text color in QL on X.6, how?
  • Previous by thread: Bifurcating text color in QL on X.6, how?
  • Next by thread: Re: Bifurcating text color in QL on X.6, how?
  • Index(es):
    • Date
    • Thread