import "image/image";
The class represents a 2D shape defined by multiple paths (either closed or open), using lines and quadratic and cubic curves as primitives.
Internally the class is represented as an array where for each primitive there is a part type (an integer) followed by the coordinates (floats). Therefore no fields can be added in potential subclasses.
static function create(): Shapestatic function line(x1: Float, y1: Float, x2: Float, y2: Float): Shapestatic function rect(x: Float, y: Float, width: Float, height: Float): Shapestatic function circle(cx: Float, cy: Float, radius: Float): Shapestatic function ellipse(cx: Float, cy: Float, rx: Float, ry: Float): Shapestatic function ellipse_rect(x: Float, y: Float, w: Float, h: Float): Shapestatic function round_rect(x: Float, y: Float, w: Float, h: Float, arcw: Float, arch: Float): Shapefunction clear()function move_to(x: Float, y: Float)function line_to(x: Float, y: Float)function quad_to(x1: Float, y1: Float, x2: Float, y2: Float)function cubic_to(x1: Float, y1: Float, x2: Float, y2: Float, x3: Float, y3: Float)function arc_to(cx: Float, cy: Float, x2: Float, y2: Float)function arc_to_neg(cx: Float, cy: Float, x2: Float, y2: Float)function close_path()
function get_outline(): Shape
function get_outline(width: Float): Shape
function get_outline(width: Float, cap: Integer, join: Integer): Shape
function get_outline(width: Float, cap: Integer, join: Integer, miter_limit: Float): Shape
function get_bounds(): Float[]function transform(tr: Transform)function append(shape: Shape)
function append(shape: Shape, tr: Transform)function hit_test(x: Float, y: Float): Boolean;function get_reversed(): Shape