Class: Caman.Renderer

Defined in: src/core/renderer.coffee

Overview

Handles all of the various rendering methods in Caman. Most of the image modification happens here. A new Renderer object is created for every render operation.

Instance Method Summary

Constructor Details

- (void) constructor(c)

Instance Method Details

- (void) add(job)

- (void) processNext() (bound)

Grabs the next operation from the render queue and passes it to Renderer for execution

- (void) execute(callback)

- (void) eachBlock(fn)

- (void) executeFilter()

The core of the image rendering, this function executes the provided filter.

NOTE: this does not write the updated pixel data to the canvas. That happens when all filters are finished rendering in order to be as fast as possible.

- (void) executePlugin()

Executes a standalone plugin

- (void) renderBlock(bnum, start, end)

Renders a single block of the canvas with the current filter function

- (void) renderKernel(bnum, start, end)

Applies an image kernel to the canvas

- (void) blockFinished(bnum)

Called when a single block is finished rendering. Once all blocks are done, we signal that this filter is finished rendering and continue to the next step.

- (void) processKernel(adjust, kernel, divisor, bias)

The "filter function" for kernel adjustments.

- (void) loadOverlay(layer, src)

Loads an image onto the current canvas