VegaRise.NET
Back to Shape

SetDimensionsMethod

Definition

Namespace
DOM.Elements.Graphics
Assembly
DOM.dll

Overloads

SetDimensions(double width, double height, Units units)

Sets the dimensions (width and height) of the graphic.

SetDimensions(DocumentUnit width, DocumentUnit height)

Sets the dimensions of the graphic using pre-configured DocumentUnit values.

SetDimensions(double width, double height, Units units)

SetDimensions(double width, double height, Units units)

Sets the dimensions (width and height) of the graphic.

Parameters

width
Width of the graphic.
height
Height of the graphic.
units
Measurement unit for the dimensions (default: points).

Remarks

Dimensions are stored in the property. Dimensions The method automatically initializes if it is . If is, a new object is created. Transform Dimensions Dimensions null null

SetDimensions(DocumentUnit width, DocumentUnit height)

SetDimensions(DocumentUnit width, DocumentUnit height)

Sets the dimensions of the graphic using pre-configured DocumentUnit values.

Parameters

width
Width as . DocumentUnit
height
Height as . DocumentUnit

Remarks

This overload is useful when you have already created instances with specific units and want to reuse them for dimensions. DocumentUnit

Examples

SetDimensions(double width, double height, Units units)

csharp
1var graphic = new Graphic();
2graphic.SetDimensions(200, 150, Units.pt); // 200pt wide, 150pt tall
3

SetDimensions(DocumentUnit width, DocumentUnit height)

csharp
1var graphic = new Graphic();
2var width = new DocumentUnit(200, Units.pt);
3var height = new DocumentUnit(150, Units.pt);
4graphic.SetDimensions(width, height);
5
VegaRiseVDocs.NET

Reset Password

Enter your email and we'll send you a link to reset your password.

Remember your password? Sign in