MaskFilter Class
MaskFilter is the base class for object that perform transformations on an alpha-channel mask before drawing it. An instance of MaskFilter may be installed into a Paint. Once there, each time a primitive is drawn, it is first scan converted into a #kA8_Format mask, and handed to the filter, calling its filterMask() method. If this returns true, then the new mask is used to render into the device.
Item Index
Methods
Methods
blur
(
MaskFilter
radius
styleSymbol
flagsSymbol
Parameters:
-
radius
IntegerThe radius to extend the blur from the original mask. Must be > 0.
-
styleSymbol
SymbolThe BlurStyle to use.
- #normal
- #solid
- #outer
- #inner
-
flagsSymbol
SymbolFlags to use - defaults to none.
- #none
- #ignoreTransform
- #all
Returns:
MaskFilter: Returns new instance offset MaskFilter class.
Example:
app.onDraw = function(sender, canvas)
{
var paint = new Paint();
// create MaskFilter and apply it to the paint object
paint.maskFilter = MaskFilter.blur(100, #inner);
// use paint object with applied MaskFilter to draw bitmap
canvas.drawBitmap(this._img, 0, 0, paint);
}