Class Fz2D.TextureInput

Defined in: src/renderer/texture_input.coffee

Overview

Public: Texture Input

Instance Method Summary

Constructor Details

::constructor() Source

Public: Constructor

Instance Method Details

::add(cb) Source

Public: Adds a generic "input filter" to be executed. cb - filter callback function

Parameters:

  • cbfilter callback function

::addCircle(color, radius) Source

Public: Solid circle fill filter. color - fill color radius - radius of the circle (default: w / 2)

Parameters:

  • colorfill color
  • radiusradius of the circle (default: w / 2)

::addFill(color) Source

Public: Solid color fill filter. color - fill color

Parameters:

  • colorfill color

::apply(ctx, w, h) Source

Public: Executes all the added filters in sequential order. ctx - 2d canvas context w - width of canvas h - height of canvas Returns an instance of a canvas.

Parameters:

  • ctx2d canvas context
  • wwidth of canvas
  • hheight of canvas

Returns:

  • Returns an instance of a canvas.