RenderingUtils
Inheritance: java.lang.Object
public class RenderingUtils
Provides utility methods for rendering.
Methods
drawText(Font font, GlyphId[] glyphIds, double fontSize)
public static InputStream drawText(Font font, GlyphId[] glyphIds, double fontSize)
Rendering text in BitMap. Return result in PNG-format as stream of bytes
Parameters:
Parameter | Type | Description |
---|---|---|
font | Font | Font |
glyphIds | GlyphId[] | Text represented as array of glyph identifiers |
fontSize | double | Font size |
Returns: java.io.InputStream - Image in PNG format as stream of bytes
drawText(Font font, GlyphId[] glyphIds, double fontSize, RenderingUtils.LineSpacingType lineSpacingType, int lineSpacingValue, int maxWidth)
public static InputStream drawText(Font font, GlyphId[] glyphIds, double fontSize, RenderingUtils.LineSpacingType lineSpacingType, int lineSpacingValue, int maxWidth)
Rendering text in BitMap. Return result in PNG-format as stream of bytes
Parameters:
Parameter | Type | Description |
---|---|---|
font | Font | Font |
glyphIds | GlyphId[] | Text represented as array of glyph identifiers |
fontSize | double | Font size |
lineSpacingType | LineSpacingType | Type of line spacing. Number of pixels or percent of font height |
lineSpacingValue | int | Value of line spacing |
maxWidth | int | Max width in pixels for image |
Returns: java.io.InputStream - Image in PNG format as stream of bytes
drawText(Font font, String text, double fontSize)
public static InputStream drawText(Font font, String text, double fontSize)
Rendering text in BitMap.
Parameters:
Parameter | Type | Description |
---|---|---|
font | Font | The font. |
text | java.lang.String | The text. |
fontSize | double | The font size. |
Returns: java.io.InputStream - The PNG image with the text as a stream of bytes.
drawText(Font font, String text, double fontSize, RenderingUtils.LineSpacingType lineSpacingType, int lineSpacingValue, int maxWidth)
public static InputStream drawText(Font font, String text, double fontSize, RenderingUtils.LineSpacingType lineSpacingType, int lineSpacingValue, int maxWidth)
Rendering text in BitMap.
Parameters:
Parameter | Type | Description |
---|---|---|
font | Font | The font. |
text | java.lang.String | The text. |
fontSize | double | The font size. |
lineSpacingType | LineSpacingType | The type of line spacing. Number of pixels or percent of font height. |
lineSpacingValue | int | The value of line spacing. |
maxWidth | int | The maximum width in pixels for the resulting image. |
Returns: java.io.InputStream - The PNG image with the text as a stream of bytes.
equals(Object arg0)
public boolean equals(Object arg0)
Parameters:
Parameter | Type | Description |
---|---|---|
arg0 | java.lang.Object |
Returns: boolean
getClass()
public final native Class<?> getClass()
Returns: java.lang.Class
hashCode()
public native int hashCode()
Returns: int
notify()
public final native void notify()
notifyAll()
public final native void notifyAll()
toString()
public String toString()
Returns: java.lang.String
wait()
public final void wait()
wait(long arg0)
public final native void wait(long arg0)
Parameters:
Parameter | Type | Description |
---|---|---|
arg0 | long |
wait(long arg0, int arg1)
public final void wait(long arg0, int arg1)
Parameters:
Parameter | Type | Description |
---|---|---|
arg0 | long | |
arg1 | int |