Class: Context

Kinetic. Context

Constructor

(abstract) new Context()

Canvas Context constructor
Source:

Methods

clear(boundsopt)

clear canvas
Parameters:
Name Type Attributes Description
bounds Object <optional>
Properties
Name Type Attributes Description
x Number <optional>
y Number <optional>
width Number <optional>
height Number <optional>
Source:

clearTrace()

clear trace if trace is enabled
Source:

fillShape(shape)

fill shape
Parameters:
Name Type Description
shape Kinetic.Shape
Source:

fillStrokeShape(shape)

fill then stroke
Parameters:
Name Type Description
shape Kinetic.Shape
Source:

getCanvas() → {Kinetic.Canvas}

get canvas
Source:
Returns:
Type
Kinetic.Canvas

getTrace(relaxed) → {String}

get context trace if trace is enabled
Parameters:
Name Type Description
relaxed Boolean if false, return strict context trace, which includes method names, method parameters properties, and property values. If true, return relaxed context trace, which only returns method names and properites.
Source:
Returns:
Type
String

reset()

reset canvas context transform
Source:

strokeShape(shape)

stroke shape
Parameters:
Name Type Description
shape Kinetic.Shape
Source: