When using BitmapShader, the results might be surprising, or look
strange or just erroneous.

This looks like a bug or problem, because the class/methods
documentation is missing some important info.

Nowhere in the documentation is stated that the bitmap will be pinned
down to the screen absolut coords, or to be more precise: the Shader
bitmap pattern will have it's origin pinned down to a relative
position given by the BitmapShader Matrix, relative to the screen
absolute coords.

This is done, instead of using the drawn Object origin as origin form
bitmap pattern.

This is specialy noticeable, when we use TileMode.CLAMP for X or Y.
and then draw somewhere besides the screen origin, (a rectangle for
example).

Intended usage or not, this is NOT state anywhere in the Docs.

So, if we want to pin down the Bitmap pattern origin to our drawn
object origin, we mast translate the BtmapShader Matrix to the same
location as our drawn object (rectangle, path, or whatever).

Hope this saves someone some frustrating time, debugging.

P.S.
  I'm not shure, if the origin for the Bitmap Pattern is relative to
Screen/Window origin, or relative to the View origin. Some further
testing would be required to determine this.
I fixed my problem, so if you really need this info, experiment, and
post back with some info.
Or maybe someone from google will hint us on the expected behaviour.
--~--~---------~--~----~------------~-------~--~----~
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]
Announcing the new M5 SDK!
http://android-developers.blogspot.com/2008/02/android-sdk-m5-rc14-now-available.html
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to