Rework multi-resolution sprite handling:
- Sprite.Bounds now refers to rectangles in the source image. Use this when copying pixels, etc. - Sprite.Size now refers to sizes in effective pixel coordinates. Use this when rendering. - Sheet.DPIScale has been removed. - "Density" term is introduced to refer to the number of artwork pixels per effective pixel.
This commit is contained in:
@@ -117,6 +117,8 @@ namespace OpenRA.Primitives
|
||||
return rect == Intersect(this, rect);
|
||||
}
|
||||
|
||||
public static Rectangle operator *(int a, Rectangle b) { return new Rectangle(a * b.X, a * b.Y, a * b.Width, a * b.Height); }
|
||||
|
||||
public override string ToString()
|
||||
{
|
||||
return string.Format("{{X={0},Y={1},Width={2},Height={3}}}", X, Y, Width, Height);
|
||||
|
||||
Reference in New Issue
Block a user