Interface ICanvasDrawingStyles

Interface ICanvasDrawingStyles

Namespace: Aspose.Html.Dom.Canvas
Assembly: Aspose.HTML.dll (25.2.0)

The ICanvasDrawingStyles interface provides methods and properties control how lines are drawn and how text is laid out.

[ComVisible(true)]
[DOMObject]
[DOMNoInterfaceObject]
public interface ICanvasDrawingStyles

Properties

Font

Font setting. Default value 10px sans-serif

[DOMName("font")]
string Font { get; set; }

Property Value

string

LineCap

Type of endings on the end of lines. Possible values: butt (default), round, square.

[DOMName("lineCap")]
string LineCap { get; set; }

Property Value

string

LineDashOffset

Specifies where to start a dash array on a line.

[DOMName("lineDashOffset")]
double LineDashOffset { get; set; }

Property Value

double

LineJoin

Defines the type of corners where two lines meet. Possible values: round, bevel, miter (default).

[DOMName("lineJoin")]
string LineJoin { get; set; }

Property Value

string

LineWidth

Width of lines. Default 1.0

[DOMName("lineWidth")]
double LineWidth { get; set; }

Property Value

double

MiterLimit

Miter limit ratio. Default 10.

[DOMName("miterLimit")]
double MiterLimit { get; set; }

Property Value

double

TextAlign

Text alignment setting. Possible values: start (default), end, left, right or center.

[DOMName("textAlign")]
string TextAlign { get; set; }

Property Value

string

TextBaseline

Baseline alignment setting. Possible values: top, hanging, middle, alphabetic (default), ideographic, bottom.

[DOMName("textBaseline")]
string TextBaseline { get; set; }

Property Value

string

Methods

GetLineDash()

Returns the current line dash pattern array containing an even number of non-negative numbers.

[DOMName("getLineDash")]
double[] GetLineDash()

Returns

double[]

An Array. A list of numbers that specifies distances to alternately draw a line and a gap (in coordinate space units).

SetLineDash(double[])

Sets the current line dash pattern.

[DOMName("setLineDash")]
void SetLineDash(double[] segments)

Parameters

segments double[]

An Array of numbers which specify distances to alternately draw a line and a gap (in coordinate space units)