Gets or sets the unit of measure used for logical coordinates in this diagram.
Namespace: MindFusion.Diagramming
Assembly: MindFusion.Diagramming
C# Copy Code |
---|
public MeasureUnit MeasureUnit { get; set; } |
Visual Basic Copy Code |
---|
Public Property MeasureUnit As MeasureUnit |
An instance of the MeasureUnit class. The default value is Millimeter.
Many properties in the MindFusion.Diagramming API are used to specify the dimensions of diagram items or the size of various visual elements, for example, selection handles, arrowhead shapes, frame widths, and so on. MeasureUnit specifies the measure of length in which these size values are defined.
Changing the measure unit does not automatically rescale the size-related property values. Your application must set appropriate values to: Bounds, GridSizeX, GridSizeY, GridOffsetX, GridOffsetY, AdjustmentHandlesSize, LinkBaseShapeSize, LinkHeadShapeSize, LinkIntermediateShapeSize, TableCaptionHeight, TableColumnWidth, TableRowHeight, CrossingRadius, ShadowOffsetX, ShadowOffsetY and to the size-related members of RoutingOptions.
Changing the measure unit resets RoutingOptions to default values for the new unit, because performance might suffer greatly if the routing algorithm uses too big or too small GridSize.
The arguments passed to some methods depend on the measure unit too, for example, CreateShapeNode, CreateTableNode, GetNodeAt, GetLinkAt, ZoomToRect.
The following MeasureUnit members provide ready-to-use measure units:
Member name | Description |
---|---|
Specifies centimeters as the unit of measure. | |
Specifies the document unit (1/300 inch) as the unit of measure. | |
Specifies the inch as the unit of measure. | |
Specifies the millimeter as the unit of measure. | |
Specifies a device pixel as the unit of measure. Note that print and on-screen output will differ greatly in size when using pixels because printer pixels are much smaller than screen ones. | |
Specifies a printer's point (1/72 inch) as the unit of measure. | |
Specifies device-independent pixels (1/96 inch) as the unit of measure. |
MindFusion.Diagramming Developer's Guide | © 2024 MindFusion |