class GraphicsView : Widget

book_4_sparkGenerated
code_blocksInput

Description

The GraphicsView class in the Editor namespace is a specialized widget for rendering and interacting with graphical items in a scene. It provides functionality for manipulating the view, such as zooming, translating, and centering, as well as managing graphical items within the scene.

Members

Instance Methods

Member Name Summary
Capture Captures the current view to a specified file path.
Zoom Adjusts the zoom level of the view based on a specified factor and position.
Translate Translates the view by a specified vector.
ToScene Converts a position or rectangle from view coordinates to scene coordinates.
FromScene Converts a position or rectangle from scene coordinates to view coordinates.
DeleteAllItems Removes all items from the scene.
CenterOn Centers the view on a specified point in the scene.
FitInView Adjusts the view to fit a specified rectangle within the scene.
SetBackgroundImage Sets the background image of the view using a file path or a pixmap.
GetItemAt Retrieves the graphical item at a specified scene position.
Add Adds a graphical item or widget to the scene.

Instance Properties

Member Name Summary
SceneRect Gets or sets the rectangle representing the scene's boundaries.
SelectionRect All items inside this rectangle will be selected.
Center Indicates where in the scene the view is currently centered.
Scale Gets or sets the scale of the view.
Rotation Gets or sets the rotation angle of the view.
SelectedItems Gets the collection of currently selected items in the scene.
Items Gets the collection of all items in the scene.
HorizontalScrollbar Gets or sets the mode of the horizontal scrollbar.
VerticalScrollbar Gets or sets the mode of the vertical scrollbar.
TransformAnchor Gets or sets the anchor type for transformations.
OnSelectionChanged Event triggered when the selection changes.
DragType Determines the behavior when the user drags the mouse.
Antialiasing Gets or sets whether antialiasing is enabled.
TextAntialiasing Gets or sets whether text antialiasing is enabled.
BilinearFiltering Gets or sets whether bilinear filtering is enabled.