mirror of
https://github.com/danbulant/Cosmos
synced 2026-05-21 05:18:38 +00:00
Added the possibility for an optimization step in the IL2CPU MSBuild task. Currently commented out, but should work fine with a few modifications to the optimizer. Moved classes that are dependent on Cosmos from the Orvid.Graphics, into the Orvid.Graphics.Cosmos assembly. Re-factored the font mechanism, added partially working .fnt Font support. Added a Rectangle class, and a Vec2d class, which is the same as Vec2, except with doubles for the X and Y values. Made a small aesthetic improvement to the output of the File2ByteArray Converter.
47 lines
938 B
C#
47 lines
938 B
C#
using System;
|
|
|
|
namespace Orvid.Graphics
|
|
{
|
|
public class Rectangle
|
|
{
|
|
private int x, y, width, height;
|
|
|
|
public int Height
|
|
{
|
|
get { return height; }
|
|
set { height = value; }
|
|
}
|
|
|
|
public int Width
|
|
{
|
|
get { return width; }
|
|
set { width = value; }
|
|
}
|
|
|
|
public int X
|
|
{
|
|
get { return x; }
|
|
set { x = value; }
|
|
}
|
|
|
|
public int Y
|
|
{
|
|
get { return y; }
|
|
set { y = value; }
|
|
}
|
|
|
|
public Rectangle() { }
|
|
public Rectangle(Rectangle rect)
|
|
{
|
|
SetBounds(rect.X, rect.Y, rect.Width, rect.Height);
|
|
}
|
|
|
|
public void SetBounds(int x, int y, int w, int h)
|
|
{
|
|
this.x = x;
|
|
this.y = y;
|
|
this.width = w;
|
|
this.height = h;
|
|
}
|
|
}
|
|
}
|