jules wrote:Graphics::reduceClipRegion (const Image&) ?
Mikey wrote:I'd love to have a way to draw a grayscale gradient in that image--that's what I'm really after. If you've ever used layer masks in Photoshop, it's exactly the same thing.
TheVinn wrote:Mikey wrote:I'd love to have a way to draw a grayscale gradient in that image--that's what I'm really after. If you've ever used layer masks in Photoshop, it's exactly the same thing.
You're saying inconsistent things. Now you are saying that you have an Image of type SingleChannel and you want to render a gradient into it? Call Image::createLowLevelContext() and then draw the gradient with suitable starting and ending colours.
I think you want to create a temporary SingleChannel image, draw into it as I mentioned above, then call Graphics::reduceClipRegion() with this temporary image, then draw your ARGB images (as Jules mentioned).
Mikey wrote:I can't really do the manipulations I want to that single-channel image unless I stand on my head. Being able to draw a gradient in that mask image would allow me to do some nice blending of foreground and background. Bear in mind that I'm doing this dynamically. Otherwise I'd just boot up Photoshop and handle it there.
TheVinn wrote:Mikey wrote:Call Image::createGraphicsContext() on your single-channel mask and then draw all you want, and when you're done set it as the clip in the call to Graphics::reduceClipRegion(), then draw your ARGB image and it will use the single-channel image as a mask (as well as respecting the alpha channel of your ARGB image).
Users browsing this forum: Bing [Bot], Google Feedfetcher, grimtraveller and 4 guests