Win an Ipad
  Developer   Documents   MaskFilter

MaskFilter

This article explains how to manage alpha-channel bitmap objects in Moscrif.

MaskFilter


MaskFilter performs transformations on an alpha-channel mask before object is drawing. It is used within Paint instance.

 

Example of how to blur a bitmap object in Moscrif:

app.onDraw = function(sender, canvas)
{
    //apply mask filter to paint object
    paint.maskFilter = MaskFilter.blur(10, #normal, #none);;
    //load bitmap file var bitmap = Bitmap.fromFile("app://moscrif.jpg");
    //draw blured bitmap in ondraw methood
    canvas.drawBitmap(bitmap, System.width / 2 - bitmap.width / 2, System.height / 2 - bitmap.height / 2, paint);
}

 ColorFilter   MaskFilter   Matrix 
Write a Comment (0)
Subject
Please complete this mandatory field.
HTML Tags Not Allowed!
Comment
Please complete this mandatory field.