xxxxxxxxxx
import std;
void main()
{
draw(null,
Rectf(0, 0, 256,256),
64,64,
0,0,
128,128,
1, 1, 0
);
}
void draw (void* texture,
Rectf region,
float x, float y,
float originX, float originY,
float width, float height,
float scaleX, float scaleY, float rotation)
{
assert(texture == null);
assert(region.x == 0);
assert(region.y == 0);
assert(region.width == 256);
assert(region.height == 256);
}
struct Rectf
{
float x = 0;
float y = 0;
float width = 0;
float height = 0;
}