Udostępnij za pośrednictwem


Layout.Draw Method

Definition

Overloads

Draw(Canvas, Path, Paint, Int32)

Draw this Layout on the specified canvas, with the highlight path drawn between the background and the text.

Draw(Canvas, IList<Path>, IList<Paint>, Path, Paint, Int32)

Draw this layout on the specified canvas.

Draw(Canvas)

Draw this Layout on the specified Canvas.

Draw(Canvas, Path, Paint, Int32)

Draw this Layout on the specified canvas, with the highlight path drawn between the background and the text.

[Android.Runtime.Register("draw", "(Landroid/graphics/Canvas;Landroid/graphics/Path;Landroid/graphics/Paint;I)V", "GetDraw_Landroid_graphics_Canvas_Landroid_graphics_Path_Landroid_graphics_Paint_IHandler")]
public virtual void Draw (Android.Graphics.Canvas? canvas, Android.Graphics.Path? selectionHighlight, Android.Graphics.Paint? selectionHighlightPaint, int cursorOffsetVertical);
[<Android.Runtime.Register("draw", "(Landroid/graphics/Canvas;Landroid/graphics/Path;Landroid/graphics/Paint;I)V", "GetDraw_Landroid_graphics_Canvas_Landroid_graphics_Path_Landroid_graphics_Paint_IHandler")>]
abstract member Draw : Android.Graphics.Canvas * Android.Graphics.Path * Android.Graphics.Paint * int -> unit
override this.Draw : Android.Graphics.Canvas * Android.Graphics.Path * Android.Graphics.Paint * int -> unit

Parameters

canvas
Canvas

the canvas

selectionHighlight
Path

the path of the selection highlight or cursor; can be null

selectionHighlightPaint
Paint

the paint for the selection highlight

cursorOffsetVertical
Int32

the amount to temporarily translate the canvas while rendering the highlight

Attributes

Remarks

Draw this Layout on the specified canvas, with the highlight path drawn between the background and the text.

Java documentation for android.text.Layout.draw(android.graphics.Canvas, android.graphics.Path, android.graphics.Paint, int).

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

Draw(Canvas, IList<Path>, IList<Paint>, Path, Paint, Int32)

Draw this layout on the specified canvas.

[Android.Runtime.Register("draw", "(Landroid/graphics/Canvas;Ljava/util/List;Ljava/util/List;Landroid/graphics/Path;Landroid/graphics/Paint;I)V", "GetDraw_Landroid_graphics_Canvas_Ljava_util_List_Ljava_util_List_Landroid_graphics_Path_Landroid_graphics_Paint_IHandler", ApiSince=34)]
public virtual void Draw (Android.Graphics.Canvas canvas, System.Collections.Generic.IList<Android.Graphics.Path>? highlightPaths, System.Collections.Generic.IList<Android.Graphics.Paint>? highlightPaints, Android.Graphics.Path? selectionPath, Android.Graphics.Paint? selectionPaint, int cursorOffsetVertical);
[<Android.Runtime.Register("draw", "(Landroid/graphics/Canvas;Ljava/util/List;Ljava/util/List;Landroid/graphics/Path;Landroid/graphics/Paint;I)V", "GetDraw_Landroid_graphics_Canvas_Ljava_util_List_Ljava_util_List_Landroid_graphics_Path_Landroid_graphics_Paint_IHandler", ApiSince=34)>]
abstract member Draw : Android.Graphics.Canvas * System.Collections.Generic.IList<Android.Graphics.Path> * System.Collections.Generic.IList<Android.Graphics.Paint> * Android.Graphics.Path * Android.Graphics.Paint * int -> unit
override this.Draw : Android.Graphics.Canvas * System.Collections.Generic.IList<Android.Graphics.Path> * System.Collections.Generic.IList<Android.Graphics.Paint> * Android.Graphics.Path * Android.Graphics.Paint * int -> unit

Parameters

canvas
Canvas

the canvas

highlightPaths
IList<Path>

the path of the highlights. The highlightPaths and highlightPaints must have the same length and aligned in the same order. For example, the paint of the n-th of the highlightPaths should be stored at the n-th of highlightPaints.

highlightPaints
IList<Paint>

the paints for the highlights. The highlightPaths and highlightPaints must have the same length and aligned in the same order. For example, the paint of the n-th of the highlightPaths should be stored at the n-th of highlightPaints.

selectionPath
Path

the selection or cursor path

selectionPaint
Paint

the paint for the selection or cursor.

cursorOffsetVertical
Int32

the amount to temporarily translate the canvas while rendering the highlight

Attributes

Remarks

Draw this layout on the specified canvas.

This API draws background first, then draws highlight paths on top of it, then draws selection or cursor, then finally draws text on top of it.

Java documentation for android.text.Layout.draw(android.graphics.Canvas, java.util.List<android.graphics.Path>, java.util.List<android.graphics.Paint>, android.graphics.Path, android.graphics.Paint, int).

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

Draw(Canvas)

Draw this Layout on the specified Canvas.

[Android.Runtime.Register("draw", "(Landroid/graphics/Canvas;)V", "GetDraw_Landroid_graphics_Canvas_Handler")]
public virtual void Draw (Android.Graphics.Canvas? c);
[<Android.Runtime.Register("draw", "(Landroid/graphics/Canvas;)V", "GetDraw_Landroid_graphics_Canvas_Handler")>]
abstract member Draw : Android.Graphics.Canvas -> unit
override this.Draw : Android.Graphics.Canvas -> unit

Parameters

c
Canvas
Attributes

Remarks

Draw this Layout on the specified Canvas.

This API draws background first, then draws text on top of it.

Java documentation for android.text.Layout.draw(android.graphics.Canvas).

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