Table of Contents

Struct LtrbPixelRect

Namespace
Avalonia.Platform
Assembly
Avalonia.Base.dll

This struct is essentially the same thing as RECT from win32 API Unlike our "normal" PixelRect which is more human-readable and human-usable this struct is optimized for actual processing that doesn't really care about Width and Height but pretty much always only cares about Right and Bottom edge coordinates

Not having to constantly convert between Width/Height and Right/Bottom for no actual reason saves us some perf

This structure is intended to be mostly internal, but it's exposed as a PrivateApi type so it can be passed to the drawing backend when needed

[PrivateApi]
public struct LtrbPixelRect
Inherited Members

Fields

Bottom

public int Bottom

Field Value

int

Left

public int Left

Field Value

int

Right

public int Right

Field Value

int

Top

public int Top

Field Value

int

Methods

Equals(LtrbPixelRect)

public bool Equals(LtrbPixelRect other)

Parameters

other LtrbPixelRect

Returns

bool

Equals(object?)

public override bool Equals(object? obj)

Parameters

obj object

Returns

bool

GetHashCode()

public override int GetHashCode()

Returns

int

Operators

operator ==(LtrbPixelRect, LtrbPixelRect)

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

Parameters

left LtrbPixelRect
right LtrbPixelRect

Returns

bool

operator !=(LtrbPixelRect, LtrbPixelRect)

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

Parameters

left LtrbPixelRect
right LtrbPixelRect

Returns

bool