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

Visualization
TKService
Aspect


Aspect_FontStyle Class Reference

This class defines a Font Style.
The Style can be Predefined or defined by the user
.

#include <Aspect_FontStyle.hxx>


Public Member Functions

void * operator new (size_t, void *anAddress)
void * operator new (size_t size)
void operator delete (void *anAddress)
Standard_EXPORT Aspect_FontStyle ()
 Creates a font style with the default values of
FontStyle type : DEFAULT
.
Standard_EXPORT Aspect_FontStyle (const Aspect_TypeOfFont Type, const Quantity_Length Size, const Quantity_PlaneAngle Slant=0.0, const Standard_Boolean CapsHeight=Standard_False)
 Creates the font style <type> depending of
Size given in the basic LENGTH unit and Slant in
the basic PLANE ANGLE unit.
When CapsHeight is TRUE the size defines the
ascent height of the font;if FALSE,the size
defines the ascent+descent part of the font.
.
Standard_EXPORT Aspect_FontStyle (const Standard_CString Style, const Quantity_Length Size, const Quantity_PlaneAngle Slant=0.0, const Standard_Boolean CapsHeight=Standard_False)
 Creates a font style from Adobe font style descriptor
depending of Size given in MM and Slant in RADIAN.
When CapsHeight is TRUE the size defines the
ascent height of the font;if FALSE,the size
defines the ascent+descent part of the font.
Font Style Descriptor must be :
Simple form is "family" Ex: "helvetica"
More complex form is "family-weight" Ex: "helvetica-bold"
Full form is :
"-foundry-family-weight-slant-swdth-adstyl-pixelsize"
"-pointsize-resx-resy-spacing-avgWidth-registry-encoding"
where each field must be replaced by an "*"
Warning: create the smalest font size if the foundry height
.
Standard_EXPORT Aspect_FontStyle (const Standard_CString Style)
 Creates a transformable font with the full font name <style>
given in the XLFD descriptor :
"-foundry-family-weight-slant-swidth-adstyl-pixelsize-pointsize- <br> resx-resy-spacing-avdWidth-registry-encoding".
The fields pixelsize ,pointsize,resx,resy are sets to 0
and all unknown fields sets to '*'.
Example: "adobe-helvetica-bold-*-*-*-0-0-0-0-*-*-iso8859-*"
Warning: the height and slant of the font is supposed to be NULL
and computed dynamically at the drawing text time.
.
Standard_EXPORT Aspect_FontStyleAssign (const Aspect_FontStyle &Other)
 Updates the font style <me> from the definition of the
font style <other>.
.
Aspect_FontStyleoperator= (const Aspect_FontStyle &Other)
Standard_EXPORT void SetValues (const Aspect_TypeOfFont Type, const Quantity_Length Size, const Quantity_PlaneAngle Slant=0.0, const Standard_Boolean CapsHeight=Standard_False)
 Updates the font style <me> from the definition of the
font style <type>.
.
Standard_EXPORT void SetValues (const Standard_CString Style, const Quantity_Length Size, const Quantity_PlaneAngle Slant=0.0, const Standard_Boolean CapsHeight=Standard_False)
 Updates a font style with the new Abode font descriptor
Warning: create the smalest font size if the foundry height
.
Standard_EXPORT void SetValues (const Standard_CString Style)
 Updates a font style with the new XLFD font descriptor
.
Standard_EXPORT void SetFamily (const Standard_CString aName)
 Sets the family of the font.
.
Standard_EXPORT void SetWeight (const Standard_CString aName)
 Sets the weight of the font.
.
Standard_EXPORT void SetRegistry (const Standard_CString aName)
 Sets the registry of the font.
.
Standard_EXPORT void SetEncoding (const Standard_CString aName)
 Sets the encoding of the font.
.
Standard_EXPORT Aspect_TypeOfFont Style () const
 Returns the type of the font style <me>
.
Standard_EXPORT Standard_Integer Length () const
 Returns the string components length of the
font style descriptor
.
Standard_EXPORT Standard_CString Value () const
 Returns the String component of a font style
.
Standard_EXPORT Quantity_Length Size () const
 Returns the Size component of a font style
.
Standard_EXPORT Quantity_PlaneAngle Slant () const
 Returns the Slant component of a font style
.
Standard_EXPORT Standard_Boolean CapsHeight () const
 Returns the CapsHeight component of a font style
.
Standard_EXPORT Standard_CString AliasName () const
 Returns a shorter font name which identify the
main characteristics of the fonts.
.
Standard_EXPORT Standard_CString FullName () const
 Returns the full normalized font name
