Editor.GraphicsView/ViewportAnchorType TransformAnchor { get; set; }

book_4_sparkGenerated
code_blocksInput

Description

The TransformAnchor property of the Editor.GraphicsView class specifies the anchor point used for transformations within the graphics view. This property determines how transformations such as scaling and rotation are applied relative to the viewport.

Usage

Use the TransformAnchor property to set or get the anchor point for transformations in the graphics view. This can be useful when you want to control the pivot point for scaling or rotating the view content.

Possible values for TransformAnchor are defined in the ViewportAnchorType enumeration, which may include options like TopLeft, Center, BottomRight, etc.

Example

// Example of setting the TransformAnchor property
GraphicsView graphicsView = new GraphicsView();
graphicsView.TransformAnchor = ViewportAnchorType.Center;

// This sets the transformation anchor to the center of the viewport,
// meaning any scaling or rotation will occur around the center point.