/** * Construct a new Surface from the given image resource */ public Surface(string Resourcepath) { texture = TextureManager.Get(Resourcepath); texture.Ref(); width = texture.ImageWidth; height = texture.ImageHeight; Left = 0; Top = 0; Right = texture.UVRight; Bottom = texture.UVBottom; }
/// <summary>Construct a new Surface from the given image resource</summary> public Surface(string Resourcepath) { texture = TextureManager.Get(Resourcepath); texture.Ref(); width = texture.ImageWidth; height = texture.ImageHeight; Left = 0; Top = 0; Right = texture.UVRight; Bottom = texture.UVBottom; }
public Surface(Surface other) { texture = other.texture; texture.Ref(); width = other.width; height = other.height; Left = other.Left; Top = other.Top; Right = other.Right; Bottom = other.Bottom; }
public Surface(string Resourcepath, float x, float y, float w, float h) { texture = TextureManager.Get(Resourcepath); texture.Ref(); width = w; height = h; Left = x / texture.Width; Top = y / texture.Height; Right = (x+w) / texture.Width; Bottom = (y+h) / texture.Height; }
public Surface(string Resourcepath, float x, float y, float w, float h) { texture = TextureManager.Get(Resourcepath); texture.Ref(); width = w; height = h; Left = x / texture.Width; Top = y / texture.Height; Right = (x + w) / texture.Width; Bottom = (y + h) / texture.Height; }