Skip to main content

Struct SKRect

Namespace: SkiaSharp
Assembly: VelloSharp.Skia.Core.dll

public readonly struct SKRect : IEquatable<SKRect>

Implements

IEquatable<SKRect>

Inherited Members

object.Equals(object?), object.Equals(object?, object?), object.GetHashCode(), object.GetType(), object.ReferenceEquals(object?, object?), object.ToString()

Constructors

SKRect(float, float, float, float)

public SKRect(float left, float top, float right, float bottom)

Parameters

left float

top float

right float

bottom float

Properties

Bottom

public float Bottom { get; }

Property Value

float

Height

public float Height { get; }

Property Value

float

IsEmpty

public bool IsEmpty { get; }

Property Value

bool

Left

public float Left { get; }

Property Value

float

Right

public float Right { get; }

Property Value

float

Top

public float Top { get; }

Property Value

float

Width

public float Width { get; }

Property Value

float

Methods

Contains(SKPoint)

public bool Contains(SKPoint point)

Parameters

point SKPoint

Returns

bool

Create(float, float, float, float)

public static SKRect Create(float left, float top, float width, float height)

Parameters

left float

top float

width float

height float

Returns

SKRect

Equals(SKRect)

Indicates whether the current object is equal to another object of the same type.

public bool Equals(SKRect other)

Parameters

other SKRect

An object to compare with this object.

Returns

bool

true if the current object is equal to the other parameter; otherwise, false.

Equals(object?)

Indicates whether this instance and a specified object are equal.

public override bool Equals(object? obj)

Parameters

obj object?

The object to compare with the current instance.

Returns

bool

true if obj and this instance are the same type and represent the same value; otherwise, false.

GetHashCode()

Returns the hash code for this instance.

public override int GetHashCode()

Returns

int

A 32-bit signed integer that is the hash code for this instance.

Operators

operator ==(SKRect, SKRect)

public static bool operator ==(SKRect left, SKRect right)

Parameters

left SKRect

right SKRect

Returns

bool

operator !=(SKRect, SKRect)

public static bool operator !=(SKRect left, SKRect right)

Parameters

left SKRect

right SKRect

Returns

bool