EvFill Interface
The EvFill TS interface defines a blueprint of a JS object that describes the fill of an object item. It specifies how to fill the area inside a given 2D object item. Canvas Envision Creator supports several fill types, such as solid color, gradients, etc. Each fill type uses specific data for drawing.
Properties
An EvFill object has the following properties:
optional data: EvColorFill;An
EvColorFillobject, an object with the fill attributes necessary to draw the fill. The fill attributes differ depending on the fill type. Currently, only a data object for a solid color fill is supported.optional id: EvInkRef;A number, the internal identifier of a given fill. If it is specified when applying a fill:
The fill with the specified ID is applied.
The data object given in the
dataproperty is ignored.
type: EvFillType;A member of the
EvFillTypeenumeration, a fill type of a given fill.
Examples
TS
JS
- { data: { color: "#B3282E" }, id: 42, type: EvFillType.Color }
- { data: { color: "#B3282E" }, id: 42, type: "color" }
Discussion
Currently, only solid color fill and no fill can be created programmatically with the evCreate API.
Gradient, hatch, and image fills can be initially created in a document only with the GUI. However, you can apply such a fill programmatically to object items in the document using the id property value of the original fill.