Dart DocumentationstagexlMask

Mask abstract class

abstract class Mask {

 DisplayObject targetSpace = null;
 bool border = false;
 int borderColor = 0xFF000000;
 int borderWidth = 1;

 CanvasRenderingContext2D _context;

 Mask();

 //-----------------------------------------------------------------------------------------------

 factory Mask.rectangle(num x, num y, num width, num height) {
   return new _RectangleMask(x, y, width, height);
 }

 factory Mask.circle(num x, num y, num radius) {
   return new _CirlceMask(x, y, radius);
 }

 factory Mask.custom(List<Point> points) {
   return new _CustomMask(points);
 }

 factory Mask.shape(Shape shape) {
   return new _ShapeMask(shape);
 }

 //-----------------------------------------------------------------------------------------------

 bool hitTest(num x, num y);

 _drawCanvasPath(CanvasRenderingContext2D context);
 _drawTriangles(RenderContext context, Matrix matrix);
}

Constructors

new Mask() #

Creates a new Object instance.

Object instances have no meaningful state, and are only useful through their identity. An Object instance is equal to itself only.

docs inherited from Object
Mask();

factory Mask.circle(num x, num y, num radius) #

factory Mask.circle(num x, num y, num radius) {
 return new _CirlceMask(x, y, radius);
}

factory Mask.custom(List<Point> points) #

factory Mask.custom(List<Point> points) {
 return new _CustomMask(points);
}

factory Mask.rectangle(num x, num y, num width, num height) #

factory Mask.rectangle(num x, num y, num width, num height) {
 return new _RectangleMask(x, y, width, height);
}

factory Mask.shape(Shape shape) #

factory Mask.shape(Shape shape) {
 return new _ShapeMask(shape);
}

Properties

bool border #

bool border = false

int borderColor #

int borderColor = 0xFF000000

int borderWidth #

int borderWidth = 1

DisplayObject targetSpace #

DisplayObject targetSpace = null

Methods

abstract bool hitTest(num x, num y) #