Dela via


Canvas.DrawRect Method

Definition

Overloads

DrawRect(Rect, Paint)

Draw the specified Rect using the specified Paint.

DrawRect(RectF, Paint)

Draw the specified Rect using the specified paint.

DrawRect(Single, Single, Single, Single, Paint)

Draw the specified Rect using the specified paint.

DrawRect(Rect, Paint)

Draw the specified Rect using the specified Paint.

[Android.Runtime.Register("drawRect", "(Landroid/graphics/Rect;Landroid/graphics/Paint;)V", "GetDrawRect_Landroid_graphics_Rect_Landroid_graphics_Paint_Handler")]
public virtual void DrawRect (Android.Graphics.Rect r, Android.Graphics.Paint paint);
[<Android.Runtime.Register("drawRect", "(Landroid/graphics/Rect;Landroid/graphics/Paint;)V", "GetDrawRect_Landroid_graphics_Rect_Landroid_graphics_Paint_Handler")>]
abstract member DrawRect : Android.Graphics.Rect * Android.Graphics.Paint -> unit
override this.DrawRect : Android.Graphics.Rect * Android.Graphics.Paint -> unit

Parameters

r
Rect

The rectangle to be drawn.

paint
Paint

The paint used to draw the rectangle

Attributes

Remarks

Draw the specified Rect using the specified Paint. The rectangle will be filled or framed based on the Style in the paint.

Java documentation for android.graphics.Canvas.drawRect(android.graphics.Rect, android.graphics.Paint).

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

DrawRect(RectF, Paint)

Draw the specified Rect using the specified paint.

[Android.Runtime.Register("drawRect", "(Landroid/graphics/RectF;Landroid/graphics/Paint;)V", "GetDrawRect_Landroid_graphics_RectF_Landroid_graphics_Paint_Handler")]
public virtual void DrawRect (Android.Graphics.RectF rect, Android.Graphics.Paint paint);
[<Android.Runtime.Register("drawRect", "(Landroid/graphics/RectF;Landroid/graphics/Paint;)V", "GetDrawRect_Landroid_graphics_RectF_Landroid_graphics_Paint_Handler")>]
abstract member DrawRect : Android.Graphics.RectF * Android.Graphics.Paint -> unit
override this.DrawRect : Android.Graphics.RectF * Android.Graphics.Paint -> unit

Parameters

rect
RectF

The rect to be drawn

paint
Paint

The paint used to draw the rect

Attributes

Remarks

Draw the specified Rect using the specified paint. The rectangle will be filled or framed based on the Style in the paint.

Java documentation for android.graphics.Canvas.drawRect(android.graphics.RectF, android.graphics.Paint).

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

DrawRect(Single, Single, Single, Single, Paint)

Draw the specified Rect using the specified paint.

[Android.Runtime.Register("drawRect", "(FFFFLandroid/graphics/Paint;)V", "GetDrawRect_FFFFLandroid_graphics_Paint_Handler")]
public virtual void DrawRect (float left, float top, float right, float bottom, Android.Graphics.Paint paint);
[<Android.Runtime.Register("drawRect", "(FFFFLandroid/graphics/Paint;)V", "GetDrawRect_FFFFLandroid_graphics_Paint_Handler")>]
abstract member DrawRect : single * single * single * single * Android.Graphics.Paint -> unit
override this.DrawRect : single * single * single * single * Android.Graphics.Paint -> unit

Parameters

left
Single

The left side of the rectangle to be drawn

top
Single

The top side of the rectangle to be drawn

right
Single

The right side of the rectangle to be drawn

bottom
Single

The bottom side of the rectangle to be drawn

paint
Paint

The paint used to draw the rect

Attributes

Remarks

Draw the specified Rect using the specified paint. The rectangle will be filled or framed based on the Style in the paint.

Java documentation for android.graphics.Canvas.drawRect(float, float, float, float, android.graphics.Paint).

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