TextMeasurer

Inheritance: java.lang.Object

All Implemented Interfaces: com.aspose.barcode.internal.ITextMeasurer

public class TextMeasurer implements ITextMeasurer

Represents text measurer. Full Framework implementation. TODO: Cache bitmap and graphics

Constructors

ConstructorDescription
TextMeasurer(float dpi, AntiAliasMode antiAliasMode)Initializes new instance of class TextMeasurer .

Methods

MethodDescription
dispose()Disposes measurer and internal resources.
equals(Object arg0)
getClass()
hashCode()
measureCharacterRanges(String text, TextPaint font, System.Drawing.RectangleF rectangle, TextOptions textOptions)Gets characters drawing Rectangles Resolution and AntiAlias Mode set in constructor
measureString(String str, float width, TextPaint font)Measure string with specified width, font.
notify()
notifyAll()
offsetRectangle(System.Drawing.RectangleF nativeRectangle, boolean isNoWrap, int verticalAlignment)
reOffsetRectangle(System.Drawing.RectangleF symbolArea, System.Drawing.RectangleF nativeRectangle, System.Drawing.RectangleF offsetRectangle, int horisontalAlignment)
toString()
wait()
wait(long arg0)
wait(long arg0, int arg1)

TextMeasurer(float dpi, AntiAliasMode antiAliasMode)

public TextMeasurer(float dpi, AntiAliasMode antiAliasMode)

Initializes new instance of class TextMeasurer .

Parameters:

ParameterTypeDescription
dpifloatDpi of target canvas
antiAliasModecom.aspose.barcode.drawing.AntiAliasModeText antialising mode

dispose()

public void dispose()

Disposes measurer and internal resources.

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

measureCharacterRanges(String text, TextPaint font, System.Drawing.RectangleF rectangle, TextOptions textOptions)

public System.Drawing.RectangleF[] measureCharacterRanges(String text, TextPaint font, System.Drawing.RectangleF rectangle, TextOptions textOptions)

Gets characters drawing Rectangles Resolution and AntiAlias Mode set in constructor

Parameters:

ParameterTypeDescription
textjava.lang.Stringmeasuring text
fontandroid.text.TextPaintmeasuring font
rectanglecom.aspose.ms.System.Drawing.RectangleFbounding rectangle
textOptionscom.aspose.barcode.drawing.TextOptionstext alignment

Returns: com.aspose.ms.System.Drawing.RectangleF[] - characters rectangles

measureString(String str, float width, TextPaint font)

public System.Drawing.SizeF measureString(String str, float width, TextPaint font)

Measure string with specified width, font. Resolution and AntiAlias Mode set in constructor

Parameters:

ParameterTypeDescription
strjava.lang.StringA string
widthfloatA width
fontandroid.text.TextPaintA font

Returns: com.aspose.ms.System.Drawing.SizeF - Size of a string

notify()

public final native void notify()

notifyAll()

public final native void notifyAll()

offsetRectangle(System.Drawing.RectangleF nativeRectangle, boolean isNoWrap, int verticalAlignment)

public static System.Drawing.RectangleF offsetRectangle(System.Drawing.RectangleF nativeRectangle, boolean isNoWrap, int verticalAlignment)

Parameters:

ParameterTypeDescription
nativeRectanglecom.aspose.ms.System.Drawing.RectangleF
isNoWrapboolean
verticalAlignmentint

Returns: com.aspose.ms.System.Drawing.RectangleF

reOffsetRectangle(System.Drawing.RectangleF symbolArea, System.Drawing.RectangleF nativeRectangle, System.Drawing.RectangleF offsetRectangle, int horisontalAlignment)

public static void reOffsetRectangle(System.Drawing.RectangleF symbolArea, System.Drawing.RectangleF nativeRectangle, System.Drawing.RectangleF offsetRectangle, int horisontalAlignment)

Parameters:

ParameterTypeDescription
symbolAreacom.aspose.ms.System.Drawing.RectangleF
nativeRectanglecom.aspose.ms.System.Drawing.RectangleF
offsetRectanglecom.aspose.ms.System.Drawing.RectangleF
horisontalAlignmentint

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