[android-developers] Re: Draw a Bitmap by specifying the x,y locations of the four corners
On Mar 1, 4:23 pm, mscwd01 <mscw...@gmail.com> wrote:
> Hey,
>
> Thanks for the tip. I have had a look at drawBitmapMesh in the docs
> and it has left me slightly confused. Do you know how it is meant to
> be used?
>
> Thanks
>
> On Mar 1, 4:04 pm, skink <psk...@gmail.com> wrote:
>
>
>
> > On Mar 1, 2:50 pm, mscwd01 <mscw...@gmail.com> wrote:
>
> > > Hi,
>
> > > I want to draw a bitmap on the screen by specifying the x,y locations
> > > of the four corners. I.e. I have a square bitmap and I would like to
> > > draw the:
>
> > > * Top right corner at pixel x=100,y=100
> > > * Bottom right corner at pixel x=120,y=220
> > > * Bottom left corner at pixel x=50,y=200
> > > * Top left corner at pixel x=5,y=90
>
> > > I have seen the Canvas method: public void drawBitmap (Bitmap bitmap,
> > > Rect src, RectF dst, Paint paint)
>
> > > However I believe this takes the top, right, bottom and left
> > > coordinates to draw the Bitmap and not the corner coordinates. I need
> > > to specify the CORNER coordinates to draw the bitmap as I may need to
> > > stretch/distort the Bitmap (I am drawing the Bitmap on a 3D spherical
> > > model).
>
> > > Thanks
>
> > hi,
>
> > try drawBitmapMesh
>
> > pskink
never used it, but see ApiDemos: there is a demo that uses
drawBitmapMesh
--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
0 Comments:
Post a Comment
Subscribe to Post Comments [Atom]
<< Home