#include <Graphic2d_View.hxx>
Public Member Functions | |
Standard_EXPORT | Graphic2d_View () |
Creates a view. A view is a set of graphic objects. The view manages this set. . | |
Standard_EXPORT void | Remove () |
Removes all the graphic objects from the view <me>. . | |
Standard_EXPORT void | Erase () |
Forbids the drawing of all graphic objects in <me>. . | |
Standard_EXPORT void | Destroy () |
Deletes <me> . | |
~Graphic2d_View () | |
Standard_EXPORT void | Update (const Handle(Aspect_Driver)&aDriver, const Handle(Graphic2d_ViewMapping)&aViewMapping, const Standard_Real aXPosition, const Standard_Real aYPosition, const Standard_Real aScale, const Standard_Boolean ClearBefore=Standard_True) |
Fully updates the driver <adriver> in function of modifications of the graphic objects displayed in the view <me>. <aviewmapping> defines the "map from". <axposition>, <ayposition>, <ascale> define the "map to". The entire window which supporting the view will be cleared before if <clearbefore> flag is TRUE. . | |
Standard_EXPORT void | TinyUpdate (const Handle(Aspect_Driver)&aDriver, const Handle(Graphic2d_ViewMapping)&aViewMapping, const Standard_Real aXPosition, const Standard_Real aYPosition, const Standard_Real aScale, const Standard_Boolean Reset=Standard_False) |
Partially updates the driver <adriver> in function of modifications of the graphic objects displayed in the view <me> with the defined mapping parameters and reset the update pointer if <reset> is TRUE. Warning: Only the new primitives created since the last Update are drawn. All others primitives are in the fixed background. . | |
Standard_EXPORT void | Update (const Handle(Aspect_Driver)&aDriver, const Handle(Graphic2d_GraphicObject)&aGraphicObject, const Handle(Graphic2d_ViewMapping)&aViewMapping, const Standard_Real aXPosition, const Standard_Real aYPosition, const Standard_Real aScale) |
Partially updates the driver <adriver> with the graphic object <agraphicobject> in the the view <me> with the defined mapping parameters. . | |
Standard_EXPORT void | Update (const Handle(Aspect_Driver)&aDriver, const Handle(Graphic2d_Primitive)&aPrimitive, const Handle(Graphic2d_ViewMapping)&aViewMapping, const Standard_Real aXPosition, const Standard_Real aYPosition, const Standard_Real aScale) |
Partially updates the driver <adriver> with the primitive <aprimitive> in the the view <me> with the defined mapping parameters. . | |
Standard_EXPORT Handle_Graphic2d_DisplayList | DisplayList () const |
Returns the list of graphic objects displayed in <me>. . | |
Standard_EXPORT Standard_Boolean | IsIn (const Handle(Graphic2d_GraphicObject)&aGraphicObject) const |
Returns Standard_True if the graphic object <agraphicobject> is displayed in <me>, Standard_False if not. . | |
Standard_EXPORT void | MinMax (const Handle(Graphic2d_DisplayList)&aList, Quantity_Length &Minx, Quantity_Length &Maxx, Quantity_Length &Miny, Quantity_Length &Maxy) const |
Returns the coordinates of the boundary box of all graphic objects referenced in the list <alist>. Warning: All markers are ignored. Warning: If <alist> is empty or contains markers and nothing else returns Minx = Miny = RealLast () and returns Maxx = Maxy = RealFirst () . | |
Standard_EXPORT void | MinMax (Quantity_Length &Minx, Quantity_Length &Maxx, Quantity_Length &Miny, Quantity_Length &Maxy) const |
Returns the coordinates of the boundary box of all graphic objects displayed in the view <me>. Warning: All markers are ignored. Warning: If <me> is empty or contains markers and nothing else returns Minx = Miny = RealLast () and returns Maxx = Maxy = RealFirst () . | |
Standard_EXPORT void | MarkerMinMax (const Handle(Graphic2d_DisplayList)&aList, Quantity_Length &Minx, Quantity_Length &Maxx, Quantity_Length &Miny, Quantity_Length &Maxy) const |
Returns the coordinates of the boundary box of all markers referenced in the graphic objects referenced in the list <alist>. Warning: If <alist> is empty or without markers returns Minx = Miny = RealLast () and returns Maxx = Maxy = RealFirst () . | |
Standard_EXPORT void | MarkerMinMax (Quantity_Length &Minx, Quantity_Length &Maxx, Quantity_Length &Miny, Quantity_Length &Maxy) const |
Returns the coordinates of the boundary box of all markers referenced in the graphic objects displayed in the view <me>. Warning: If <me> is empty or without markers returns Minx = Miny = RealLast () and returns Maxx = Maxy = RealFirst () . | |
Standard_EXPORT Handle_Graphic2d_DisplayList | Pick (const Handle(Graphic2d_ViewMapping)&aViewMapping, const Standard_Real X, const Standard_Real Y, const Standard_Real aPrecision, const Standard_Real aXPosition, const Standard_Real aYPosition, const Standard_Real aScale) |
Returns the list of graphic objects picked. . | |
Standard_EXPORT Handle_Graphic2d_DisplayList | PickByCircle (const Handle(Graphic2d_ViewMapping)&aViewMapping, const Standard_Real X, const Standard_Real Y, const Standard_Real Radius, const Standard_Real aXPosition, const Standard_Real aYPosition, const Standard_Real aScale) |
Returns the list of graphic objects picked. . | |
Standard_EXPORT Handle_Graphic2d_DisplayList | Pick (const Handle(Graphic2d_ViewMapping)&aViewMapping, const Standard_Real Xmin, const Standard_Real Ymin, const Standard_Real Xmax, const Standard_Real Ymax, const Standard_Real aXPosition, const Standard_Real aYPosition, const Standard_Real aScale, 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_Integer | DefaultOverrideColor () const |
Returns the override color index. . | |
Standard_EXPORT Standard_Boolean | IsDefinedColor () const |
Returns Standard_True if the override color index is defined, Standard_False if not. . | |
Standard_EXPORT void | SetDefaultOverrideColor (const Standard_Integer anIndex) |
Sets the override color index. . | |
Standard_EXPORT void | SetTypeOfDeflection (const Aspect_TypeOfDeflection aTypeOfDeflection=Aspect_TOD_RELATIVE) |
by default: TOD_RELATIVE; However, except for the shapes, the drawing will be made using the absolute deflection. | |
Standard_EXPORT Aspect_TypeOfDeflection | TypeOfDeflection () const |
Returns the deflection type. . | |
Standard_EXPORT void | SetDeflection (const Quantity_Length aDeflection=0.001) |
Sets the absolute deflection value. . | |
Standard_EXPORT Standard_Real | Deflection () const |
Returns the absolute deflection value. . | |
Standard_EXPORT void | SetDeflectionCoefficient (const Standard_Real aCoefficient=0.00033) |
Sets the relative deflection coefficient. default value = 0.00033 . | |
Standard_EXPORT Standard_Real | DeflectionCoefficient () const |
Returns the relative deflection coefficient. . | |
Standard_EXPORT void | SetTextPrecision (const Standard_Real aPrecision=0.0015) |
Sets the MIN viewable text height precision in Device space, the texts whose the size is < to this precision is drawn at screen with an outlined or filled rectangle. The default text precision value is 0.0015 . | |
Standard_EXPORT Standard_Real | TextPrecision () const |
Returns the text precision. . | |
Standard_EXPORT void | Convert (const Handle(Graphic2d_ViewMapping)&aViewMapping, const Standard_Real aDrawPositionX, const Standard_Real aDrawPositionY, const Standard_Real aXPosition, const Standard_Real aYPosition, const Standard_Real aScale, Standard_Real &aX, Standard_Real &aY) const |
???? | |
Standard_EXPORT Standard_Real | Convert (const Handle(Graphic2d_ViewMapping)&aViewMapping, const Standard_Real aScalar, const Standard_Real aScale) const |
???? | |
Standard_EXPORT Handle_Graphic2d_Drawer | Drawer () const |
Returns the attached drawer of this view. . | |
Standard_EXPORT const | Handle (Standard_Type)&DynamicType() const |
Private Member Functions | |
Standard_EXPORT void | Add (const Handle(Graphic2d_Buffer)&aBuffer) |
Adds the grafic buffer <abuffer> in the view <me>. Warning: Called by the constructor of <abuffer> . | |
Standard_EXPORT Standard_Integer | Add (const Handle(Graphic2d_GraphicObject)&aGraphicObject, const Standard_Integer anAltitude=1) |
Adds the graphic object <agraphicobject> in the view <me> at the altitude <analtitude>. and returns the rank of the object in the display-list. Warning: Called by the constructor of <agraphicobject> . | |
Standard_EXPORT Standard_Integer | Change (const Handle(Graphic2d_GraphicObject)&aGraphicObject, const Standard_Integer anAltitude) |
Changes the altitude <analtitude> of the graphic object <agraphicobject> and returns the updated rank of the object in the display-list. . | |
Standard_EXPORT Standard_Integer | Remove (const Handle(Graphic2d_GraphicObject)&aGraphicObject) |
Removes the graphic object <agraphicobject> from the view <me>. and returns the previous rank of the deleted object in the display-list. . | |
Standard_EXPORT void | Remove (const Handle(Graphic2d_Buffer)&aBuffer) |
Removes the graphic buffer <abuffer> from the view <me>. . | |
Standard_EXPORT void | Erase (const Handle(Graphic2d_GraphicObject)&aGraphicObject) |
Forbids the drawing of the specified graphic object in <me>. . | |
Standard_EXPORT Standard_Integer | Position (const Handle(Graphic2d_GraphicObject)&aGraphicObject) const |
Returns the rank of the graphic object <agraphicobject> in the display-list. . | |
Standard_EXPORT Standard_Integer | Altitude (const Handle(Graphic2d_GraphicObject)&aGraphicObject) const |
Returns the altitude of the graphic object <agraphicobject> in the display-list. . | |
Private Attributes | |
Graphic2d_SequenceOfGraphicObject | myGraphicObjects |
TColStd_SequenceOfInteger | myGraphicAltitudes |
Graphic2d_SequenceOfBuffer | myBuffers |
Handle_Graphic2d_DisplayList | myPickList |
Standard_Integer | myDefaultOverrideColor |
Standard_Boolean | myOverrideColorIsDef |
Quantity_Length | myDeflection |
Standard_Real | myDeflectionCoefficient |
Aspect_TypeOfDeflection | myTypeOfDeflection |
Handle_Graphic2d_TransientManager | myDrawer |
Standard_ShortReal | myXCenter |
Standard_ShortReal | myYCenter |
Standard_ShortReal | mySize |
Standard_ShortReal | myXPosition |
Standard_ShortReal | myYPosition |
Standard_ShortReal | myScale |
Standard_ShortReal | myZoom |
Standard_ShortReal | myTextPrecision |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|