Table of Contents

Struct LoadSubTextureFromTexture

Namespace
BSGameLib.Game.Textures
Assembly
BSGameLib.Game.dll

Makes a sub-texture of Texture that covers the part at Position and of Size.

public readonly record struct LoadSubTextureFromTexture : ITextureParameters, IEquatable<LoadSubTextureFromTexture>
Implements
Inherited Members

Constructors

LoadSubTextureFromTexture(ITexture, Rectangle)

Creates the parameters from a texture and the bounds of the part.

public LoadSubTextureFromTexture(ITexture texture, Rectangle bounds)

Parameters

texture ITexture
bounds Rectangle

LoadSubTextureFromTexture(ITexture, Vector2, Vector2)

Makes a sub-texture of Texture that covers the part at Position and of Size.

public LoadSubTextureFromTexture(ITexture Texture, Vector2 Position, Vector2 Size)

Parameters

Texture ITexture

The texture the sub-texture is a part of.

Position Vector2

The top left corner of the part, in pixels.

Size Vector2

The width and height of the part, in pixels.

Properties

Position

The top left corner of the part, in pixels.

public Vector2 Position { get; init; }

Property Value

Vector2

Size

The width and height of the part, in pixels.

public Vector2 Size { get; init; }

Property Value

Vector2

Texture

The texture the sub-texture is a part of.

public ITexture Texture { get; init; }

Property Value

ITexture