OCC Main Page | Visualization | Toolkits | Packages | Class Hierarchy | Data Structures | File List | Data Fields | Globals

Visualization
TKV3d
Visual3d


Visual3d_Layer Class Reference

This class allows to manage 2d graphics.
.

#include <Visual3d_Layer.hxx>


Public Member Functions

Standard_EXPORT Visual3d_Layer (const Handle(Visual3d_ViewManager)&AViewer, const Aspect_TypeOfLayer AType=Aspect_TOL_OVERLAY, const Standard_Boolean AFlag=Standard_False)
 Creates a layer with the type <atype>.
if <aflag> == Standard_True then the layer is
"size dependent".
The mapping of the layer is dependent of each
window's size.
if <aflag> == Standard_False then the mapping of the
layer is dependent of the highest window and the largest
window of all the views of the viewer <aviewer>.
When the viewer <aviewer> have only one view, the
result will be the same with <aflag> == Standard_False
or <aflag> == Standard_True.
.
Standard_EXPORT void Destroy ()
 Suppress the layer <me>.
.
 ~Visual3d_Layer ()
Standard_EXPORT void Begin ()
 Begins the definition of the layer <me>
Warning: No default attributes
.
Standard_EXPORT void End ()
 Finishs the definition of the layer <me>.
.
Standard_EXPORT void Clear ()
 Clear all graphics managed by the layer <me>.
.
Standard_EXPORT void BeginPolyline ()
 After this call, <me> is ready to receive
a definition of a polyline with AddVertex().
.
Standard_EXPORT void BeginPolygon ()
 After this call, <me> is ready to receive
a definition of a polygon with AddEdge().
.
Standard_EXPORT void AddVertex (const Standard_Real X, const Standard_Real Y, const Standard_Boolean AFlag=Standard_True)
 Puts <X, Y> as a new point in the current primitive.
If <aflag> then it is a draw between last point and
this point else it is a move between last point and
this point.
.
Standard_EXPORT void ClosePrimitive ()
 After this call, <me> stops the reception of
a definition of a Begin... primitive.
.
Standard_EXPORT void DrawRectangle (const Standard_Real X, const Standard_Real Y, const Standard_Real Width, const Standard_Real Height)
 Draws the rectangle at position <X,Y>.
.
Standard_EXPORT void DrawText (const Standard_CString AText, const Standard_Real X, const Standard_Real Y, const Standard_Real AHeight)
 Draws the string <atext> at position <X,Y>.
The attributes are given with respect to the plane of
projection.
<aheight> : Height of text.
(Relative to the Normalized Projection
Coordinates (NPC) Space).
.
Standard_EXPORT void TextSize (const Standard_CString AText, const Standard_Real AHeight, Standard_Real &AWidth, Standard_Real &AnAscent, Standard_Real &ADescent) const
 Get the size of text.
The attributes are given with respect to the plane of
projection.
<aheight> : Height of text.
(Relative to the Normalized Projection
Coordinates (NPC) Space).
.
Standard_EXPORT void SetColor (const Quantity_Color &AColor)
 Modifies the current color.
Warning: No default color
.
Standard_EXPORT void SetTransparency (const Standard_ShortReal ATransparency)
 Modifies the current transparency.
Warning: No default transparency
.
Standard_EXPORT void UnsetTransparency ()
 Unsets the transparency.
.
Standard_EXPORT void SetLineAttributes (const Aspect_TypeOfLine AType, const Standard_Real AWidth)
 Modifies the current lines attributes.
Warning: No default attributes
.
Standard_EXPORT void SetTextAttributes (const Graphic3d_NameOfFont AFont, const Aspect_TypeOfDisplayText AType, const Quantity_Color &AColor)
 Modifies the current texts attributes.
Warning: No default attributes
.
Standard_EXPORT void SetOrtho (const Standard_Real Left, const Standard_Real Right, const Standard_Real Bottom, const Standard_Real Top, const Aspect_TypeOfConstraint Attach=Aspect_TOC_BOTTOM_LEFT)
 Modifies the current coordinates system of the layer <me>.
.
Standard_EXPORT void SetViewport (const Standard_Integer Width, const Standard_Integer Height)
 Modifies the current viewport of the layer <me>.
