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
Constructor | Description |
---|---|
TextMeasurer(float dpi, AntiAliasMode antiAliasMode) | Initializes new instance of class TextMeasurer . |
Methods
Method | Description |
---|---|
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:
Parameter | Type | Description |
---|---|---|
dpi | float | Dpi of target canvas |
antiAliasMode | com.aspose.barcode.drawing.AntiAliasMode | Text antialising mode |
dispose()
public void dispose()
Disposes measurer and internal resources.
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
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:
Parameter | Type | Description |
---|---|---|
text | java.lang.String | measuring text |
font | com.aspose.ms.System.Drawing.Font | measuring font |
rectangle | com.aspose.ms.System.Drawing.RectangleF | bounding rectangle |
textOptions | com.aspose.barcode.drawing.TextOptions | text 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:
Parameter | Type | Description |
---|---|---|
str | java.lang.String | A string |
width | float | A width |
font | com.aspose.ms.System.Drawing.Font | A 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:
Parameter | Type | Description |
---|---|---|
nativeRectangle | com.aspose.ms.System.Drawing.RectangleF | |
isNoWrap | boolean | |
verticalAlignment | com.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:
Parameter | Type | Description |
---|---|---|
symbolArea | com.aspose.ms.System.Drawing.RectangleF | |
nativeRectangle | com.aspose.ms.System.Drawing.RectangleF | |
offsetRectangle | com.aspose.ms.System.Drawing.RectangleF | |
horisontalAlignment | com.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:
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 |