oaSegStyle Class Reference


Public Methods

 oaSegStyle ()
 oaSegStyle (oaDist width, oaEndStyle beginStyleIn, oaEndStyle endStyleIn, oaDist beginExtIn=0, oaDist endExtIn=0)
 oaSegStyle (oaEndStyle beginStyleIn, oaEndStyle endStyleIn, oaDist endExtIn, oaDist endLeftDiagExtIn, oaDist endRightDiagExtIn, oaDist endRightHalfWidthIn, oaDist beginExtIn=0)
 oaSegStyle (oaEndStyle beginStyleIn, oaDist beginExtIn, oaDist beginLeftDiagExtIn, oaDist beginRightDiagExtIn, oaDist beginRightHalfWidthIn, oaEndStyle endStyleIn, oaDist endExtIn=0)
 oaSegStyle (oaEndStyle beginStyleIn, oaDist beginExtIn, oaDist beginLeftDiagExtIn, oaDist beginRightDiagExtIn, oaDist beginRightHalfWidthIn, oaEndStyle endStyleIn, oaDist endExtIn, oaDist endLeftDiagExtIn, oaDist endRightDiagExtIn, oaDist endRightHalfWidthIn)
 oaSegStyle (const oaSegStyle &segStyleIn)
oaDist getWidth () const
oaEndStyle getBeginStyle () const
oaDist getBeginExt () const
void getBeginExt (oaDist &ext, oaDist &leftDiagExt, oaDist &rightDiagExt, oaDist &rightHalfWidth) const
oaEndStyle getEndStyle () const
oaDist getEndExt () const
void getEndExt (oaDist &ext, oaDist &leftDiagExt, oaDist &rightDiagExt, oaDist &rightHalfWidth) const
void setWidth (oaDist widthIn)
void setBeginStyle (oaEndStyle style, oaDist ext=0)
void setBeginStyle (oaEndStyle style, oaDist ext, oaDist leftDiagExt, oaDist rightDiagExt, oaDist rightHalfWidth)
void setEndStyle (oaEndStyle style, oaDist ext=0)
void setEndStyle (oaEndStyle style, oaDist ext, oaDist leftDiagExt, oaDist rightDiagExt, oaDist rightHalfWidth)
oaBoolean operator== (const oaSegStyle &style) const
oaBoolean operator!= (const oaSegStyle &style) const
void genBoundary (oaPointArray &points) const

Detailed Description

The oaSegStyle class implements a utility class whose objects are used to specify and retrieve the width and the two end styles for an oaPathSeg object. oaSegStyle objects by themselves are not persistent but become persistent when associated with one or more oaPathSeg objects.

Its supporting classes includes the oaEndStyle class, which implements an enumerated type representing the different styles the end of a path segment may have.


Constructor & Destructor Documentation

oaSegStyle::oaSegStyle   [inline]
 

This constructor for the oaSegStyle class creates an empty oaSegStyle object. An object created with this constructor will have zero width and truncated begin and end endStyles.

oaSegStyle::oaSegStyle oaDist    width,
oaEndStyle    beginStyleIn,
oaEndStyle    endStyleIn,
oaDist    beginExtIn = 0,
oaDist    endExtIn = 0
[inline]
 

This constructor for the oaSegStyle class should be used when neither of the begin or end styles are custom chamfered styles. The begin and end extensions are optional and should be specified only if the corresponding end style is variable. The specified width should be an even number. An appropriate exception will be thrown if any of these requirements are not met.

The 'width, 'beginExtIn' and 'endExtIn' values should be specified in regular database units if this segStyle is intended to be used for orthogonal segments and in diagonal database units if it is intended to be used for diagonal segments.

Additionally, it is required that the 'width' value be an even number of units.

Parameters:
width The width for the intended oaPathSeg that will use this object
beginStyleIn The oaEndStyle to use at the beginning of an oaPathSeg
endStyleIn The oaEndStyle to use the end of an oaPathSeg
beginExtIn The extension to use at the beginning of an oaPathSeg if 'beginStyleIn' is the variable endStyle
endExtIn The extension to use at the end of an oaPathSeg if 'endStyleIn' is the variable endStyle
Exceptions:
oacEvenWidthRequiredForSegStyle 
oacCustomEndStyleNotAllowed 
oacInvalidSegStyleBeginExtValue 
oacInvalidSegStyleEndExtValue 

oaSegStyle::oaSegStyle oaEndStyle    beginStyleIn,
oaEndStyle    endStyleIn,
oaDist    endExtIn,
oaDist    endLeftDiagExtIn,
oaDist    endRightDiagExtIn,
oaDist    endRightHalfWidthIn,
oaDist    beginExtIn = 0
[inline]
 

