Class: Caman.Blender

Defined in: src/core/blender.coffee

Overview

Built-in layer blenders. Many of these mimic Photoshop blend modes.

Class Method Summary

Class Method Details

+ (void) register(name, func)

Parameters:

  • name (String) Name of the blender.
  • func (Function) The blender function.

+ (Object) execute(name, rgbaLayer, rgbaParent)

Parameters:

  • name (String) Name of the blending function to invoke.
  • rgbaLayer (Object) RGBA object of the current pixel from the layer.
  • rgbaParent (Object) RGBA object of the corresponding pixel in the parent layer.

Returns:

  • (Object) — RGBA object representing the blended pixel.