Struct LoadSubTextureFromTexture
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
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
TextureITextureThe texture the sub-texture is a part of.
PositionVector2The top left corner of the part, in pixels.
SizeVector2The 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
Size
The width and height of the part, in pixels.
public Vector2 Size { get; init; }
Property Value
Texture
The texture the sub-texture is a part of.
public ITexture Texture { get; init; }