Dave's Brain

Browse - Programming Tips - On Android, can a bitmap be a brush?

Date: 2017feb6
OS: Android
Language: Java

Q.  On Android, can a bitmap be a brush?

A.  No.  There is no Brush class in Android.
There is Paint but it just specifies details of how drawing is done.
If you want to repeatedly use a bitmap use drawpBitmap:

float left = 100; float top = 100; canvas.drawBitmap(mybitmap, left, top, mypaint); left += 20; top += 20; canvas.drawBitmap(mybitmap, left, top, mypaint); left += 20; top += 20; canvas.drawBitmap(mybitmap, left, top, mypaint);

Add a comment

Sign in to add a comment
Copyright © 2008-2017, dave - Code samples on Dave's Brain is licensed under the Creative Commons Attribution 2.5 License. However other material, including English text has all rights reserved.