public DrawableTexture(VirtualTexture texture, int x, int y, int w, int h) { Texture = texture; ClipRect = new Rectangle(x, y, w, h); Width = w; Height = h; Center = new Vector2(Width, Height) * 0.5f; DrawOffset = Vector2.Zero; NullableClipRect = new Rectangle?(ClipRect); }
public DrawableTexture(VirtualTexture texture, Vector2 drawOffset, int w, int h) { Texture = texture; ClipRect = new Rectangle(0, 0, Texture.Width, Texture.Height); DrawOffset = drawOffset; Width = w; Height = h; Center = new Vector2(Width, Height) * 0.5f; NullableClipRect = new Rectangle?(ClipRect); }
public DrawableTexture(VirtualTexture texture) { Texture = texture; ClipRect = new Rectangle(0, 0, Texture.Width, Texture.Height); DrawOffset = Vector2.Zero; Width = ClipRect.Width; Height = ClipRect.Height; Center = new Vector2(Width, Height) * 0.5f; NullableClipRect = new Rectangle?(ClipRect); }