By default, the text is created with its location at 0, 0. The location is the left baseline of the first line of text. Clients will typically get the looseFitbounds of the text and use this to position the graphic.
Do not derive your own classes from this class.
Use the constructors and destructors in this group to create and destroy objects of class IGraphicText.
![]() |
public:
virtual ~IGraphicText()
Windows | OS/2 | AIX |
Yes | Yes | Yes |
![]() |
public:
IGraphicText(const IGraphicText&)
Windows | OS/2 | AIX |
Yes | Yes | Yes |
public:
IGraphicText(const IText& text, ELineBreak lb)
Windows | OS/2 | AIX |
Yes | Yes | Yes |
public:
IGraphicText(const IText& text, const IGRect2D& bounds)
Windows | OS/2 | AIX |
Yes | Yes | Yes |
public:
IGraphicText(const IText& text, GCoordinate wrapWidth)
Windows | OS/2 | AIX |
Yes | Yes | Yes |
public:
IGraphicText()
Windows | OS/2 | AIX |
Yes | Yes | Yes |
Use the function in this group to replace the current IGraphicText object with the given one.
![]() |
public:
IGraphicText& operator =(const IGraphicText&)
Windows | OS/2 | AIX |
Yes | Yes | Yes |
Use these functions to get and set this objects attributes.
![]() |
public:
ELineBreak lineBreak() const
Windows | OS/2 | AIX |
Yes | Yes | Yes |
![]() |
public:
virtual IGPoint2D location() const
Windows | OS/2 | AIX |
Yes | Yes | Yes |
![]() |
public:
void setLineBreak(ELineBreak lb)
Windows | OS/2 | AIX |
Yes | Yes | Yes |
![]() |
public:
virtual void setLocation(const IGPoint2D&)
In the current implementation, the location x position is the left edge, and the y position is the baseline of the first line.
Windows | OS/2 | AIX |
Yes | Yes | Yes |
![]() |
public:
virtual void setText(const IText&)
Windows | OS/2 | AIX |
Yes | Yes | Yes |
![]() |
public:
virtual void setTransform(const IGrafMatrix&)
An identity transform places the location at position 0, 0.
Windows | OS/2 | AIX |
Yes | Yes | Yes |
![]() |
public:
void setWrapWidth(GCoordinate newWidth)
Windows | OS/2 | AIX |
Yes | Yes | Yes |
![]() |
public:
virtual IText text() const
Windows | OS/2 | AIX |
Yes | Yes | Yes |
![]() |
public:
IGRect2D textBounds(const IGrafPort* port = 0) const
NOTE: This function takes into account any transforms applied to the text, as well as the port the text wil be drawn into because all of these things can affect the metrics on the text. Passing 0 for the port will cause this function to use a default port, but the bounding box might not be the same as the actual bounding box when the text is drawn.
Windows | OS/2 | AIX |
Yes | Yes | Yes |
![]() |
public:
virtual IGrafMatrix transform() const
Windows | OS/2 | AIX |
Yes | Yes | Yes |
![]() |
public:
GCoordinate wrapWidth() const
Windows | OS/2 | AIX |
Yes | Yes | Yes |
![]() |
protected:
virtual void readFromStream(IDataStream&)
Windows | OS/2 | AIX |
Yes | Yes | Yes |
![]() |
protected:
virtual void writeToStream(IDataStream&) const
Windows | OS/2 | AIX |
Yes | Yes | Yes |
This group contains override functions.
![]() |
public:
virtual void draw(IGrafPort&) const
The bundle and transform are applied before rendering.
The only text attribute the bundle currently affects is the text color. Runs of text without an explicit color style will use the pen color to draw the text.
Windows | OS/2 | AIX |
Yes | Yes | Yes |
![]() |
public:
virtual IGRect2D geometricBounds() const
Since the bounds depend on the host font support and the transforms that will be applied when rendering, this function cannot accurately determine a port-independent bounds, and so returns looseFitBounds(0) as an approximation.
Windows | OS/2 | AIX |
Yes | Yes | Yes |
![]() |
public:
virtual IGRect2D looseFitBounds( const IGrafPort* port = 0 ) const
This takes into account transforms and attributes set on the port, as well as font support available through the provided port.
If no port is provided, the bounds will be computed as though rendering into an untransformed port corresponding to the screen device.
Windows | OS/2 | AIX |
Yes | Yes | Yes |
![]() |
public:
virtual bool operator ==(const IMDrawable&) const
This is an IMDrawable override.
Windows | OS/2 | AIX |
Yes | Yes | Yes |
![]() |
public:
virtual void transformBy(const IGrafMatrix&)
The passed-in transform is concatenated with any existing transform on the text. Clients can use transform() to get the resulting transform.
Because text responds unpredictably to arbitrary transforms, after transforming the graphic clients should query the new bounds if they need this information.
The entire text is transformed as a unit (no individual character rotations).
Windows | OS/2 | AIX |
Yes | Yes | Yes |
These functions support the use of IGraphicText in multiple IGrafPort.
![]() |
public:
void portHasChanged()
Windows | OS/2 | AIX |
Yes | Yes | Yes |
![]() |
enum ELineBreak { kFirstLineOnly, kAllOnOneLine, kMultipleLines, kSingleLine=kFirstLineOnly }
The following values are available:
Windows | OS/2 | AIX |
Yes | Yes | Yes |
virtual ~IMDrawable()
bool operator !=(const IMDrawable&) const
virtual ~IMGraphic()
virtual void adoptAttributeState( IAttributeState* adoptedAttributeState )
virtual void adoptBundle(IGrafBundle* adoptedBundle)
virtual const IAttributeState* attributeState() const
virtual const IGrafBundle* bundle() const
virtual void draw(IGrafPort& port) const = 0
virtual IGRect2D geometricBounds() const = 0
IMGraphic()
virtual IGRect2D looseFitBounds(const IGrafPort* = 0) const
virtual IAttributeState* orphanAttributeState()
virtual IGrafBundle* orphanBundle()
virtual void rotateBy( GDegrees, const IGPoint2D& centerOfRotation = IGPoint2D::origin ( ) )
virtual void scaleBy( const IGPoint2D&, const IGPoint2D& centerOfScale = IGPoint2D::origin ( ) )
virtual void transformBy(const IGrafMatrix&) = 0
virtual void translateBy(const IGPoint2D&)
virtual ~IMStreamable()
void externalizeToStream(IDataStream& towhere) const
void internalizeFromStream(IDataStream& fromwhere)
virtual const ITypeRepresentation& typeRepresentation() const = 0
IMDrawable()
IMDrawable(const IMDrawable&)
IMDrawable& operator =(const IMDrawable& source)
IMGraphic(IGrafBundle* adoptedBundle)
IMGraphic(const IMGraphic&)
IMGraphic& operator =(const IMGraphic& source)
virtual void readFromStream(IDataStream& toWhere)
virtual void resetTimeStamp()
void setHit(bool flag)
virtual void setTimeStamp(const unsigned long&)
virtual unsigned long timeStamp() const
virtual void updateTimeStamp()
virtual void writeToStream(IDataStream& toWhere) const
IMStreamable(const IMStreamable& other)
IMStreamable()
virtual void readFromStream(IDataStream& fromwhere) = 0
virtual void writeToStream(IDataStream& towhere) const = 0