Overheads of Bitmap over DrawRect

enonod

Well-Known Member
Licensed User
Longtime User
When using Canvas there is a choice between say, DrawRect and DrawBitmap.
Is there a large memory or other overhead if BitMap is chosen, especially if there were say, 50 or a 100 of them? I am referring to say 20dip square.
[Edit]The rectangle or shape is just a solid colour
 
Last edited:

JonPM

Well-Known Member
Licensed User
Longtime User
I can't say this 100%, but I imagine using DrawRect with solid colors has less overhead than loading 100 bitmaps. I think most developers would choose DrawRect with solid colors instead of bitmaps. Is there a reason you would need to use bitmaps?
 
Upvote 0

enonod

Well-Known Member
Licensed User
Longtime User
Thanks for the reply.
The reason for querying bitmaps is because I need either an Ascii arrow or draw an arrow with Drawline, on some rectangles and I wondered if it was better to have a bitmap with the arrow.
I accept your opinion on overhead and will not follow the bitmap path.
 
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…