SKRoundRect Class

Definition

Represents a rounded rectangle with a potentially different radii for each corner.

public class SKRoundRect : SkiaSharp.SKObject
Inheritance

Remarks

If either of a corner's radii are 0 the corner will be square and negative radii are not allowed (they are clamped to zero).

Constructors

SKRoundRect()

Creates a new instance of SKRoundRect with all values initialized to 0.

SKRoundRect(SKRect)

Creates a new instance of SKRoundRect with all radii set to 0.

SKRoundRect(SKRect, Single)

Creates a new instance of SKRoundRect with the same radii for all four corners.

SKRoundRect(SKRect, Single, Single)

Creates a new instance of SKRoundRect with the same radii for all four corners.

SKRoundRect(SKRoundRect)

Creates a copy of a SKRoundRect.

Properties

AllCornersCircular

Gets a value indicating whether all four corners are circular (with the x- and y-axis equal).

Handle

Gets or sets the handle to the underlying native object.

(Inherited from SKObject)
Height

Gets the height of the rectangle.

IgnorePublicDispose

Gets or sets a value indicating whether the call the public Dispose() should be no-op.

(Inherited from SKNativeObject)
IsDisposed

Gets or sets a value indicating whether the object has already been disposed.

(Inherited from SKNativeObject)
IsValid

Gets a value indicating whether the rectangle has a valid bounds, radii and type.

OwnsHandle

Gets a value indicating whether this object should destroy the underlying native object.

(Inherited from SKObject)
Radii

Gets the radii of the corners.

Rect

Gets the rectangle bounds of the rounded rectangle.

Type

Gets a value indicating what sub-type of rounded rectangle this instance is.

Width

Gets the width of the rectangle.

Methods

CheckAllCornersCircular(Single)

Check to see whether all four corners are circular (with the x- and y-axis equal).

Contains(SKRect)

Determines whether the specified rectangle is wholly contained within the rounded rectangle.

Deflate(Single, Single)

Deflate the rectangle by the specified amount.

Deflate(SKSize)

Deflate the rectangle by the specified amount.

Dispose()

Releases all resources used by this SKNativeObject.

(Inherited from SKNativeObject)
Dispose(Boolean)

Releases the unmanaged resources used by the SKRoundRect and optionally releases the managed resources.

DisposeInternal()

Triggers a dispose, ignoring the value of IgnorePublicDispose.

(Inherited from SKNativeObject)
DisposeManaged()

Implemented by derived SKObject types to destroy any managed objects.

(Inherited from SKObject)
DisposeNative()

Implemented by derived SKObject types to destroy any native objects.

DisposeNative()

Implemented by derived SKObject types to destroy any native objects.

(Inherited from SKObject)
DisposeUnownedManaged() (Inherited from SKObject)
GetRadii(SKRoundRectCorner)

Retrieves the radii of the specified corner.

Inflate(Single, Single)

Inflate the rectangle by the specified amount.

Inflate(SKSize)

Inflate the rectangle by the specified amount.

Offset(Single, Single)

Translate the rectangle by the specified amount.

Offset(SKPoint)

Translate the rectangle by the specified amount.

SetEmpty()

Set this rounded rectangle to an empty rectangle (with all values 0).

SetNinePatch(SKRect, Single, Single, Single, Single)

Set this rounded rectangle to a nine-patch rectangle.

SetOval(SKRect)

Set this rectangle to be an oval.

SetRect(SKRect)

Set this rectangle to be a simple rectangle.

SetRect(SKRect, Single, Single)

Set this rectangle to be a simple rounded rectangle.

SetRectRadii(SKRect, SKPoint[])

Set this rectangle to be a rounded rectangle.

Transform(SKMatrix)

Create a new rounded rectangle that is transformed by the specified matrix.

TryTransform(SKMatrix, SKRoundRect)

Create a new rounded rectangle that is transformed by the specified matrix.

Applies to