.
Standard_EXPORT Aspect_CLayer2d CLayer () const
 Returns the associated C structure.
.
Standard_EXPORT Aspect_TypeOfLayer Type () const
 Returns the type.
.
Standard_EXPORT const Handle (Standard_Type)&DynamicType() const

Private Attributes

Handle_Graphic3d_GraphicDriver MyGraphicDriver
Aspect_CLayer2d MyCLayer
Standard_Address MyPtrViewManager


Constructor & Destructor Documentation

Standard_EXPORT Visual3d_Layer::Visual3d_Layer const Handle(Visual3d_ViewManager)&  AViewer,
const Aspect_TypeOfLayer  AType = Aspect_TOL_OVERLAY,
const Standard_Boolean  AFlag = Standard_False
 

Visual3d_Layer::~Visual3d_Layer  )  [inline]
 


Member Function Documentation

Standard_EXPORT void Visual3d_Layer::AddVertex const Standard_Real  X,
const Standard_Real  Y,
const Standard_Boolean  AFlag = Standard_True
 

Standard_EXPORT void Visual3d_Layer::Begin  ) 
 

Standard_EXPORT void Visual3d_Layer::BeginPolygon  ) 
 

Standard_EXPORT void Visual3d_Layer::BeginPolyline  ) 
 

Standard_EXPORT Aspect_CLayer2d Visual3d_Layer::CLayer  )  const
 

Standard_EXPORT void Visual3d_Layer::Clear  ) 
 

Standard_EXPORT void Visual3d_Layer::ClosePrimitive  ) 
 

Standard_EXPORT void Visual3d_Layer::Destroy  ) 
 

Standard_EXPORT void Visual3d_Layer::DrawRectangle const Standard_Real  X,
const Standard_Real  Y,
const Standard_Real  Width,
const Standard_Real  Height
 

Standard_EXPORT void Visual3d_Layer::DrawText const Standard_CString  AText,
const Standard_Real  X,
const Standard_Real  Y,
const Standard_Real  AHeight
 

Standard_EXPORT void Visual3d_Layer::End  ) 
 

Standard_EXPORT const Visual3d_Layer::Handle Standard_Type   )  const
 

Standard_EXPORT void Visual3d_Layer::SetColor const Quantity_Color &  AColor  ) 
 

Standard_EXPORT void Visual3d_Layer::SetLineAttributes const Aspect_TypeOfLine  AType,
const Standard_Real  AWidth
 

Standard_EXPORT void Visual3d_Layer::SetOrtho const Standard_Real  Left,
const Standard_Real  Right,
const Standard_Real  Bottom,
const Standard_Real  Top,
const Aspect_TypeOfConstraint  Attach = Aspect_TOC_BOTTOM_LEFT
 

Standard_EXPORT void Visual3d_Layer::SetTextAttributes const Graphic3d_NameOfFont  AFont,
const Aspect_TypeOfDisplayText  AType,
const Quantity_Color &  AColor
 

Standard_EXPORT void Visual3d_Layer::SetTransparency const Standard_ShortReal  ATransparency  ) 
 

Standard_EXPORT void Visual3d_Layer::SetViewport const Standard_Integer  Width,
const Standard_Integer  Height
 

Standard_EXPORT void Visual3d_Layer::TextSize const Standard_CString  AText,
const Standard_Real  AHeight,
Standard_Real &  AWidth,
Standard_Real &  AnAscent,
Standard_Real &  ADescent
const
 

Standard_EXPORT Aspect_TypeOfLayer Visual3d_Layer::Type  )  const
 

Standard_EXPORT void Visual3d_Layer::UnsetTransparency  ) 
 


Field Documentation

Aspect_CLayer2d Visual3d_Layer::MyCLayer [private]
 

Handle_Graphic3d_GraphicDriver Visual3d_Layer::MyGraphicDriver [private]
 

Standard_Address Visual3d_Layer::MyPtrViewManager [private]
 


The documentation for this class was generated from the following file:
Generated on Mon Aug 25 13:56:28 2008 for OpenCASCADE by  doxygen 1.4.1