Description
The PrepareGeometryChange
method is a public instance method of the Editor.GraphicsItem
class. It is typically invoked before resizing graphical items to ensure that they are painted correctly. This method is crucial for maintaining the visual integrity of items when their geometry is altered.
Usage
Call PrepareGeometryChange
on an instance of GraphicsItem
before making any changes to the item's size or shape. This prepares the item for the upcoming changes, ensuring that any necessary adjustments are made to its rendering.
Example
// Example usage of PrepareGeometryChange
GraphicsItem item = new GraphicsItem();
// Before resizing the item, prepare it for geometry change
item.PrepareGeometryChange();
// Now you can safely resize the item
item.Size = new Vector2(100, 200);