I've searched for examples but just haven't found anything to help me
make sense of this yet.

On Aug 18, 4:20 pm, Eddified <[email protected]> wrote:
> I see how to set an Xfermode on a Paint, but how do I figure a circle
> into the picture (the shape in my example to create the mask out of) ?
>
> On Aug 18, 3:44 pm, Romain Guy <[email protected]> wrote:
>
> > drawMesh() is a rather curious way to do it :)
>
> > Anyway, you can easily do masking using the various PorterDuff transfer 
> > modes.
>
> > On Tue, Aug 18, 2009 at 2:33 PM, Jason
>
> > Proctor<[email protected]> wrote:
>
> > > you can do this with the Canvas.drawMesh() thing, but i doubt it's
> > > the best way to do it.
>
> > > you might be able to implement a custom MaskFilter?
>
> > >>I'm trying to figure out how to draw a bitmap to the canvas in such a
> > >>way that only part of it is actually drawn. The part that would be
> > >>drawn corresponds to pixels of the bitmap that "match up" with pixels
> > >>of some other shape.
>
> > >>Photoshop and Flash both have masks like this.
>
> > >>Specifically, I have rectangular bitmaps that I want to draw as
> > >>circles. I don't want the corners of the bitmaps to be drawn. The user
> > >>of the application would then see images appearing as circular images.
> > >>This would be pretty simple using Flash, but searching "Mask" in the
> > >>Android API only gives code that modifies each pixel (like a GIMP or
> > >>Photoshop "filter" would). Or at least that's what it appears to me.
>
> > >>How can I apply a circular "cookie-cutter" to a rectangular bitmap so
> > >>that the corners don't show up? Specific solutions to this problem and
> > >>general "mask" type solutions are both desired.
>
> > >>Thank you.
>
> > > --
> > > jason.software.particle
>
> > --
> > Romain Guy
> > Android framework engineer
> > [email protected]
>
> > Note: please don't send private questions to me, as I don't have time
> > to provide private support.  All such questions should be posted on
> > public forums, where I and others can see and answer them
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to