|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectcom.sap.ip.me.api.pios.printer.Metrics
This class represents a measurement (height, width) specified in points (1/72th of an inch units) for a field. This information then can be used to calculate the position of a field in a page. A field can be text, barcode or image.
Example: Centering text.
String TITLE = "This is My Title";
PrinterFont font = graphicPrinter.getFont("Scalable");
Metrics metrics = font.getMetrics(TITLE);
float center = (pageWidth/2) - (metrics.getWidth()/2);
graphicPrinter.drawText(font, center, 0, TITLE, GraphicPrinter.NO_ROTATION);
PrinterBarcode,
PrinterImage,
PrinterFont| Constructor Summary | |
protected |
Metrics(float width,
float height)
Creates a new Metrics object. |
| Method Summary | |
float |
getHeight()
Returns the height of a field in points. |
float |
getWidth()
Returns the width of a field in points. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
protected Metrics(float width,
float height)
width - the field width in points (1/72nds of an inch units)height - the field height in points (1/72nds of an inch units)| Method Detail |
public float getHeight()
public float getWidth()
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||