#include <Graphic2d_GraphicObject.hxx>
Inheritance diagram for Graphic2d_GraphicObject:
Public Member Functions | |
Standard_EXPORT | Graphic2d_GraphicObject () |
Creates an unattached graphic object, the attachment will be realized more later using the method SetView(). . | |
Standard_EXPORT | Graphic2d_GraphicObject (const Handle(Graphic2d_View)&aView) |
Creates a graphic object in the view <aview>. A graphic object manages a sequence of primitives. By default a graphic object is : - empty. - plottable. - drawable. - pickable. - not displayed. - not highlighted. - a relative drawing priority of 0 . | |
Standard_EXPORT void | SetView (const Handle(Graphic2d_View)&aView) |
Attach the graphic object to this view . | |
Standard_EXPORT void | SetTransform (const gp_GTrsf2d &aTrsf, const Graphic2d_TypeOfComposition aType=Graphic2d_TOC_REPLACE) |
Sets the transformation <atrsf> applied to the primitives according to the composition type. . | |
Standard_EXPORT const gp_GTrsf2d & | Transform () const |
Returns the transformation applied to the primitives. . | |
Standard_EXPORT Standard_Boolean | IsTransformed () const |
Returns Standard_True if the associated transformation is not the Identity. . | |
Standard_EXPORT void | SetLayer (const Standard_Integer aLayer) |
Modifies the layer of the graphic object <me>. . | |
Standard_EXPORT Standard_Integer | Layer () const |
Returns the layer of the graphic object <me>. . | |
Standard_EXPORT void | SetPriority (const Standard_Integer aPriority) |
Modifies the drawing priority of the graphic object <me>. <apriority> of 0 is the lowest priority. <apriority> of MaxPriority() is the highest priority. . | |
Standard_EXPORT Standard_Integer | Priority () const |
Returns the drawing priority of the graphic object . | |
virtual Standard_EXPORT Standard_Integer | MaxPriority () const |
Returns the max usable relative priority of the "standard" graphic object. . | |
Standard_EXPORT void | EnablePlot () |
Allows the drawing of graphic object <me> on a plotter. . | |
Standard_EXPORT void | DisablePlot () |
Forbids the drawing of graphic object <me> on a plotter. . | |
Standard_EXPORT Standard_Boolean | IsPlottable () const |
Returns Standard_True if the graphic object <me> is plottable, Standard_False if not. . | |
Standard_EXPORT void | EnableDraw () |
Allows the drawing of graphic object <me>. . | |
Standard_EXPORT void | DisableDraw () |
Forbids the drawing of graphic object <me>. . | |
Standard_EXPORT Standard_Boolean | IsDrawable () const |
Returns Standard_True if the graphic object <me> is drawable, Standard_False if not. . | |
Standard_EXPORT Standard_Boolean | IsIn (const Handle(Graphic2d_Primitive)&aPrimitive) const |
Returns Standard_True if the primitive <aprimitive> is in the graphic object <me>, Standard_False if not. . | |
Standard_EXPORT void | RemovePrimitive (const Handle(Graphic2d_Primitive)&aPrimitive) |
Removes the primitive <aprimitive> from <me>. . | |
Standard_EXPORT void | RemovePrimitives () |
Removes all the primitives from <me>. . | |
Standard_EXPORT void | Remove () |
Removes <me> from the associated view. If <me> was displayed or highlighted, <me> is removed from the display list of the associated view. . | |
Standard_EXPORT void | EnablePick () |
Allows the picking on the graphic object <me>. . | |
Standard_EXPORT void | DisablePick () |
Forbids the picking on the graphic object <me>. . | |
Standard_EXPORT Standard_Boolean | IsPickable () const |
Returns Standard_True if the graphic object <me> is pickable, Standard_False if not. . | |
Standard_EXPORT void | Display () |
Allows the drawing of the graphic object <me>. . | |
Standard_EXPORT void | Erase () |
Forbids the drawing of the graphic object <me>. . | |
Standard_EXPORT Standard_Boolean | IsDisplayed () const |
Returns Standard_True if the graphic object <me> is displayed, Standard_False if not. . | |
Standard_EXPORT void | Highlight () |
Highlights the graphic object <me> with the override color of the view. . | |
Standard_EXPORT void | Highlight (const Standard_Integer aColorIndex) |
Highlights the graphic object <me> with the specified color. . | |
Standard_EXPORT void | Unhighlight () |
Suppress the highlight the graphic object <me>. . | |
Standard_EXPORT Standard_Boolean | IsHighlighted () const |
Returns Standard_True if the graphic object <me> is highlighted, Standard_False if not. . | |
Standard_EXPORT void | SetOffSet (const Standard_Integer anOffSet) |
Specifies an offset applied to the original color index when drawing a primitives, those already created and the future one. Warning: To reset the real color of the primitives when drawing then you have to call this method with <anoffset> = 0. . | |
Standard_EXPORT Standard_Integer | OffSet () const |
Returns the offset applied to the original color index of all primitives in the graphic object <me>. . | |
Standard_EXPORT Standard_Integer | OverrideColor () const |
Returns the current overridel color apply to this graphic object. . | |
Standard_EXPORT void | SetOverrideColor (const Standard_Integer indColor) |
Sets the current overridel color apply to this graphic object. . | |
Standard_EXPORT Standard_Integer | Length () const |
Returns the number of primitive of the graphic object. . | |
Standard_EXPORT Handle_Graphic2d_Primitive | Primitive (const Standard_Integer aRank) const |
Returns the primitive of rank <arank> . | |
virtual Standard_EXPORT Standard_Boolean | MinMax (Quantity_Length &Minx, Quantity_Length &Maxx, Quantity_Length &Miny, Quantity_Length &Maxy) const |
Returns the min max values of <me>. Warning: All markers are ignored. Warning: If <me> is empty or not displayed or contains markers and nothing else returns FALSE and Minx = Miny = RealFirst () Maxx = Maxy = RealLast () . | |
virtual Standard_EXPORT Standard_Boolean | MarkerMinMax (Quantity_Length &Minx, Quantity_Length &Maxx, Quantity_Length &Miny, Quantity_Length &Maxy) const |
Returns the min max values of all markers in <me>. Warning: If <me> is empty or not displayed or without markers returns FALSE and Minx = Miny = RealFirst () Maxx = Maxy = RealLast () . | |
Standard_EXPORT Standard_Integer | PickedIndex () const |
Returns the last picked primitive index in this. Warning: This is available only if the Pick() method has returned Standard_True. . | |
Standard_EXPORT Handle_TColStd_HSequenceOfInteger | PickList () const |
Returns the sequence of picked primitives. . | |
Standard_EXPORT const | Handle (Standard_Type)&DynamicType() const |
Protected Member Functions | |
Standard_EXPORT void | SetPickedIndex (const Standard_Integer anIndex) |
Sets the index of the picked primitive if any. . | |
virtual Standard_EXPORT void | Draw (const Handle(Graphic2d_Drawer)&aDrawer, const Standard_Boolean Reset) |
Drawn the last Undrawn primitives managed by the graphic object <me> in the drawer <adrawer>. Called by the methods : - Graphic2d_View::TinyUpdate () . | |
virtual Standard_EXPORT void | Draw (const Handle(Graphic2d_Drawer)&aDrawer, const Handle(Graphic2d_Primitive)&aPrimitive) |
Drawn a primitive managed by the graphic object <me> in the drawer <adrawer>. Called by the method Graphic2d_View::Update (aPrimitive) . | |
virtual Standard_EXPORT Standard_Boolean | Pick (const Standard_Real X, const Standard_Real Y, const Standard_Real aPrecision, const Handle(Graphic2d_Drawer)&aDrawer) |
Returns Standard_True if the graphic object <me> is picked, Standard_False if not. Called by the method Graphic2d_View::Pick . | |
virtual Standard_EXPORT Standard_Boolean | PickByCircle (const Standard_Real X, const Standard_Real Y, const Standard_Real Radius, const Handle(Graphic2d_Drawer)&aDrawer) |
Returns Standard_True if the graphic object <me> is picked, Standard_False if not. Called by the method Graphic2d_View::PickByCircle . | |
virtual Standard_EXPORT Standard_Boolean | Pick (const Standard_Real Xmin, const Standard_Real Ymin, const Standard_Real Xmax, const Standard_Real Ymax, const Handle(Graphic2d_Drawer)&aDrawer, const Graphic2d_PickMode aPickMode=Graphic2d_PM_INCLUDE) |
Returns Standard_True if the primitive <me> is: included in rectangle (<aPickMode = PM_INCLUDE>), excluded from rectangle (<aPickMode = PM_EXLUDE>), intersected by rectangle (<aPickMode = PM_INTERSECT>), defined by Xmin, Ymin, Xmax, Ymax. Standard_False if not. . | |
Standard_EXPORT Standard_Boolean | IsUpToDate () const |
Returns TRUE when the graphic object is up to date at screen; . | |
Protected Attributes | |
Standard_Integer | myOverrideColor |
Standard_Integer | myCurrentIndex |
Standard_Integer | myOffSet |
Standard_Boolean | myIsUpToDate |
Standard_Boolean | myIsTransformed |
Private Member Functions | |
Standard_EXPORT void | Redraw (const Handle(Graphic2d_Drawer)&aDrawer) |
Drawn all the primitives managed by the graphic object <me> in the drawer <adrawer>. Called by the method : - Graphic2d_View::Update (aViewMapping, x, y, scale) . | |
Standard_EXPORT Handle_Graphic2d_View | View () const |
Returns the view which manages <me>. Called by the constructor of Primitive. . | |
Standard_EXPORT void | AddPrimitive (const Handle(Graphic2d_Primitive)&aPrimitive) |
Adds the primitive <aprimitive> in <me>. Called by the constructor of Primitive. . | |
Standard_EXPORT void | SetIndex (const Handle(Graphic2d_Primitive)&aPrimitive) |
Sets the current index in the GraphicObject <me> to the index of the primitive <aprimitive>. . | |
virtual Standard_EXPORT Standard_Integer | BasePriority () const |
Returns the min usable absolute priority of the "standard" graphic object. . | |
Private Attributes | |
Graphic2d_ViewPtr | myViewPtr |
TColStd_IndexedMapOfTransient | myPrimitives |
Standard_Integer | myLayer |
gp_GTrsf2d | myTrsf |
Graphic2d_CBitFields8 | myCBitFields |
Standard_Integer | myPickedIndex |
Standard_Integer | myPriority |
Handle_TColStd_HSequenceOfInteger | myPickIndices |
Graphic2d_DisplayStatus | myDisplayStatus |
|
|
|
|
|
|
|
Reimplemented in Graphic2d_HidingGraphicObject, and V2d_BackgroundGraphicObject. |
|
|
|
|
|
|
|
|
|
Reimplemented in Graphic2d_HidingGraphicObject. |
|
Reimplemented in Graphic2d_HidingGraphicObject. |
|
|
|
|
|
|
|
|
|
Reimplemented in AIS2D_InteractiveObject, AIS2D_ProjShape, Graphic2d_HidingGraphicObject, and V2d_BackgroundGraphicObject. |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Reimplemented in Graphic2d_HidingGraphicObject, and V2d_BackgroundGraphicObject. |
|
Reimplemented in Graphic2d_HidingGraphicObject. |
|
|
|
|
|
|
|
Reimplemented in Graphic2d_HidingGraphicObject. |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|