.
Standard_EXPORT Standard_CString Foundry () const
 Returns the foundry of the font.
.
Standard_EXPORT Standard_CString Family () const
 Returns the family of the font.
.
Standard_EXPORT Standard_CString Weight () const
 Returns the weight of the font.
.
Standard_EXPORT Standard_CString Registry () const
 Returns the char set registry of the font.
.
Standard_EXPORT Standard_CString Encoding () const
 Returns the char set encoding of the font.
.
Standard_EXPORT Standard_CString SSlant () const
 Returns the slant of the font.
.
Standard_EXPORT Standard_CString SWidth () const
 Returns the width name of the font.
.
Standard_EXPORT Standard_CString SStyle () const
 Returns the style name of the font.
.
Standard_EXPORT Standard_CString SPixelSize () const
 Returns the pixel size of the font.
.
Standard_EXPORT Standard_CString SPointSize () const
 Returns the point size of the font.
.
Standard_EXPORT Standard_CString SResolutionX () const
 Returns the resolution X of the font.
.
Standard_EXPORT Standard_CString SResolutionY () const
 Returns the resolution Y of the font.
.
Standard_EXPORT Standard_CString SSpacing () const
 Returns the spacing of the font.
.
Standard_EXPORT Standard_CString SAverageWidth () const
 Returns the average width of the font.
.
Standard_EXPORT void Dump () const
 Dumps the font attributes.
.
Standard_EXPORT Standard_Boolean IsEqual (const Aspect_FontStyle &Other) const
Standard_Boolean operator== (const Aspect_FontStyle &Other) const
Standard_EXPORT Standard_Boolean IsNotEqual (const Aspect_FontStyle &Other) const
Standard_Boolean operator!= (const Aspect_FontStyle &Other) const

Protected Attributes

Aspect_TypeOfFont MyFontType
TCollection_AsciiString MyStyle
TCollection_AsciiString MyFontName
Standard_Real MyFontSize
Standard_Real MyFontSlant
Standard_Boolean MyCapsHeight

Private Member Functions

Standard_EXPORT void SetPredefinedStyle (const Aspect_TypeOfFont Type, const Quantity_Length Size, const Quantity_PlaneAngle Slant, const Standard_Boolean CapsHeight)
 Set MyFontString with the predefined style value
and size according of type
.

Static Private Member Functions

static Standard_EXPORT Standard_CString Normalize (const Standard_CString aFontName, Standard_Real &aSize)
 Returns a normalized descriptor from the font name
<afontname>
.
static Standard_EXPORT Standard_CString Field (const TCollection_AsciiString &aFontName, const Standard_Integer aRank)
 Returns the field at position <arank>
from the font name <afontname>.
.
static Standard_EXPORT Standard_CString SetField (const TCollection_AsciiString &aFontName, const Standard_CString aField, const Standard_Integer aRank)
 Sets the field at position <arank>
of the fontname <afontname>
from the field name <afield>.
.


Constructor & Destructor Documentation

Standard_EXPORT Aspect_FontStyle::Aspect_FontStyle  ) 
 

Standard_EXPORT Aspect_FontStyle::Aspect_FontStyle const Aspect_TypeOfFont  Type,
const Quantity_Length  Size,
const Quantity_PlaneAngle  Slant = 0.0,
const Standard_Boolean  CapsHeight = Standard_False
 

Standard_EXPORT Aspect_FontStyle::Aspect_FontStyle const Standard_CString  Style,
const Quantity_Length  Size,
const Quantity_PlaneAngle  Slant = 0.0,
const Standard_Boolean  CapsHeight = Standard_False
 

Standard_EXPORT Aspect_FontStyle::Aspect_FontStyle const Standard_CString  Style  ) 
 


Member Function Documentation

Standard_EXPORT Standard_CString Aspect_FontStyle::AliasName  )  const
 

Standard_EXPORT Aspect_FontStyle& Aspect_FontStyle::Assign const Aspect_FontStyle Other  ) 
 

Standard_EXPORT Standard_Boolean Aspect_FontStyle::CapsHeight  )  const
 

Standard_EXPORT void Aspect_FontStyle::Dump  )  const
 

Standard_EXPORT Standard_CString Aspect_FontStyle::Encoding  )  const
 

Standard_EXPORT Standard_CString Aspect_FontStyle::Family  )  const
 

static Standard_EXPORT Standard_CString Aspect_FontStyle::Field const TCollection_AsciiString &  aFontName,
const Standard_Integer  aRank
[static, private]
 

Standard_EXPORT Standard_CString Aspect_FontStyle::Foundry  )  const
 

Standard_EXPORT Standard_CString Aspect_FontStyle::FullName  )  const
 

