Wow, Ken! It works like magic (the second method I mean). Thank you
very much. I think I would never guess it myself.
For those who will reuse this code, don't forget to save/restore the
graphics context because CGContextClipToMask modified the clipping
region.
Sorry for late thanking, I had to
On 29 Jan 2009, at 06:32:45, Kyle Sluder wrote:
Perhaps the better solution is to draw the text as normal and then
re-draw the background with the appropriate alpha on top.
Am I missing something or could you use an NSGradient object to do this?
On Sun, Feb 1, 2009 at 4:35 AM, Benjamin Dobson
importedfromsp...@googlemail.com wrote:
Am I missing something or could you use an NSGradient object to do this?
Sure, if you used a gradient or solid color to draw the background in
the first place. Just give the starting color an alpha of 0 and
All else aside, yes you can do this in Cocoa and/or Quartz.
Here are a couple different ways. For instruction's sake, here's it done
with a compositing operation, NSCompositeDestinationIn. Result color =
what's already in the context but with additional alpha taken from the new
drawing.
-
On Jan 29, 2009, at 5:08 PM, Peter N Lewis wrote:
One option is to draw the end of the string character by character
with varying alphas.
Glyph by glyph, really, in the general case. You can take a look at
the CircleView example for one case of drawing strings glyph by glyph--
with
Yeah, the question is however how do I technically (e.g. in Cocoa)
composite the appropriate alpha with an image, whether the
background image, as you suggest, or with text image, as Ricky
suggested.
AFAIU, there is not such NSCompositingOperation to do this trick. It
appears that I need to
On 29/01/2009, at 6:27 PM, Oleg Krupnov wrote:
Yeah, the question is however how do I technically (e.g. in Cocoa)
composite the appropriate alpha with an image, whether the
background image, as you suggest, or with text image, as Ricky
suggested.
AFAIU, there is not such
On 29 Jan 2009, at 09:33, Rob Keniger wrote:
On 29/01/2009, at 6:27 PM, Oleg Krupnov wrote:
Yeah, the question is however how do I technically (e.g. in Cocoa)
composite the appropriate alpha with an image, whether the
background image, as you suggest, or with text image, as Ricky
suggested.
At 17:38 +0200 28/1/09, Oleg Krupnov wrote:
I want to produce the effect of a text string fading out when it's too
long to be displayed in a rect. This kind of effect is used in many
apps.
One option is to draw the end of the string character by character
with varying alphas.
Ie, instead of
On Wed, Jan 28, 2009 at 10:57 AM, Thomas Davie tom.da...@gmail.com wrote:
This solution will also throw sub-pixel anti-aliasing in the bin.
Perhaps the better solution is to draw the text as normal and then
re-draw the background with the appropriate alpha on top.
--Kyle Sluder
On Jan 28, 2009, at 22:32, Kyle Sluder wrote:
On Wed, Jan 28, 2009 at 10:57 AM, Thomas Davie tom.da...@gmail.com
wrote:
This solution will also throw sub-pixel anti-aliasing in the bin.
Perhaps the better solution is to draw the text as normal and then
re-draw the background with the
11 matches
Mail list logo