RenderingUtils

Inheritance: java.lang.Object

public class RenderingUtils

Provides utility methods for rendering.

Methods

MethodDescription
drawText(Font font, GlyphId[] glyphIds, double fontSize)Rendering text in BitMap.
drawText(Font font, GlyphId[] glyphIds, double fontSize, RenderingUtils.LineSpacingType lineSpacingType, int lineSpacingValue, int maxWidth)Rendering text in BitMap.
drawText(Font font, String text, double fontSize)Rendering text in BitMap.
drawText(Font font, String text, double fontSize, RenderingUtils.LineSpacingType lineSpacingType, int lineSpacingValue, int maxWidth)Rendering text in BitMap.
equals(Object arg0)
getClass()
hashCode()
notify()
notifyAll()
toString()
wait()
wait(long arg0)
wait(long arg0, int arg1)

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:

ParameterTypeDescription
fontFontFont
glyphIdsGlyphId[]Text represented as array of glyph identifiers
fontSizedoubleFont 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:

ParameterTypeDescription
fontFontFont
glyphIdsGlyphId[]Text represented as array of glyph identifiers
fontSizedoubleFont size
lineSpacingTypeLineSpacingTypeType of line spacing. Number of pixels or percent of font height
lineSpacingValueintValue of line spacing
maxWidthintMax 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:

ParameterTypeDescription
fontFontThe font.
textjava.lang.StringThe text.
fontSizedoubleThe 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:

ParameterTypeDescription
fontFontThe font.
textjava.lang.StringThe text.
fontSizedoubleThe font size.
lineSpacingTypeLineSpacingTypeThe type of line spacing. Number of pixels or percent of font height.
lineSpacingValueintThe value of line spacing.
maxWidthintThe 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:

ParameterTypeDescription
arg0java.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:

ParameterTypeDescription
arg0long

wait(long arg0, int arg1)

public final void wait(long arg0, int arg1)

Parameters:

ParameterTypeDescription
arg0long
arg1int