Inherits IpeObject.
The text object is a tricky Ipe object. It has a Latex-source representation, which needs to be translated into PDF by Pdflatex before it can be saved as PDF.
A text object is either a label or a minipage. The IsMiniPage() method tells you which. Its dimensions are given by Width(), Height(), and Depth(), but they are recomputed by Ipe when running LaTeX, with the exception of the width for minipage objects (whose width is fixed). Before Latex has been run, the dimensions are not reliable.
The position of the reference point relative to the text box is given by VerticalAlignment() and HorizontalAlignment(). The text can also by transformed by the TextMatrix() (it is set from the style sheet, using the Size() attribute), which is applied to the whole text box, with the reference point as the fix point.
Text can be either transformable, or fixed. In the first case, the Matrix() is applied to the complete text box (after the TextMatrix()), in the second case, the Matrix() is only applied to the reference point Position(), and the text box remains fixed relative to the reference point.
The Text() must be a legal LaTeX fragment that can be interpreted by LaTeX inside , possibly using the macros or packages defined in the preamble.
|
Create minipage object, with top-left alignment.
|
|
Create label object, with bottom-left alignment.
|
|
Create from XML stream.
|
|
Copy constructor.
|
|
Destructor.
|
|
Clone object.
Implements IpeObject. |
|
Return pointer to this object.
Reimplemented from IpeObject. |
|
Save object to XML stream.
Implements IpeObject. |
|
Save text as PDF.
Implements IpeObject. |
|
Call VisitText of visitor.
Implements IpeObject. |
|
Extend box to include the object transformed by m. For Ipe objects in a page, don't call this directly. The IpePgObject caches the bounding box, so it is far more efficient to call IpePgObject::BBox. If called with an empty box, the result of this function is a tight bounding box for the object, with a little leeway in case the boundary is determined by a spline (it has to be approximated to perform this operation). Implements IpeObject. |
|
Return distance of transformed object to point v. If larger than bound, can just return bound. Implements IpeObject. |
|
Compute possible vertex snapping position for transformed object. Looks only for positions closer than bound. If successful, modify pos and bound. Implements IpeObject. |
|
Update text matrix, check size.
Reimplemented from IpeObject. |
|
Return quadrilateral including the text. This is the bounding box transformed by the text matrix, correctly transformed by Matrix(), taking into consideration whether the object is transformable. |
|
Return position of reference point in text box coordinate system. Assume a coordinate system where the text box has corners (0,0) and (Width(), TotalHeight()). This function returns the coordinates of the reference point in this coordinate system. |
|
Return text position.
|
|
Return text source.
|
|
Return font size.
|
|
Return true if text object is a minipage.
|
|
Change between label and paragraph type.
|
|
Return horizontal alignment of text object.
|
|
Return vertical alignment of text object.
|
|
Change horizontal alignment (text moves with respect to reference point).
|
|
Change vertical alignment (text moves with respect to reference point).
|
|
Return width of text object.
|
|
Return height of text object (from baseline to top).
|
|
Return depth of text object.
|
|
Return height + depth of text object.
|
|
Return true if text object can be transformed.
|
|
Return the text matrix. This is always a linear matrix, that is, its translation component is zero. |
|
Set whether the text object can be transformed. This invalidates (and destroys) the XForm. |
|
Set font size of text. This invalidates (and destroys) the XForm. |
|
Set width of paragraph. This invalidates (and destroys) the XForm. The function panics if object is not a minipage. |
|
Sets the text of the text object. This invalidates (and destroys) the XForm. |
|
Update the PDF code for this object.
|
|
Return the PDF representation of this text object. If Pdflatex has not been run yet, returns 0. |