Fill LINEAR

From RealWorld Wiki

Jump to: navigation, search

LINEAR is a filling style that fills a shape with a linear gradient. The pattern is using currently selected foreground and background colors.

The starting and ending points are visualized by control handles and they can be moved in the raster editor. The relative distance to color mapping is controlled by a function defined in the fill style configuration. It is possible to enable automatic repositioning of the control handles according to bounds of the drawn shape.

[edit] Scripting interface

LINEAR can be used from scripts and has the following arguments.

  • gradient (optional) - at least two pairs of coordinates in range 0-255 defining the gradient curve.
  • mode - "ABSOLUTE", "RELSHAPE" (default) or "RELIMAGE".
  • point1_X, point1_Y, point2_X, point2_X (optional if mode is not ABSOLUTE) - two points defining the gradient start and end points.

[edit] Example

DrawTool.SetFillStyle("LINEAR", "ABSOLUTE,0,0,100,100");
Personal tools