Class: Context

Kinetic. Context

<virtual> new Context()

Canvas Context constructor

Source:

Methods

clear(bounds)

clear canvas

Parameters:
Name Type Argument Description
bounds Object <optional>
Properties
Name Type Argument 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:
KineticJS Copyright © 2015 The contributors to the KineticJS project.
Documentation generated by JSDoc 3.2.2 on Tue Jan 20th 2015 using the DocStrap template.