# Class: Context

## Kinetic. Context

#### <virtual> new Context()

  Canvas Context constructor

  Source:
    - kinetic-v5.1.10.js, line 1582

### 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:
    - kinetic-v5.1.10.js, line 1728

#### clearTrace()

  clear trace if trace is enabled

  Source:
    - kinetic-v5.1.10.js, line 1686

#### fillShape(shape)

  fill shape

  ##### Parameters:

  Name | Type | Description
  --- | --- | ---
  `shape` | Kinetic.Shape |

  Source:
    - kinetic-v5.1.10.js, line 1602

#### fillStrokeShape(shape)

  fill then stroke

  ##### Parameters:

  Name | Type | Description
  --- | --- | ---
  `shape` | Kinetic.Shape |

  Source:
    - kinetic-v5.1.10.js, line 1624

#### getCanvas() → {Kinetic.Canvas}

  get canvas

  Source:
    - kinetic-v5.1.10.js, line 1715

  ##### 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:
    - kinetic-v5.1.10.js, line 1642

  ##### Returns:

  Type
    String

#### reset()

  reset canvas context transform

  Source:
    - kinetic-v5.1.10.js, line 1705

#### strokeShape(shape)

  stroke shape

  ##### Parameters:

  Name | Type | Description
  --- | --- | ---
  `shape` | Kinetic.Shape |

  Source:
    - kinetic-v5.1.10.js, line 1613