public class TextPiece extends java.lang.Object implements TextPrintPiece
| Constructor and Description |
|---|
TextPiece(org.eclipse.swt.graphics.Device device,
TextStyle style,
java.lang.String[] text,
org.eclipse.swt.graphics.Point size,
int ascent) |
| Modifier and Type | Method and Description |
|---|---|
void |
dispose()
Disposes the system resources allocated by this PrintPiece.
|
int |
getAscent()
Returns the ascent of the first line of text, in pixels.
|
org.eclipse.swt.graphics.Point |
getSize()
Returns the dimensions of this PrintPiece, in pixels.
|
void |
paint(org.eclipse.swt.graphics.GC gc,
int x,
int y)
Draws this PrintPiece on the given graphics device, at the given
coordinates.
|
public TextPiece(org.eclipse.swt.graphics.Device device,
TextStyle style,
java.lang.String[] text,
org.eclipse.swt.graphics.Point size,
int ascent)
public org.eclipse.swt.graphics.Point getSize()
PrintPiecegetSize in interface PrintPiecepublic int getAscent()
TextPrintPiecegetAscent in interface TextPrintPiecepublic void paint(org.eclipse.swt.graphics.GC gc,
int x,
int y)
PrintPiecepaint in interface PrintPiecegc - a graphics context for the graphics device.x - the x coordinate where this PrintPiece will be drawn.y - the x coordinate where this PrintPiece will be drawn.public void dispose()
PrintPiecedispose in interface PrintPiece