Standard_EXPORT Standard_Boolean Aspect_FontStyle::IsEqual const Aspect_FontStyle Other  )  const
 

Standard_EXPORT Standard_Boolean Aspect_FontStyle::IsNotEqual const Aspect_FontStyle Other  )  const
 

Standard_EXPORT Standard_Integer Aspect_FontStyle::Length  )  const
 

static Standard_EXPORT Standard_CString Aspect_FontStyle::Normalize const Standard_CString  aFontName,
Standard_Real &  aSize
[static, private]
 

void Aspect_FontStyle::operator delete void *  anAddress  )  [inline]
 

void* Aspect_FontStyle::operator new size_t  size  )  [inline]
 

void* Aspect_FontStyle::operator new size_t  ,
void *  anAddress
[inline]
 

Standard_Boolean Aspect_FontStyle::operator!= const Aspect_FontStyle Other  )  const [inline]
 

Aspect_FontStyle& Aspect_FontStyle::operator= const Aspect_FontStyle Other  )  [inline]
 

Standard_Boolean Aspect_FontStyle::operator== const Aspect_FontStyle Other  )  const [inline]
 

Standard_EXPORT Standard_CString Aspect_FontStyle::Registry  )  const
 

Standard_EXPORT Standard_CString Aspect_FontStyle::SAverageWidth  )  const
 

Standard_EXPORT void Aspect_FontStyle::SetEncoding const Standard_CString  aName  ) 
 

Standard_EXPORT void Aspect_FontStyle::SetFamily const Standard_CString  aName  ) 
 

static Standard_EXPORT Standard_CString Aspect_FontStyle::SetField const TCollection_AsciiString &  aFontName,
const Standard_CString  aField,
const Standard_Integer  aRank
[static, private]
 

Standard_EXPORT void Aspect_FontStyle::SetPredefinedStyle const Aspect_TypeOfFont  Type,
const Quantity_Length  Size,
const Quantity_PlaneAngle  Slant,
const Standard_Boolean  CapsHeight
[private]
 

Standard_EXPORT void Aspect_FontStyle::SetRegistry const Standard_CString  aName  ) 
 

Standard_EXPORT void Aspect_FontStyle::SetValues const Standard_CString  Style  ) 
 

Standard_EXPORT void Aspect_FontStyle::SetValues const Standard_CString  Style,
const Quantity_Length  Size,
const Quantity_PlaneAngle  Slant = 0.0,
const Standard_Boolean  CapsHeight = Standard_False
 

Standard_EXPORT void Aspect_FontStyle::SetValues const Aspect_TypeOfFont  Type,
const Quantity_Length  Size,
const Quantity_PlaneAngle  Slant = 0.0,
const Standard_Boolean  CapsHeight = Standard_False
 

Standard_EXPORT void Aspect_FontStyle::SetWeight const Standard_CString  aName  ) 
 

Standard_EXPORT Quantity_Length Aspect_FontStyle::Size  )  const
 

Standard_EXPORT Quantity_PlaneAngle Aspect_FontStyle::Slant  )  const
 

Standard_EXPORT Standard_CString Aspect_FontStyle::SPixelSize  )  const
 

Standard_EXPORT Standard_CString Aspect_FontStyle::SPointSize  )  const
 

Standard_EXPORT Standard_CString Aspect_FontStyle::SResolutionX  )  const
 

Standard_EXPORT Standard_CString Aspect_FontStyle::SResolutionY  )  const
 

Standard_EXPORT Standard_CString Aspect_FontStyle::SSlant  )  const
 

Standard_EXPORT Standard_CString Aspect_FontStyle::SSpacing  )  const
 

Standard_EXPORT Standard_CString Aspect_FontStyle::SStyle  )  const
 

Standard_EXPORT Aspect_TypeOfFont Aspect_FontStyle::Style  )  const
 

Standard_EXPORT Standard_CString Aspect_FontStyle::SWidth  )  const
 

Standard_EXPORT Standard_CString Aspect_FontStyle::Value  )  const
 

Standard_EXPORT Standard_CString Aspect_FontStyle::Weight  )  const
 


Field Documentation

Standard_Boolean Aspect_FontStyle::MyCapsHeight [protected]
 

TCollection_AsciiString Aspect_FontStyle::MyFontName [protected]
 

Standard_Real Aspect_FontStyle::MyFontSize [protected]
 

Standard_Real Aspect_FontStyle::MyFontSlant [protected]
 

Aspect_TypeOfFont Aspect_FontStyle::MyFontType [protected]
 

TCollection_AsciiString Aspect_FontStyle::MyStyle [protected]
 


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