This constructor for the oaSegStyle class should be used when begin endStyle is not custom chamfered while the end endStyle is custom chamfered. The begin extension beginExtIn is optional and should be specified only if the begin endStyle, beginStyleIn, is "variable". The width for this segStyle defaults to being twice the endRightHalfWidthIn value specified. An appropriate exception will be thrown if any of the above requirements are not met.

The beginExtIn, endExtIn and 'endRightHalfWidthIn values should be specified in regular database units if this segStyle is intended to be used for orthogonal segments and in diagonal database units if it is intended to be used for diagonal segments.

The endLeftDiagExtIn and endRightDiagExtIn values should be specified in in diagonal database units if this segStyle is intended to be used for orthogonal segments and in regular database units if it is intended to be used for diagonal segments.

Parameters:
beginStyleIn The oaEndStyle to use at the beginning of an oaPathSeg
endStyleIn The oaEndStyle to use at the end of an oaPathSeg
endExtIn The extension to use at the end of an oaPathSeg for custom chamfering
endLeftDiagExtIn The left diagonal extension to use at the end of an oaPathSeg for custom chamfering
endRightDiagExtIn The right diagonal extension to use at the end of an oaPathSeg for custom chamfering
endRightHalfWidthIn The right half width to use at the end of an oaPathSeg for custom chamfering
beginExtIn The extension to use at the beginning of an oaPathSeg if 'beginStyleIn' is the variable endStyle
Exceptions:
oacCustomEndStyleNotAllowedForBegin 
oacOnlyCustomEndStyleAllowedForEnd 
oacInvalidSegStyleBeginExtValue 

oaSegStyle::oaSegStyle oaEndStyle    beginStyleIn,
oaDist    beginExtIn,
oaDist    beginLeftDiagExtIn,
oaDist    beginRightDiagExtIn,
oaDist    beginRightHalfWidthIn,
oaEndStyle    endStyleIn,
oaDist    endExtIn = 0
[inline]
 

This constructor for the oaSegStyle class should be used when end endStyle is not custom chamfered while the begin endStyle is custom chamfered. The end extension endExtIn is optional and should be specified only if the end endStyleIn is "variable". The width for this segStyle defaults to being the double of the beginRightHalfWidthIn value specified. An exception will be thrown if the above requirements are not met.

The beginExtIn, beginRightHalfWidthIn and endExtIn values should be specified in regular database units if this segStyle is intended to be used for orthogonal segments and in diagonal database units if it is intended to be used for diagonal segments.

The beginLeftDiagExtIn and beginRightDiagExtIn values should be specified in in diagonal database units if this segStyle is intended to be used for orthogonal segments and in regular database units if it is intended to be used for diagonal segments.

Parameters:
beginStyleIn The oaEndStyle to use at the beginning of an oaPathSeg
beginExtIn The extension to use at the beginning of an oaPathSeg for custom chamfering
beginLeftDiagExtIn The left diagonal extension to use at the beginning of an oaPathSeg for custom chamfering
beginRightDiagExtIn The right diagonal extension to use at the beginning of an oaPathSeg for custom chamfering
beginRightHalfWidthIn The right half to use at the beginning of an oaPathSeg for custom chamfering
endStyleIn The oaEndStyle to use at the end of an oaPathSeg
endExtIn The extension to use at the end of an oaPathSeg if 'endStyleIn' is the variable endStyle
Exceptions:
oacCustomEndStyleNotAllowedForEnd 
oacOnlyCustomEndStyleAllowedForBegin 
oacInvalidSegStyleEndExtValue 

oaSegStyle::oaSegStyle oaEndStyle    beginStyleIn,
oaDist    beginExtIn,
oaDist    beginLeftDiagExtIn,
oaDist    beginRightDiagExtIn,
oaDist    beginRightHalfWidthIn,
oaEndStyle    endStyleIn,
oaDist    endExtIn,
oaDist    endLeftDiagExtIn,
oaDist    endRightDiagExtIn,
oaDist    endRightHalfWidthIn
[inline]
 

This constructor for the oaSegStyle class should be used when both begin and end endStyles are custom chamfered. The width for this segStyle defaults to the sum of beginRightHalfWidthIn and endRightHalfWidthIn. An exception will be thrown if the above requirements are not met.

The beginExtIn, beginRightHalfWidthIn, endExtIn and endRightHalfWidth values should be specified in regular database units if this segStyle is intended to be used for orthogonal segments and in diagonal database units if it is intended to be used for diagonal segments.

The beginLeftDiagExtIn, beginRightDiagExtIn, endLeftDiagExtIn and endRightDiagExtIn values should be specified in diagonal database units if this segStyle is intended to be used for orthogonal segments and in regular database units if it is intended to be used for diagonal segments.

