SKRect Struct

Definition

Stores a set of four floating-point numbers that represent the upper-left corner and lower-right corner of a rectangle.

public struct SKRect
public struct SKRect : IEquatable<SkiaSharp.SKRect>
Inheritance
SKRect
Implements

Constructors

SKRect(Single, Single, Single, Single)

Initializes a new instance of the SKRect class with the specified upper-left corner and lower-right corner.

Fields

Empty

Represents a new instance of the SKRect class with member data left uninitialized.

Properties

Bottom

Gets or sets the y-coordinate of the bottom edge of this SKRect structure.

Height

Gets the height of the SKRect.

IsEmpty

Gets a value indicating whether this rectangle has a zero size and location.

Left

Gets or sets the x-coordinate of the left edge of this SKRect structure.

Location

Gets or sets the offset of the rectangle.

MidX

Gets the x-coordinate of the middle of this rectangle.

MidY

Gets the y-coordinate of the middle of this rectangle.

Right

Gets or sets the x-coordinate of the right edge of this SKRect structure.

Size

Gets or sets the size of the rectangle.

Standardized

Gets this rectangle and a new rectangle with a positive width and height.

Top

Gets or sets the y-coordinate of the top edge of this SKRect structure.

Width

Gets the width of the rectangle.

Methods

AspectFill(SKSize)

Calculates the smallest rectangle that will fill the current rectangle using the specified size.

AspectFit(SKSize)

Calculates the largest rectangle that will fit inside the current rectangle using the specified size.

Contains(Single, Single)

Determines whether the specified coordinates are inside this rectangle.

Contains(SKPoint)

Determines whether the specified point is inside this rectangle.

Contains(SKRect)

Determines whether the specified rectangle is inside this rectangle.

Create(Single, Single)

Creates a new rectangle with the specified size.

Create(Single, Single, Single, Single)

Creates a new rectangle with the specified location and size.

Create(SKPoint, SKSize)

Creates a new rectangle with the specified location and size.

Create(SKSize)

Creates a new rectangle with the specified size.

Equals(Object)

Specifies whether this rectangle contains the same coordinates as the specified Object.

Equals(SKRect)

Specifies whether this rectangle contains the same coordinates as the specified SKRect.

GetHashCode()

Calculates the hashcode for this rectangle.

Inflate(Single, Single)

Enlarges this SKRect structure by the specified amount.

Inflate(SKRect, Single, Single)

Creates and returns an enlarged copy of the specified SKRect structure. The copy is enlarged by the specified amount and the original rectangle remains unmodified.

Inflate(SKSize)

Enlarges this SKRect structure by the specified amount.

Intersect(SKRect)

Replaces this SKRect structure with the intersection of itself and the specified SKRect structure.

Intersect(SKRect, SKRect)

Returns a SKRect structure that represents the intersection of two rectangles. If there is no intersection, and empty SKRect is returned.

IntersectsWith(SKRect)

Determines if this rectangle intersects with another rectangle.

IntersectsWithInclusive(SKRect)

Determines if this rectangle intersects with another rectangle.

Offset(Single, Single)

Translates the this rectangle by the specified amount.

Offset(SKPoint)

Translates the this rectangle by the specified amount.

ToString()

Converts this SKRect to a human readable string.

Union(SKRect)

Replaces this SKRect structure with the union of itself and the specified SKRect structure.

Union(SKRect, SKRect)

Creates the smallest possible third rectangle that can contain both of two rectangles that form a union.

Operators

Equality(SKRect, SKRect)

Tests whether two SKRect structures have equal coordinates.

Implicit(SKRectI to SKRect)

Converts the specified SKRectI structure to a SKRect structure.

Inequality(SKRect, SKRect)

Tests whether two SKRect structures differ in coordinates.

Applies to