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;
340 return xx == other.xx &&
yx == other.yx &&
tx == other.tx &&
xy == other.xy &&
yy == other.yy &&
ty == other.ty;
367 os <<
"Transform([" << tr.
xx <<
", " << tr.
yx <<
", " << tr.
tx <<
"], [" << tr.
xy <<
", " << tr.
yy <<
", " << tr.
ty <<
"])";
std::ostream & operator<<(std::ostream &os, const Color &c)
Definition: Color.h:134
Definition: Configuration.h:11
float x
Definition: Point.h:16
float y
Definition: Point.h:17
Definition: Rectangle.h:15
float x
Definition: Rectangle.h:16
float y
Definition: Rectangle.h:17
float height
Definition: Rectangle.h:19
float width
Definition: Rectangle.h:18