Canvas
Canvas is a rectangular area intended for drawing Graphical Elements (Image, Text, WordArt and Shape Elements). Canvas plays a key role in the ImageDraw architecture because it governs and determines the final size for the output image to be generated. Canvas is represented by Neodynamic.WebControls.ImageDraw.Canvas class.
The main features and properties of Canvas are the following:
- Width and Height
Set these properties to adjust the final size of the output image. The values are expressed in pixel. - AutoSize
When this feature is enabled (it has been set to True), canvas will expand or contract to the size of the contents represented by all Elements, if any. Notice that enabling this feature will lock the Width and Height properties.
Example: In the following hypothetical case, canvas is transparent and has an ImageElement and a TextElement.
AutoSize feature is not enabled.
AutoSize feature is enabled. - Center Elements
When this feature is enabled (it has been set to True), all Elements on the canvas, if any, will be centered.
Example: In the following hypothetical case, canvas is transparent and has an ImageElement and a TextElement.
Center Elements and AutoSize are disabled.
Both features Center Elements and AutoSize are enabled. - Fill
It determines how the filling in the canvas is rendered. There are four Fill Styles available – Solid, Texture, Gradient, and Pattern – that can be edited by the Fill dialog box at design time. Fill is represented by Neodynamic.WebControls.ImageDraw.Fill class.