On Mar 1, 5:54 pm, mscwd01 <[email protected]> wrote:
> I realise the verts array is what manipulates the Bitmap, however I am
> unsure how I construct the verts array.
>
> Basically I have calculated where the four corners of the Bitmap
> should be drawn on the screen (I have four x,y pairs), I just need to
> work out how to construct a verts array which enables me to draw the
> Bitmap where I need it.
>
> I have searched for some documentation on the Mesh object and can find
> nothing useful.
>
> Thanks for your help.
>
> On Mar 1, 6:43 pm, skink <[email protected]> wrote:
>
>
>
> > On Mar 1, 5:21 pm, mscwd01 <[email protected]> wrote:
>
> > > I found this in the
> > > Demos:http://developer.android.com/resources/samples/ApiDemos/src/com/examp...
>
> > > However, I cant see how this will help me draw a Bitmap by specifying
> > > the x,y coordinates of each corner though.
>
> > > If only Android had a drawBitmap(Bitmap, x1,y1, x2,y2, x3,y3, x4,y4)
> > > method!
>
> > > If I am overlooking the drawBitmapMesh method however, please let me
> > > know.
>
> > > Thanks
>
> > i cant test it now, but looking into docs you need verts array with
> > eight elements, something like this:
>
> > drawBitmapMesh(bitmap, 1, 1, verts, 0,
> > null, 0, null)
>
> > pskink
maybe try this one:
a - top-left corner
b - top-right corner
c - bottom-left corner
d - bottom-right corner
verts = {
ax, ay, bx, by, cx, cy, dx, dy
}
just guess...
pskink
--
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