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, 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:
| 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, 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:
| Parameter | Type | Description |
|---|---|---|
| text | java.lang.String | measuring text |
| font | android.text.TextPaint | 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, 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:
| Parameter | Type | Description |
|---|---|---|
| str | java.lang.String | A string |
| width | float | A width |
| font | android.text.TextPaint | 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, int verticalAlignment)
public static System.Drawing.RectangleF offsetRectangle(System.Drawing.RectangleF nativeRectangle, boolean isNoWrap, int verticalAlignment)
Parameters:
| Parameter | Type | Description |
|---|---|---|
| nativeRectangle | com.aspose.ms.System.Drawing.RectangleF | |
| isNoWrap | boolean | |
| verticalAlignment | int |
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:
| 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 | int |
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 |