How To Make Round Image In Sketchware | Round Image In Sketchware

0

  How to get Device ID in Sketchware Pro | Get Device ID in Sketchware | Sketch Store


How To Make Round Image In Sketchware

(ads1)

Code - 



Bitmap bm = ((android.graphics.drawable.BitmapDrawable)_view.getDrawable()).getBitmap();

_view.setImageBitmap(getRoundedCornerBitmap(bm, ((int)_radius)));

}
public static Bitmap getRoundedCornerBitmap(Bitmap bitmap, int pixels) {
Bitmap output = Bitmap.createBitmap(bitmap.getWidth(), bitmap.getHeight(), Bitmap.Config.ARGB_8888);
Canvas canvas = new Canvas(output);
final int color = 0xff424242;
final Paint paint = new Paint();
final Rect rect = new Rect(0, 0, bitmap.getWidth(), bitmap.getHeight());
final RectF rectF = new RectF(rect);
final float roundPx = pixels;
paint.setAntiAlias(true);
canvas.drawARGB(0, 0, 0, 0);
paint.setColor(color);
canvas.drawRoundRect(rectF, roundPx, roundPx, paint); 
paint.setXfermode(new PorterDuffXfermode(PorterDuff.Mode.SRC_IN)); 
canvas.drawBitmap(bitmap, rect, rect, paint);
return output;


Project Download - https://tei.ai/Hfgn5VmoWk


Sketchware Pro Download - https://tei.ai/bBPe1

(ads2)

Tutorial Video - 

https://youtu.be/poNaQ37T3aA



📸 Social Media


Instagram 👉 https://www.instagram.com/sketch_store_yt

Tags

Post a Comment

0Comments
Post a Comment (0)

#buttons=(Accept !) #days=(20)

Our website uses cookies to enhance your experience. Learn More
Accept !