+ Texture.Aspect
+ Transformation.ApplyTextureSize(Texture texture) & Transformation.ApplyTextureSize(Texture texture, float width)
This commit is contained in:
parent
1a0148ff90
commit
57fb71d01b
4 changed files with 34 additions and 4 deletions
|
|
@ -25,6 +25,22 @@ namespace SM.Base.Textures
|
|||
/// </summary>
|
||||
public Bitmap Map;
|
||||
|
||||
/// <inheritdoc />
|
||||
public override int Width
|
||||
{
|
||||
get => Map.Width;
|
||||
protected set
|
||||
{ }
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
public override int Height
|
||||
{
|
||||
get => Map.Height;
|
||||
protected set {}
|
||||
}
|
||||
public float Aspect { get; private set; }
|
||||
|
||||
/// <summary>
|
||||
/// Empty constructor
|
||||
/// </summary>
|
||||
|
|
@ -50,6 +66,9 @@ namespace SM.Base.Textures
|
|||
public Texture(Bitmap map, TextureMinFilter filter, TextureWrapMode wrapMode)
|
||||
{
|
||||
Map = map;
|
||||
|
||||
Aspect = (float)map.Width / map.Height;
|
||||
|
||||
Filter = filter;
|
||||
WrapMode = wrapMode;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue