Android Question Bitmap creator: drawBitmapCreator with different target sizes

sorex

Expert
Licensed User
Longtime User
Hello,

I'm having a play with the new drawbitmap library and have some questions about it...

If I see it right there's no way to draw part of an image with a different target size with 1 .draw... command?

If you want to display an image twice with different sizes do you need to create 2 bitmaps and use loadbitmapresize with the different sizes and then draw those ?

won't that use more memory?

.drawBitmap supports target sizing but is it as fast as .drawBitmapCreator or is it the old (slow) method?

while .drawBitmap seems to work it's applying a blur when upscaling. can this be turned off? I only see it for canvas not for imageview or (B4X)bitmaps
 
Last edited:

Erel

B4X founder
Staff member
Licensed User
Longtime User
BitmapCreator v3.60 which is included in B4A v8.30 includes a new method named DrawBitmapCreatorTransformed.
A tutorial about this method will be available next week. It will also be available in B4i and B4J.

This method allows you to draw scaled and rotated BitmapCreators.


B4X:
Dim dt As DrawTask = bc.CreateDrawTask(source, SrcRect, 50, 50, True) '(50, 50) defines the target center
dt.SrcScaleX = 2.5
dt.SrcScaleY = 3
dt.Degrees = 180
bc.DrawBitmapCreatorTransformed(dt)
 
Upvote 0

sorex

Expert
Licensed User
Longtime User
excellent.

this doesn't apply the blur which I was talking about in the post above (I added that line while you just posted your reply)
 
Upvote 0
Top