summaryrefslogtreecommitdiff
path: root/FL
diff options
context:
space:
mode:
authorMatthias Melcher <github@matthiasm.com>2022-11-30 22:40:52 +0100
committerGitHub <noreply@github.com>2022-11-30 22:40:52 +0100
commitbf825f8ebd18615fdbecb449c14300105d469a24 (patch)
tree2e9c3f075b124347eea974c9b429c06d5f29df78 /FL
parentbc3bbb7ca028db377ec4b2acbe74d8f2c8a5c149 (diff)
Add a unit test for drawing complex shapes (#565)
Diffstat (limited to 'FL')
-rw-r--r--FL/Fl_Graphics_Driver.H2
-rw-r--r--FL/fl_draw.H13
2 files changed, 15 insertions, 0 deletions
diff --git a/FL/Fl_Graphics_Driver.H b/FL/Fl_Graphics_Driver.H
index 817fcd9ea..006721f61 100644
--- a/FL/Fl_Graphics_Driver.H
+++ b/FL/Fl_Graphics_Driver.H
@@ -234,6 +234,8 @@ public:
// support of "complex shapes"
void push_matrix();
void pop_matrix();
+ void load_identity();
+ void load_matrix(double a, double b, double c, double d, double x, double y);
void mult_matrix(double a, double b, double c, double d, double x, double y);
void rotate(double d);
void translate(double x,double y);
diff --git a/FL/fl_draw.H b/FL/fl_draw.H
index fc3e401ca..33c1f716f 100644
--- a/FL/fl_draw.H
+++ b/FL/fl_draw.H
@@ -551,6 +551,19 @@ inline void fl_rotate(double d) {
fl_graphics_driver->rotate(d);
}
/**
+ Set the transformation matrix to identity.
+ */
+inline void fl_load_identity() {
+ fl_graphics_driver->load_identity();
+}
+/**
+ Set the current transformation matrix.
+ \param[in] a,b,c,d,x,y transformation matrix elements
+ */
+inline void fl_load_matrix(double a, double b, double c, double d, double x, double y) {
+ fl_graphics_driver->load_matrix(a, b, c, d, x, y);
+}
+/**
Concatenate another transformation onto the current one.
\param[in] a,b,c,d,x,y transformation matrix elements such that