5 #include <iink/Engine.h>
6 #include <iink/graphics/Point.h>
7 #include <iink/graphics/Rectangle.h>
158 IINK_API
void scale(
double s) noexcept;
174 IINK_API
void scale(
double sx,
double sy) noexcept;
206 IINK_API
void rotate(
double a,
double x0,
double y0);
222 IINK_API
void rotate(
double cosA,
double sinA);
240 IINK_API
void rotate(
double cosA,
double sinA,
double x0,
double y0);
261 float x = (float)(p.x *
xx + p.y *
yx +
tx);
262 float y = (float)(p.x *
xy + p.y *
yy +
ty);
275 apply(points, 0, count);
285 void apply(
Point* points,
int offset,
int count)
const noexcept
287 for (
int i = 0; i < count; ++i)
288 apply(points[offset + i]);
301 if (
yx != 0 ||
xy != 0 ||
xx <= 0 ||
yy <= 0)
303 throw std::runtime_error(
"only positive scales and translations are allowed on rectangles");
310 rect.
width = bottomRight.
x - topLeft.
x;
311 rect.
height = bottomRight.
y - topLeft.
y;
335 return xx == other.xx &&
yx == other.yx &&
tx == other.tx &&
xy == other.xy &&
yy == other.yy &&
ty == other.ty;
Definition: Configuration.h:10
float x
Definition: Point.h:19
float y
Definition: Point.h:20
Definition: Rectangle.h:17
float x
Definition: Rectangle.h:18
float y
Definition: Rectangle.h:19
float height
Definition: Rectangle.h:21
float width
Definition: Rectangle.h:20