# Visualization
TKV2d
Graphic2d

# Graphic2d_View Class Reference

A View is a graphic object manager.
.

`#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

## Constructor & Destructor Documentation

Standard_EXPORT Graphic2d_View::Graphic2d_View | ( |  | ) |

Graphic2d_View::~Graphic2d_View | ( |  | ) | `[inline]`

## Member Function Documentation

Standard_EXPORT Standard_Integer Graphic2d_View::Add | ( | const Handle(Graphic2d_GraphicObject)& | aGraphicObject,
|  | const Standard_Integer | anAltitude = `1`
| ) | `[private]`

Standard_EXPORT void Graphic2d_View::Add | ( | const Handle(Graphic2d_Buffer)& | aBuffer | ) | `[private]`

Standard_EXPORT Standard_Integer Graphic2d_View::Altitude | ( | const Handle(Graphic2d_GraphicObject)& | aGraphicObject | ) | const`[private]`

Standard_EXPORT Standard_Integer Graphic2d_View::Change | ( | const Handle(Graphic2d_GraphicObject)& | aGraphicObject,
|  | const Standard_Integer | anAltitude
| ) | `[private]`

Standard_EXPORT Standard_Real Graphic2d_View::Convert | ( | const Handle(Graphic2d_ViewMapping)& | aViewMapping,
|  | const Standard_Real | aScalar,
|  | const Standard_Real | aScale
| ) | const

Standard_EXPORT void Graphic2d_View::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_Integer Graphic2d_View::DefaultOverrideColor | ( |  | ) | const

Standard_EXPORT Standard_Real Graphic2d_View::Deflection | ( |  | ) | const

Standard_EXPORT Standard_Real Graphic2d_View::DeflectionCoefficient | ( |  | ) | const

Standard_EXPORT void Graphic2d_View::Destroy | ( |  | ) |

Standard_EXPORT Handle_Graphic2d_DisplayList Graphic2d_View::DisplayList | ( |  | ) | const

Standard_EXPORT Handle_Graphic2d_Drawer Graphic2d_View::Drawer | ( |  | ) | const

Standard_EXPORT void Graphic2d_View::Erase | ( | const Handle(Graphic2d_GraphicObject)& | aGraphicObject | ) | `[private]`

Standard_EXPORT void Graphic2d_View::Erase | ( |  | ) |

Standard_EXPORT const Graphic2d_View::Handle | ( | Standard_Type |  | ) | const

Standard_EXPORT Standard_Boolean Graphic2d_View::IsDefinedColor | ( |  | ) | const

Standard_EXPORT Standard_Boolean Graphic2d_View::IsIn | ( | const Handle(Graphic2d_GraphicObject)& | aGraphicObject | ) | const

Standard_EXPORT void Graphic2d_View::MarkerMinMax | ( | Quantity_Length & | Minx,
|  | Quantity_Length & | Maxx,
|  | Quantity_Length & | Miny,
|  | Quantity_Length & | Maxy
| ) | const

Standard_EXPORT void Graphic2d_View::MarkerMinMax | ( | const Handle(Graphic2d_DisplayList)& | aList,
|  | Quantity_Length & | Minx,
|  | Quantity_Length & | Maxx,
|  | Quantity_Length & | Miny,
|  | Quantity_Length & | Maxy
| ) | const

Standard_EXPORT void Graphic2d_View::MinMax | ( | Quantity_Length & | Minx,
|  | Quantity_Length & | Maxx,
|  | Quantity_Length & | Miny,
|  | Quantity_Length & | Maxy
| ) | const

Standard_EXPORT void Graphic2d_View::MinMax | ( | const Handle(Graphic2d_DisplayList)& | aList,
|  | Quantity_Length & | Minx,
|  | Quantity_Length & | Maxx,
|  | Quantity_Length & | Miny,
|  | Quantity_Length & | Maxy
| ) | const

Standard_EXPORT Handle_Graphic2d_DisplayList Graphic2d_View::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`
| ) |

Standard_EXPORT Handle_Graphic2d_DisplayList Graphic2d_View::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
| ) |

Standard_EXPORT Handle_Graphic2d_DisplayList Graphic2d_View::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
| ) |

Standard_EXPORT Standard_Integer Graphic2d_View::Position | ( | const Handle(Graphic2d_GraphicObject)& | aGraphicObject | ) | const`[private]`

Standard_EXPORT void Graphic2d_View::Remove | ( | const Handle(Graphic2d_Buffer)& | aBuffer | ) | `[private]`

Standard_EXPORT Standard_Integer Graphic2d_View::Remove | ( | const Handle(Graphic2d_GraphicObject)& | aGraphicObject | ) | `[private]`

Standard_EXPORT void Graphic2d_View::Remove | ( |  | ) |

Standard_EXPORT void Graphic2d_View::SetDefaultOverrideColor | ( | const Standard_Integer | anIndex | ) |

Standard_EXPORT void Graphic2d_View::SetDeflection | ( | const Quantity_Length | aDeflection = `0.001` | ) |

Standard_EXPORT void Graphic2d_View::SetDeflectionCoefficient | ( | const Standard_Real | aCoefficient = `0.00033` | ) |

Standard_EXPORT void Graphic2d_View::SetTextPrecision | ( | const Standard_Real | aPrecision = `0.0015` | ) |

Standard_EXPORT void Graphic2d_View::SetTypeOfDeflection | ( | const Aspect_TypeOfDeflection | aTypeOfDeflection = `Aspect_TOD_RELATIVE` | ) |

Standard_EXPORT Standard_Real Graphic2d_View::TextPrecision | ( |  | ) | const

Standard_EXPORT void Graphic2d_View::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`
| ) |

Standard_EXPORT Aspect_TypeOfDeflection Graphic2d_View::TypeOfDeflection | ( |  | ) | const

Standard_EXPORT void Graphic2d_View::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
| ) |

Standard_EXPORT void Graphic2d_View::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
| ) |

Standard_EXPORT void Graphic2d_View::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`
| ) |

## Field Documentation

Graphic2d_SequenceOfBuffer Graphic2d_View::myBuffers `[private]`

Standard_Integer Graphic2d_View::myDefaultOverrideColor `[private]`

Quantity_Length Graphic2d_View::myDeflection `[private]`

Standard_Real Graphic2d_View::myDeflectionCoefficient `[private]`

Handle_Graphic2d_TransientManager Graphic2d_View::myDrawer `[private]`

TColStd_SequenceOfInteger Graphic2d_View::myGraphicAltitudes `[private]`

Graphic2d_SequenceOfGraphicObject Graphic2d_View::myGraphicObjects `[private]`

Standard_Boolean Graphic2d_View::myOverrideColorIsDef `[private]`

Handle_Graphic2d_DisplayList Graphic2d_View::myPickList `[private]`

Standard_ShortReal Graphic2d_View::myScale `[private]`

Standard_ShortReal Graphic2d_View::mySize `[private]`

Standard_ShortReal Graphic2d_View::myTextPrecision `[private]`

Aspect_TypeOfDeflection Graphic2d_View::myTypeOfDeflection `[private]`

Standard_ShortReal Graphic2d_View::myXCenter `[private]`

Standard_ShortReal Graphic2d_View::myXPosition `[private]`

Standard_ShortReal Graphic2d_View::myYCenter `[private]`

Standard_ShortReal Graphic2d_View::myYPosition `[private]`

Standard_ShortReal Graphic2d_View::myZoom `[private]`

The documentation for this class was generated from the following file:

- Graphic2d_View.hxx