Parameters:
beginStyleIn The oaEndStyle to use at the beginning of an oaPathSeg
beginExtIn The extension to use at the beginning of an oaPathSeg
beginLeftDiagExtIn The left diagonal extension to use at the beginning of an oaPathSeg
beginRightDiagExtIn The right diagonal extension to use at the beginning of an oaPathSeg
beginRightHalfWidthIn The right extension to use at the beginning of an oaPathSeg
endStyleIn The oaEndStyle to use at the end of an oaPathSeg
endExtIn The extension to use at the end of an oaPathSeg
endLeftDiagExtIn The left diagonal extension to use at the end of an oaPathSeg
endRightDiagExtIn The right diagonal extension to use at the end of an oaPathSeg
endRightHalfWidthIn The right extension to use at the end of an oaPathSeg
Exceptions:
oacOnlyCustomEndStylesAllowed 

oaSegStyle::oaSegStyle const oaSegStyle &    segStyleIn [inline]
 

This copy constructor for the oaSegStyle class creates a copy of the specified oaSegStyle object 'segStyleIn'.

Parameters:
segStyleIn The oaSegStyle object to copy


Member Function Documentation

void oaSegStyle::genBoundary oaPointArray &    boundary const
 

This function fills out boundary with the boundary polygon of a virtual segStyle. The segStyle is placed at the origin, and in left to right direction.

Parameters:
boundary The point array that will get populated with the boundary points

void oaSegStyle::getBeginExt oaDist &    ext,
oaDist &    leftDiagExt,
oaDist &    rightDiagExt,
oaDist &    rightHalfWidth
const [inline]
 

This function returns the custom begin extension values this object represents for an oaPathSeg object to which it may be applied. All returned values are valid if the begin endStyle is custom chamfered. Only 'ext' is valid if the begin endStyle is variable. For all other endStyles the returned values will be zero.

Parameters:
ext This parameter gets populated with the regular begin extension
leftDiagExt This parameter gets populated with the left diagonal extension
rightDiagExt This parameter gets populated with the right diagonal extension
rightHalfWidth This parameter gets populated with the right half width

oaDist oaSegStyle::getBeginExt   const [inline]
 

This function returns the regular begin extension this object represents for an oaPathSeg object to which it may be applied. The return value is valid only if the begin endStyle is variable or custom chamfered. A zero is returned if the begin endStyle is truncate, extend or chamfer.

oaEndStyle oaSegStyle::getBeginStyle   const [inline]
 

This function returns an oaEndStyle object that this object represents for the beginning of an oaPathSeg object to which it may be applied.

void oaSegStyle::getEndExt oaDist &    ext,
oaDist &    leftDiagExt,
oaDist &    rightDiagExt,
oaDist &    rightHalfWidth
const [inline]
 

This function returns the custom end extension values this object represents for an oaPathSeg object to which it may be applied. All returned values are valid if the end endStyle is custom chamfered. Only 'ext' is valid if the end endStyle is variable. For all other endStyles the returned values will be zero.

Parameters:
ext This parameter gets populated with the regular end extension
leftDiagExt This parameter gets populated with the left diagonal extension
rightDiagExt This parameter gets populated with the right diagonal extension
rightHalfWidth This parameter gets populated with the right half width

oaDist oaSegStyle::getEndExt   const [inline]
 

This function returns the regular end extension this object represents for an oaPathSeg object to which it may be applied. The return value is valid only if the end endStyle is variable or custom chamfered. A zero is returned if the end endStyle is truncate, extend or chamfer.

oaEndStyle oaSegStyle::getEndStyle   const [inline]
 

This function returns an oaEndStyle object that this object represents for the end of an oaPathSeg object to which it may be applied.

oaUInt4 oaSegStyle::getWidth   const [inline]
 

This function returns the width that this osSegStyle object currently represents. The returned value can be either be in regular orthogonal units or diagonal units based on the user context.

oaBoolean oaSegStyle::operator!= const oaSegStyle &    style const [inline]
 

This operator returns TRUE if the specified style is not equivalent to the oaSegStyle object on which this operator is invoked -- that is, if their corresponding endStyles, widths and extension values do not match exactly.

Parameters:
style A reference to another oaSegStyle object to which this object is being compared

oaBoolean oaSegStyle::operator== const oaSegStyle &    style const [inline]
 

This operator returns TRUE if the specified style is equivalent to the oaSegStyle object on which this operator is invoked -- that is, their corresponding endStyles, widths and extension values match exactly.

Parameters:
style A reference to another oaSegStyle object to which this object is being compared

