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, System.Drawing.Font font, System.Drawing.RectangleF rectangle, TextOptions textOptions)Gets characters drawing Rectangles Resolution and AntiAlias Mode set in constructor
measureString(String str, float width, System.Drawing.Font font)Measure string with specified width, font.
notify()
notifyAll()
offsetRectangle(System.Drawing.RectangleF nativeRectangle, boolean isNoWrap, VerticalTextAlignment verticalAlignment)
reOffsetRectangle(System.Drawing.RectangleF symbolArea, System.Drawing.RectangleF nativeRectangle, System.Drawing.RectangleF offsetRectangle, HorizontalTextAlignment 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, System.Drawing.Font font, System.Drawing.RectangleF rectangle, TextOptions textOptions)

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

Gets characters drawing Rectangles Resolution and AntiAlias Mode set in constructor

Parameters:

ParameterTypeDescription
textjava.lang.Stringmeasuring text
fontcom.aspose.ms.System.Drawing.Fontmeasuring 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, System.Drawing.Font font)

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

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

Parameters:

ParameterTypeDescription
strjava.lang.StringA string
widthfloatA width
fontcom.aspose.ms.System.Drawing.FontA 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, VerticalTextAlignment verticalAlignment)

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

Parameters:

ParameterTypeDescription
nativeRectanglecom.aspose.ms.System.Drawing.RectangleF
isNoWrapboolean
verticalAlignmentcom.aspose.barcode.drawing.VerticalTextAlignment

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

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

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

Parameters:

ParameterTypeDescription
symbolAreacom.aspose.ms.System.Drawing.RectangleF
nativeRectanglecom.aspose.ms.System.Drawing.RectangleF
offsetRectanglecom.aspose.ms.System.Drawing.RectangleF
horisontalAlignmentcom.aspose.barcode.drawing.HorizontalTextAlignment

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