![]() |
ActionComponents
04.05.00
Customizable UI and time-saving tools for Android development with Xamarin and Visual Studio.
|
Helper extensions when working with Android drawing Canvas More...
Static Public Member Functions | |
static int | TextHeight (string text, int width, int maxlines, Paint textPaint) |
Calculates the height of a block of text to be drawn in a canvas given the wrapping width and the maximum number of lines to draw More... | |
static void | DrawTextBoxInCanvas (Canvas canvas, string text, int x, int y, int width, int maxlines, Paint textPaint) |
Draws a block of text at the given x,y coords in a canvas wrapping the text on the given width and stopping at the mx number of lines specified More... | |
static int | MeasureTextBlock (string text, int width, int maxlines, Paint textPaint) |
Measures the height of the given text drawn with the given style properties, wrapping the text at the given width and stopping after a maximum number of lines. More... | |
static void | DrawTextBlockInCanvas (Canvas canvas, string text, int x, int y, int width, int maxlines, Paint textPaint) |
Draws the given text at the given x,y coordinates in the given style in the given canvas. The text will be wrapping at the given width and will not exceed the given number of lines. The lines of text will be broken on word bounderies and newline or carriage returns can be included to force a line break. More... | |
static void | DrawTextBlockInCanvas (Canvas canvas, string text, CGRect rect, Paint textPaint, TextBlockAlignment align) |
Draws the given text at the given x,y coordinates in the given style in the given canvas. The text will be wrapping at the given width and will not exceed the given number of lines. The lines of text will be broken on word bounderies and newline or carriage returns can be included to force a line break. More... | |
static void | DrawTextBlockInCanvas (Canvas canvas, string text, int x, int y, int width, int maxlines, Paint textPaint, TextBlockAlignment align) |
Draws the given text at the given x,y coordinates in the given style in the given canvas. The text will be wrapping at the given width and will not exceed the given number of lines. The lines of text will be broken on word bounderies and newline or carriage returns can be included to force a line break. More... | |
static void | DrawTextAligned (Canvas canvas, string text, int x, int y, int width, int height, Paint textPaint, TextBlockAlignment alignHorizontal, TextBlockAlignment alignVertical) |
Draws a single line of text aligned horizontaly and vertically inside the rectangle specified by the x,y and given width, height. More... | |
static void | DrawTextAligned (Canvas canvas, string text, CGRect rect, Paint textPaint, TextBlockAlignment alignHorizontal, TextBlockAlignment alignVertical) |
Draws a single line of text aligned horizontaly and vertically inside the rectangle specified by the x,y and given width, height. More... | |
static void | DrawTextAligned (Canvas canvas, string text, int x, int y, int width, int height, Paint textPaint, TextBlockAlignment alignHorizontal) |
Draws a single line of text aligned horizontally inside the rectangle specified by the x, y and the given width. More... | |
static void | DrawTextAligned (Canvas canvas, string text, CGRect rect, Paint textPaint, TextBlockAlignment alignHorizontal) |
Draws a single line of text aligned horizontally inside the rectangle specified by the x, y and the given width. More... | |
Helper extensions when working with Android drawing Canvas
|
static |
Draws a single line of text aligned horizontaly and vertically inside the rectangle specified by the x,y and given width, height.
canvas | Canvas. |
text | Text. |
x | The x coordinate. |
y | The y coordinate. |
width | Width. |
height | Height. |
textPaint | Text paint. |
alignHorizontal | Align horizontal. |
alignVertical | Align vertical. |
|
static |
Draws a single line of text aligned horizontaly and vertically inside the rectangle specified by the x,y and given width, height.
canvas | Canvas. |
text | Text. |
rect | Rect. |
textPaint | Text paint. |
alignHorizontal | Align horizontal. |
alignVertical | Align vertical. |
|
static |
Draws a single line of text aligned horizontally inside the rectangle specified by the x, y and the given width.
canvas | Canvas. |
text | Text. |
x | The x coordinate. |
y | The y coordinate. |
width | Width. |
height | Height. |
textPaint | Text paint. |
alignHorizontal | Align horizontal. |
|
static |
Draws a single line of text aligned horizontally inside the rectangle specified by the x, y and the given width.
canvas | Canvas. |
text | Text. |
rect | Rect. |
textPaint | Text paint. |
alignHorizontal | Align horizontal. |
|
static |
Draws the given text at the given x,y coordinates in the given style in the given canvas. The text will be wrapping at the given width and will not exceed the given number of lines. The lines of text will be broken on word bounderies and newline or carriage returns can be included to force a line break.
canvas | Canvas. |
text | Text. |
x | The x coordinate. |
y | The y coordinate. |
width | Width. |
maxlines | Maxlines. |
textPaint | Text paint. |
This routine breaks on words
|
static |
Draws the given text at the given x,y coordinates in the given style in the given canvas. The text will be wrapping at the given width and will not exceed the given number of lines. The lines of text will be broken on word bounderies and newline or carriage returns can be included to force a line break.
canvas | Canvas. |
text | Text. |
rect | Rect. |
textPaint | Text paint. |
align | Align. |
|
static |
Draws the given text at the given x,y coordinates in the given style in the given canvas. The text will be wrapping at the given width and will not exceed the given number of lines. The lines of text will be broken on word bounderies and newline or carriage returns can be included to force a line break.
canvas | Canvas. |
text | Text. |
x | The x coordinate. |
y | The y coordinate. |
width | Width. |
maxlines | Maxlines. |
textPaint | Text paint. |
align | The text alignment |
This routine breaks on words
|
static |
Draws a block of text at the given x,y coords in a canvas wrapping the text on the given width and stopping at the mx number of lines specified
canvas | Canvas. |
text | Text. |
x | The x coordinate. |
y | The y coordinate. |
width | Width. |
maxlines | Maxlines. |
textPaint | Text paint. |
This routine breaks on character not words
|
static |
Measures the height of the given text drawn with the given style properties, wrapping the text at the given width and stopping after a maximum number of lines.
text | Text. |
width | Width. |
maxlines | Maxlines. |
textPaint | Text paint. |
This routine breaks on words
|
static |
Calculates the height of a block of text to be drawn in a canvas given the wrapping width and the maximum number of lines to draw
text | Text. |
width | Width. |
maxlines | Maxlines. |
textPaint | Text paint. |
This routines breaks on character not words