tags:

views:

37

answers:

0

Hi,

The following message refers to the Android platform

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