Grad Pen
Sets the color gradient for area filling. The gradient can be defined by up to 256 colors. Each defined color
can have specified color offset for creating gradients with asymmetric color ranges.
Argument | Type | Description | Values |
---|---|---|---|
grad-type | [word!] | The gradient type | radial conic diamond linear diagonal cubic |
grad-mode | [word!] | The gradient rendering mode | normal repeat reflect |
grad-offset | [pair!] | offset from where should the gradient be rendered | |
grad-start-rng | [decimal!] | beginning of the gradient range | |
grad-stop-rng | [decimal!] | end of the gradient range | |
grad-angle | [decimal!] | rotation of the gradient in degrees | |
grad-scale-x | [decimal!] | scale X factor | |
grad-scale-y | [decimal!] | scale Y factor | |
grad-colors | [block!] | block containing up to 256 gradient colors (optionally with color offsets) |
block content can be either: [color1] or: [color1] NOTE: Currently color values inside the block are reduced. (in case word! references are used for colors) |
Notes and Examples
Simple linear gradient
grad-pen linear 100x100 0 200 [255.0.0] box 100x100 300x300
Linear gradient with compressed range
grad-pen linear 100x100 0 50 [255.0.0] box 100x100 300x300
Linear gradient in repeat mode
grad-pen linear repeat 100x100 0 50 [255.0.0] box 100x100 300x300
Linear gradient in reflect mode
grad-pen linear reflect 100x100 0 50 [255.0.0] box 100x100 300x300
Linear gradient with more colors
grad-pen linear 100x100 0 200 [255.0.0] box 100x100 300x300
Linear gradient with color offsets
grad-pen linear 100x100 0 200 [255.0.0] box 100x100 300x300
Simple radial gradient
grad-pen radial 200x200 0 100 [255.0.0] box 100x100 300x300
Diamond gradient with applied rotation
grad-pen diamond 200x200 0 100 30 [255.0.0] box 100x100 300x300
Diamond gradient with applied rotation and scaling
grad-pen diamond 200x200 0 100 30 3.0 1.5 [255.0.0] box 100x100 300x300
To disable the grad-pen', set it to off. After that latest fill-pen state is used for filling the areas.
fill-pen red grad-pen linear 100x100 0 200 [255.0.0] box 100x100 300x300 grad-pen off box 150x150 250x250
Mention DIAGONAL gradient here.
Mention CONIC gradient here.
Mention CUBIC gradient here.
--Henrikmk 06:29, 26 August 2007 (EDT)