Open CASCADE Technology
6.5.4
|
A projector framework specific to texts in 2D views.
For a string of text, an insertion point and a font, it
calculates the minimum and maximum points of the text box in the view.
#include <StdSelect_TextProjector2d.hxx>
Public Member Functions | |
StdSelect_TextProjector2d (const Handle< V2d_View > &aView) | |
Constructs a 2D text projector framework defined by the 2D view aView. | |
void | Set (const Handle< V2d_View > &aView) |
Sets the view aView. | |
void | Set (const gp_Trsf2d &atrsf) |
Sets the transformation atrsf. This transformation is applied to the attachment point of the text, and takes the size and length of the text into account to give the upper right hand point of the text box. | |
virtual void | Convert (const gp_Pnt2d &aPointIn, gp_Pnt2d &aPointOut) const |
applies the stored trsf to aPointIn to get aPointOut | |
virtual void | Convert (const TCollection_ExtendedString &aText, const Standard_Real XPos, const Standard_Real YPos, gp_Pnt2d &MinPoint, gp_Pnt2d &MaxPoint, const Standard_Integer afont=-1) const |
XPos,YPos is the AttachPoint for the text.First, the stored Trsf is applied to this point, then we get the size and length of text to give the upper point |
virtual void StdSelect_TextProjector2d::Convert | ( | const gp_Pnt2d & | aPointIn, |
gp_Pnt2d & | aPointOut | ||
) | const [virtual] |
Implements Select2D_Projector.
virtual void StdSelect_TextProjector2d::Convert | ( | const TCollection_ExtendedString & | aText, |
const Standard_Real | XPos, | ||
const Standard_Real | YPos, | ||
gp_Pnt2d & | MinPoint, | ||
gp_Pnt2d & | MaxPoint, | ||
const Standard_Integer | afont = -1 |
||
) | const [virtual] |
void StdSelect_TextProjector2d::Set | ( | const Handle< V2d_View > & | aView | ) |
void StdSelect_TextProjector2d::Set | ( | const gp_Trsf2d & | atrsf | ) |