DrawableMarginSpan.DrawLeadingMargin Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Overloads
| Name | Description |
|---|---|
| DrawLeadingMargin(Canvas, Paint, Int32, Int32, Int32, Int32, Int32, ICharSequence, Int32, Int32, Boolean, Layout) |
Renders the leading margin. |
| DrawLeadingMargin(Canvas, Paint, Int32, Int32, Int32, Int32, Int32, String, Int32, Int32, Boolean, Layout) |
Calls the character-sequence overload to draw the leading margin. |
DrawLeadingMargin(Canvas, Paint, Int32, Int32, Int32, Int32, Int32, ICharSequence, Int32, Int32, Boolean, Layout)
Renders the leading margin.
[Android.Runtime.Register("drawLeadingMargin", "(Landroid/graphics/Canvas;Landroid/graphics/Paint;IIIIILjava/lang/CharSequence;IIZLandroid/text/Layout;)V", "GetDrawLeadingMargin_Landroid_graphics_Canvas_Landroid_graphics_Paint_IIIIILjava_lang_CharSequence_IIZLandroid_text_Layout_Handler")]
public virtual void DrawLeadingMargin(Android.Graphics.Canvas c, Android.Graphics.Paint p, int x, int dir, int top, int baseline, int bottom, Java.Lang.ICharSequence text, int start, int end, bool first, Android.Text.Layout layout);
[<Android.Runtime.Register("drawLeadingMargin", "(Landroid/graphics/Canvas;Landroid/graphics/Paint;IIIIILjava/lang/CharSequence;IIZLandroid/text/Layout;)V", "GetDrawLeadingMargin_Landroid_graphics_Canvas_Landroid_graphics_Paint_IIIIILjava_lang_CharSequence_IIZLandroid_text_Layout_Handler")>]
abstract member DrawLeadingMargin : Android.Graphics.Canvas * Android.Graphics.Paint * int * int * int * int * int * Java.Lang.ICharSequence * int * int * bool * Android.Text.Layout -> unit
override this.DrawLeadingMargin : Android.Graphics.Canvas * Android.Graphics.Paint * int * int * int * int * int * Java.Lang.ICharSequence * int * int * bool * Android.Text.Layout -> unit
Parameters
- c
- Canvas
the canvas
- p
- Paint
the paint. The this should be left unchanged on exit.
- x
- Int32
the current position of the margin
- dir
- Int32
the base direction of the paragraph; if negative, the margin is to the right of the text, otherwise it is to the left.
- top
- Int32
the top of the line
- baseline
- Int32
the baseline of the line
- bottom
- Int32
the bottom of the line
- text
- ICharSequence
the text
- start
- Int32
the start of the line
- end
- Int32
the end of the line
- first
- Boolean
true if this is the first line of its paragraph
- layout
- Layout
the layout containing this line
Implements
- Attributes
Remarks
Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.
Applies to
DrawLeadingMargin(Canvas, Paint, Int32, Int32, Int32, Int32, Int32, String, Int32, Int32, Boolean, Layout)
Calls the character-sequence overload to draw the leading margin.
public void DrawLeadingMargin(Android.Graphics.Canvas c, Android.Graphics.Paint p, int x, int dir, int top, int baseline, int bottom, string text, int start, int end, bool first, Android.Text.Layout layout);
member this.DrawLeadingMargin : Android.Graphics.Canvas * Android.Graphics.Paint * int * int * int * int * int * string * int * int * bool * Android.Text.Layout -> unit
Parameters
- c
- Canvas
The canvas on which to draw the drawable.
- p
- Paint
The paint supplied by the layout. This implementation does not use it.
- x
- Int32
the current position of the margin
- dir
- Int32
the base direction of the paragraph; if negative, the margin is to the right of the text, otherwise it is to the left.
- top
- Int32
the top of the line
- baseline
- Int32
the baseline of the line
- bottom
- Int32
the bottom of the line
- text
- String
The line's text, passed to the character-sequence overload.
- start
- Int32
the start of the line
- end
- Int32
the end of the line
- first
- Boolean
true if this is the first line of its paragraph
- layout
- Layout
The layout used to find the top of the line where the span starts.
Remarks
This overload converts text to a Java string. The Android implementation requires ISpanned text and throws ClassCastException for a non-null string. Use the character-sequence overload with spanned text instead.
Android reference for android.text.style.DrawableMarginSpan.drawLeadingMargin.
Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.