The Center
property of the GraphicsItem
class represents the central point of the graphical item in local coordinates. It is a Vector2
type, which means it contains two float values representing the X and Y coordinates of the center.
The Center
property of the GraphicsItem
class represents the central point of the graphical item in local coordinates. It is a Vector2
type, which means it contains two float values representing the X and Y coordinates of the center.
Use the Center
property to get or set the central point of a GraphicsItem
. This can be useful for positioning the item within a scene or for aligning it with other items.
// Example of accessing the Center property GraphicsItem item = new GraphicsItem(); Vector2 center = item.Center; // Setting a new center position item.Center = new Vector2(100.0f, 150.0f);