void oaSegStyle::setBeginStyle oaEndStyle    style,
oaDist    ext,
oaDist    leftDiagExt,
oaDist    rightDiagExt,
oaDist    rightHalfWidth
 

This function sets the begin endStyle of this segStyle, and should be used for setting custom endStyles only. An exception is thrown if this requirement is not met. The width of this object is adjusted according to whether the segStyle at the end is custom or non-custom.

The ext and rightHalfWidth values should be specified in regular database units if this segStyle is intended to be used for orthogonal segments. These values should be set in diagonal database units if it is intended to be used for diagonal segments.

Conversely, the leftDiagExt and rightDiagExt values should be specified in diagonal database units if this segStyle is intended to be used for orthogonal segments, and they should be set in regular database units if it is intended to be used for diagonal segments.

Parameters:
style The oaEndStyle to be used for the beginning of an oaPathSeg
ext The extension to be used at the beginning of an oaPathSeg
leftDiagExt The left diagonal extension to be used at the beginning of an oaPathSeg
rightDiagExt The right diagonal extension to be used at the beginning of an oaPathSeg
rightHalfWidth The right half width to be used at the beginning of an oaPathSeg
Exceptions:
oacOnlyCustomEndStyleAllowedForBegin 

void oaSegStyle::setBeginStyle oaEndStyle    style,
oaDist    ext = 0
 

This function sets the begin endStyle for this segStyle and should be used for the non-custom endStyles only. If an extension 'ext' is specified, the style must be variable. An exception is thrown if these criteria are not met. If the end endStyle is a custom endStyle, the width gets adjusted to be double that of the endRightHalfWidth. Otherwise, it remains unchanged.

The value of 'ext' should be specified in regular database units if the style is to be used for orthogonal segments and in diagonal database units if the intended use is for diagonal segments.

Parameters:
style The new end style that this object will represent for the beginning of an oaPathSeg.
ext The extension value that this object will represent for the beginning of an oaPathSeg
Exceptions:
oacCustomEndStyleNotAllowedForBegin 
oacInvalidSegStyleBeginExtValue 

void oaSegStyle::setEndStyle oaEndStyle    style,
oaDist    ext,
oaDist    leftDiagExt,
oaDist    rightDiagExt,
oaDist    rightHalfWidth
 

This function sets the end endStyle of this segStyle and should be used for setting custom endStyles only. An exception is thrown if this requirement is not met. The width of this object gets adjusted based on whether the segStyle at the begin is custom or non-custom.

The 'ext' and 'rightHalfWidth' values should be specified in regular database units if this segStyle is intended to be used for orthogonal segments and in diagonal database units if it is intended to be used for diagonal segments.

The 'leftDiagExt' and 'rightDiagExt' values should be specified in diagonal database units if this segStyle is intended to be used for orthogonal segments and in regular database units if it is intended to be used for diagonal segments.

Parameters:
style The oaEndStyle to be used for the end of an oaPathSeg
ext The extension to be used at the end of an oaPathSeg
leftDiagExt The left diagonal extension to be used at the end of an oaPathSeg
rightDiagExt The right diagonal extension to be used at the end of an oaPathSeg
rightHalfWidth The right half width to be used at the end of an oaPathSeg
Exceptions:
oacOnlyCustomEndStyleAllowedForEnd 

void oaSegStyle::setEndStyle oaEndStyle    style,
oaDist    ext = 0
 

This function sets the end endStyle for this segStyle and should be used for the non-custom endStyles only. If an extension 'ext' is specified, the style must be variable. An exception is thrown if these criteria are not met. If the begin endStyle is a custom endStyle, the width gets adjusted to be double that of the beginRightHalfWidth. Otherwise, it remains unchanged.

The value of 'ext' should be specified in regular database units if the style is to be used for orthogonal segments and in diagonal database units if the intended use is for diagonal segments.

Parameters:
style The new end style that this object will represent for the end of an oaPathSeg. The style should be a regular end style.
ext The extension value that this object will represent for the end of an oaPathSeg
Exceptions:
oacCustomEndStyleNotAllowedForEnd 
oacInvalidSegStyleEndExtValue 

void oaSegStyle::setWidth oaDist    widthIn
 

This function sets the width of this segStyle. The width cannot be changed if both ends are custom chamfered. An exception will be thrown for this case. If only one end is custom-chamfered, the right half-width of that custom end is adjusted to be half the specified 'widthIn' value. For all other cases, the width applies directly and implies to all dependent extensions.

Parameters:
widthIn The new width value to assign to this oaSegStyle object
Exceptions:
oacCannotChangeWidthForBothCustomEnds 
oacEvenWidthRequiredForSegStyle 


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

Return to top of page