dojox/gfx/_base.gradient (version 1.10)

See the dojox/gfx/_base.gradient reference documentation for more information.

Method Summary

  • project(matrix,gradient,tl,rb,ttl,trb) Returns a new gradient using the "VML algorithm" and suitable for VML.
  • rescale(stops,from,to) Recalculates a gradient from 0-1 window to "from"-"to" window blending and replicating colors, if necessary.

Methods

project(matrix,gradient,tl,rb,ttl,trb)
Defined by dojox/gfx/gradient

Returns a new gradient using the "VML algorithm" and suitable for VML.

Parameter Type Description
matrix dojox/gfx/matrix.Matrix2D | null

matrix to apply to a shape and its gradient

gradient Object

a linear gradient object to be transformed

tl Object

top-left corner of shape's bounding box

rb Object

right-bottom corner of shape's bounding box

ttl Object

top-left corner of shape's transformed bounding box

trb Object

right-bottom corner of shape's transformed bounding box

Returns:object
rescale(stops,from,to)
Defined by dojox/gfx/gradient

Recalculates a gradient from 0-1 window to "from"-"to" window blending and replicating colors, if necessary.

Parameter Type Description
stops Array

input gradient as a list of colors with offsets (see dojox/gfx.defaultLinearGradient and dojox/gfx.defaultRadialGradient)

from Number

the beginning of the window, should be less than "to"

to Number

the end of the window, should be more than "from"

Returns:Array
Error in the documentation? Can’t find what you are looking for? Let us know!