Open CASCADE Technology
6.5.4
|
A View is a graphic object manager.
#include <Graphic2d_View.hxx>
Public Member Functions | |
Graphic2d_View () | |
Creates a view. A view is a set of graphic objects. The view manages this set. | |
void | Remove () |
Removes all the graphic objects from the view <me>. | |
void | Erase () |
Forbids the drawing of all graphic objects in <me>. | |
void | Destroy () |
Deletes <me> | |
~Graphic2d_View () | |
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. | |
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. | |
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. | |
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. | |
Handle_Graphic2d_DisplayList | DisplayList () const |
Returns the list of graphic objects displayed in <me>. | |
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. | |
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 () | |
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 () | |
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 () | |
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 () | |
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. | |
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. | |
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_Integer | DefaultOverrideColor () const |
Returns the override color index. | |
Standard_Boolean | IsDefinedColor () const |
Returns Standard_True if the override color index is defined, Standard_False if not. | |
void | SetDefaultOverrideColor (const Standard_Integer anIndex) |
Sets the override color index. | |
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. | |
Aspect_TypeOfDeflection | TypeOfDeflection () const |
Returns the deflection type. | |
void | SetDeflection (const Quantity_Length aDeflection=0.001) |
Sets the absolute deflection value. | |
Standard_Real | Deflection () const |
Returns the absolute deflection value. | |
void | SetDeflectionCoefficient (const Standard_Real aCoefficient=0.00033) |
Sets the relative deflection coefficient. default value = 0.00033 | |
Standard_Real | DeflectionCoefficient () const |
Returns the relative deflection coefficient. | |
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_Real | TextPrecision () const |
Returns the text precision. | |
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_Real | Convert (const Handle< Graphic2d_ViewMapping > &aViewMapping, const Standard_Real aScalar, const Standard_Real aScale) const |
???? | |
Handle_Graphic2d_Drawer | Drawer () const |
Returns the attached drawer of this view. |
Graphic2d_View::~Graphic2d_View | ( | ) | [inline] |
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_Real Graphic2d_View::Convert | ( | const Handle< Graphic2d_ViewMapping > & | aViewMapping, |
const Standard_Real | aScalar, | ||
const Standard_Real | aScale | ||
) | const |
Standard_Real Graphic2d_View::Deflection | ( | ) | const |
Handle_Graphic2d_DisplayList Graphic2d_View::DisplayList | ( | ) | const |
Handle_Graphic2d_Drawer Graphic2d_View::Drawer | ( | ) | const |
Standard_Boolean Graphic2d_View::IsIn | ( | const Handle< Graphic2d_GraphicObject > & | aGraphicObject | ) | const |
void Graphic2d_View::MarkerMinMax | ( | const Handle< Graphic2d_DisplayList > & | aList, |
Quantity_Length & | Minx, | ||
Quantity_Length & | Maxx, | ||
Quantity_Length & | Miny, | ||
Quantity_Length & | Maxy | ||
) | const |
void Graphic2d_View::MarkerMinMax | ( | Quantity_Length & | Minx, |
Quantity_Length & | Maxx, | ||
Quantity_Length & | Miny, | ||
Quantity_Length & | Maxy | ||
) | const |
void Graphic2d_View::MinMax | ( | const Handle< Graphic2d_DisplayList > & | aList, |
Quantity_Length & | Minx, | ||
Quantity_Length & | Maxx, | ||
Quantity_Length & | Miny, | ||
Quantity_Length & | Maxy | ||
) | const |
void Graphic2d_View::MinMax | ( | Quantity_Length & | Minx, |
Quantity_Length & | Maxx, | ||
Quantity_Length & | Miny, | ||
Quantity_Length & | Maxy | ||
) | const |
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 | ||
) |
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 |
||
) |
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 | ||
) |
void Graphic2d_View::SetDeflection | ( | const Quantity_Length | aDeflection = 0.001 | ) |
void Graphic2d_View::SetDeflectionCoefficient | ( | const Standard_Real | aCoefficient = 0.00033 | ) |
void Graphic2d_View::SetTextPrecision | ( | const Standard_Real | aPrecision = 0.0015 | ) |
void Graphic2d_View::SetTypeOfDeflection | ( | const Aspect_TypeOfDeflection | aTypeOfDeflection = Aspect_TOD_RELATIVE | ) |
Standard_Real Graphic2d_View::TextPrecision | ( | ) | const |
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 |
||
) |
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 |
||
) |
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 | ||
) |
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 | ||
) |