|
|
@ -17,16 +17,19 @@
|
|
|
|
#endif /* __APPLE__ */
|
|
|
|
#endif /* __APPLE__ */
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** Coordinates of a point in 2D */
|
|
|
|
struct Point {
|
|
|
|
struct Point {
|
|
|
|
int x;
|
|
|
|
int x;
|
|
|
|
int y;
|
|
|
|
int y;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** Dimensions (a width and height) of a rectangle in 2D */
|
|
|
|
struct Dimension {
|
|
|
|
struct Dimension {
|
|
|
|
int width;
|
|
|
|
int width;
|
|
|
|
int height;
|
|
|
|
int height;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** Specification of a rectangle with absolute coordinates of all edges */
|
|
|
|
struct Rect {
|
|
|
|
struct Rect {
|
|
|
|
int left;
|
|
|
|
int left;
|
|
|
|
int top;
|
|
|
|
int top;
|
|
|
@ -34,6 +37,10 @@ struct Rect {
|
|
|
|
int bottom;
|
|
|
|
int bottom;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
|
|
* Specification of a rectangle with an absolute top-left coordinate and a
|
|
|
|
|
|
|
|
* (relative) width/height
|
|
|
|
|
|
|
|
*/
|
|
|
|
struct PointDimension {
|
|
|
|
struct PointDimension {
|
|
|
|
int x;
|
|
|
|
int x;
|
|
|
|
int y;
|
|
|
|
int y;
|
|
|
@ -41,6 +48,7 @@ struct PointDimension {
|
|
|
|
int height;
|
|
|
|
int height;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** A pair of two integers */
|
|
|
|
struct Pair {
|
|
|
|
struct Pair {
|
|
|
|
int a;
|
|
|
|
int a;
|
|
|
|
int b;
|
|
|
|
int b;
|
|
|
|