oaText Class Reference

Inheritance diagram for oaText:

oaShape oaPinFig oaConnFig oaFig oaBlockObject oaDesignObject oaObject oaEvalText


Public Methods

void getOrigin (oaPoint &origin) const
void getText (oaString &text) const
oaTextAlign getAlignment () const
oaOrient getOrient () const
oaFont getFont () const
oaDist getHeight () const
oaBoolean hasOverbar () const
oaBoolean isVisible () const
oaBoolean isDrafting () const
void setOrigin (const oaPoint &origin)
void setText (const oaString &text)
void setAlignment (oaTextAlign alignment)
void setOrient (oaOrient orient)
void setFont (oaFont font)
void setHeight (oaDist height)
void setOverbar (oaBoolean overbar)
void setVisible (oaBoolean visible)
void setDrafting (oaBoolean drafting)

Static Public Methods

oaText * create (oaBlock *block, oaLayerNum layerNum, oaPurposeNum purposeNum, const oaString &text, const oaPoint &origin, oaTextAlign alignment, oaOrient orient, oaFont font, oaDist height, oaBoolean overbar=false, oaBoolean visible=true, oaBoolean drafting=true)

Detailed Description

The oaText class implements a text shape. The class is contained in a block and is used to display text strings.

The origin of the text and its orientation define a line used for the bottom of normal characters, and the height defines the top of the normal characters. Characters with descenders or ascenders may extend outside of this range. The bBox of the oaText will enclose such descenders and ascenders. For example, an oaText created at (0,0) with an orientation of oacR0 and the string “jackal” will descend below a y-value of 0 because of the “j”. It’s bBox will have a bottom() value < 0.


Member Function Documentation

oaText * oaText::create oaBlock *    block,
oaLayerNum    layerNum,
oaPurposeNum    purposeNum,
const oaString &    text,
const oaPoint &    origin,
oaTextAlign    alignment,
oaOrient    orient,
oaFont    font,
oaDist    height,
oaBoolean    overbar = false,
oaBoolean    visible = true,
oaBoolean    drafting = true
[static]
 

This function creates a text shape object in the design with the specified attributes.

Parameters:
block The block on which to create the text object
layerNum The number of the layer on which to create the text object
purposeNum The number of the layer purpose on which to create the text object
text The text string of this shape text
origin The location of the origin of this text shape
alignment The horizontal and vertical alignment of the display text with respect to the origin
orient The orientation of the text
font The font style with which the text is displayed
height The height of the display text in user-units
overbar Indicates if an overbar is used in the text string display; the default is false
visible Indicates if this text shape is displayed; the default is true (this allows applications to turn on or off the display of text shapes without having to delete them from the database)
drafting Indicates if the text for this text shape should always be drawn left-to-right or top-to-bottom; the default is true (if drafting is true and the orientation of this text is mirrored, text is drawn backwards)

oaTextAlign oaText::getAlignment   const
 

This function returns the alignment of this text object.

oaFont oaText::getFont   const
 

This function returns the font of this text object.

oaUInt4 oaText::getHeight   const
 

This function returns the height of this text object.

oaOrient oaText::getOrient   const
 

This function returns the orientation of this text object.

void oaText::getOrigin oaPoint &    origin const
 

This function returns the origin of this text object.

void oaText::getText oaString &    text const
 

This function returns the value or text of this text object.

oaBoolean oaText::hasOverbar   const
 

This function returns a boolean value that indicates if this text has an overbar on it.

Returns:
true or false

oaBoolean oaText::isDrafting   const
 

This function returns a boolean value that indicates if this text is displayed in drafting style.

Returns:
true or false

oaBoolean oaText::isVisible   const
 

This function returns a boolean value that indicates if this text is displayed.

Returns:
true or false

void oaText::setAlignment oaTextAlign    alignment
 

This function sets the alignment for this text object.

void oaText::setDrafting oaBoolean    drafting
 

This function sets the flag that indicates if this text object is displayed in drafting mode.

void oaText::setFont oaFont    font
 

This function sets the font used by this text object.

void oaText::setHeight oaDist    height
 

This function sets the height of this text object.

void oaText::setOrient oaOrient    orient
 

This function sets the orientation for this text object.

void oaText::setOrigin const oaPoint &    origin
 

This function sets the origin for this text object.

void oaText::setOverbar oaBoolean    overbar
 

This function sets the flag that indicates if this text object is displayed with an overbar.

void oaText::setText const oaString &    text
 

This function sets the text string for this text object.

void oaText::setVisible oaBoolean    visible
 

This function sets the flag that indicates if this text object is visible.


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

Return to top of page