Module fmeobjects :: Class FMEText
[hide private]
[frames] | no frames]

Class FMEText


init(MultipleInvocations)

FME Text class.

Create an instance of a Text geometry object.

init(location, textString, textSize, textRotation)

Creates a new Text geometry object. 'textRotation' is CCW up from the horizontal and is measured in degrees. 'textSize' is the height of the text's box before rotation. It includes all lines and interline spacing for multi-line text. The 'textString' is specified as an unicode string, which is set as an encoded text string on the text object.

Parameters

Returns: FMEText

init(text)

Create a copy of the passed in Text geometry object.

Parameters

Returns: FMEText

Instance Methods [hide private]
 
__init__(MultipleInvocations)
x.__init__(...) initializes x; see help(type(x)) for signature
FMEGeometry, or FMEPoint
getLocation(asPoint)
Returns the location of the text.
float
getTextRotation()
Returns the rotation of the text object.
float
getTextSize()
Returns the text size of the text object.
unicode
getTextString()
Returns the text string of this text.
None
offset(offsetPoint)
Offsets the geometry by the coordinate values specified by 'offsetPoint'.
None
reset(text)
Resets the existing text object, and sets its values to the data stored in 'text'.
None
rotate2D(center, angle)
Rotates the text counterclockwise around the 'center' point by the specified 'angle' (in degrees).
None
scale(xScale, yScale, zScale, scaleText)
Scale the feature by the given amounts.
None
setLocation(location)
Sets the existing text object's location to the value in 'location'.
None
setTextRotation(textRotation)
Sets the rotation of the existing text object to 'textRotation'.
None
setTextSize(textSize)
Sets the existing text object's location to the value in 'location'.
None
setTextString(textString)
Sets the existing text object's text string to 'textString'.

Inherited from FMEGeometry: __getObject__, __new__, boundingBox, boundingCube, bounds, clearMeasures, copyAttributesFromFeature, copyNameFromGeometry, copyTraitsFromGeometry, copyTraitsToFeature, deleteName, force2D, force3D, getArea, getMeasureNames, getName, getTrait, getTraitNames, getTraitNullMissingAndType, getTraitType, hasMeasures, hasName, is3D, isCollection, measureExists, removeMeasure, removeTraits, renameMeasure, setName, setTrait, setTraitNullWithType

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(MultipleInvocations)
(Constructor)

 

x.__init__(...) initializes x; see help(type(x)) for signature

Overrides: object.__init__

getLocation(asPoint)

 

Returns the location of the text. If 'asPoint' is True, the location will be returned as a FMEPoint.

Parameters:
  • asPoint (bool) - Whether to return the location as a FMEPoint
Returns: FMEGeometry, or FMEPoint
The location of the text.

getTextRotation()

 

Returns the rotation of the text object. The returned rotation is counter-clockwise up from the horizontal and is measured in degrees.

Returns: float
The rotation of the text object.

getTextSize()

 

Returns the text size of the text object. Text size is actually the height of hte text's box before rotation. It includes all lines and interline spacing for multiline text.

Returns: float
The text size of the text object.

getTextString()

 

Returns the text string of this text. It includes all lines and interline spacing for multi-line text.

Returns: unicode
The text string of the text object.
Raises:
  • FMEException - An exception is raised if an error occurred.

offset(offsetPoint)

 

Offsets the geometry by the coordinate values specified by 'offsetPoint'. An error is returned if the operation is unsuccessful.

Parameters:
  • offsetPoint (FMEPoint) - The point whose coordinate values will be used to offset the text object.
Returns: None
Raises:
  • FMEException - An exception is raised if an error occurred.

reset(text)

 

Resets the existing text object, and sets its values to the data stored in 'text'.

Parameters:
  • text (FMEText) - The FMEText object whose data will be set to the existing text object.
Returns: None

rotate2D(center, angle)

 

Rotates the text counterclockwise around the 'center' point by the specified 'angle' (in degrees). An error is returned if the operation is unsucessful.

Parameters:
  • center (FMEPoint) - The center point of the curve.
  • angle (float) - The angle by which the curve is rotated.
Returns: None
Raises:
  • FMEException - An exception is raised if an error occurred.

scale(xScale, yScale, zScale, scaleText)

 

Scale the feature by the given amounts. 'zScale' is ignored if the text object is 2D. An error is returned if the operation is unsucessful.

Parameters:
  • xScale (float) - The value to scale x by.
  • yScale (float) - The value to scale y by.
  • zScale (float) - The value to scale z by.
  • scaleText (bool) - (Optional) Whether to scale the text.
Returns: None
Raises:
  • FMEException - An exception is raised if an error occurred.

setLocation(location)

 

Sets the existing text object's location to the value in 'location'. An error is returned if the new location is invalid or NULL.

Parameters:
  • location (FMEGeometry) - The new location to set the existing text object to.
Returns: None
Raises:
  • FMEException - An exception is raised if an error occurred.

setTextRotation(textRotation)

 

Sets the rotation of the existing text object to 'textRotation'. 'textRotation' is counter-clockwise up from the horizontal and measured in degrees.

Parameters:
  • textRotation (float) - The new text rotation.
Returns: None

setTextSize(textSize)

 

Sets the existing text object's location to the value in 'location'. An error is returned if the new location is invalid or NULL.

Parameters:
  • textSize (FMEGeometry) - The new location to set the existing text object to.
Returns: None
Raises:
  • FMEException - An exception is raised if an error occurred.

setTextString(textString)

 

Sets the existing text object's text string to 'textString'. The 'textString' is specified as an unicode string, which is set as an encoded text string on the text object.

Parameters:
  • textString (unicode) - The new text string to set on the text object.
Returns: None