diff --git a/Helpers/CairoHelper.cpp b/Helpers/CairoHelper.cpp index 93536c6..d764378 100644 --- a/Helpers/CairoHelper.cpp +++ b/Helpers/CairoHelper.cpp @@ -41,7 +41,7 @@ void CairoHelper::applyScale(cairo_t *cr, const _XY &scale) { - if (!cr || (scale.x == 0. && scale.y == 0.)) { return; } + if (!cr || (scale.x == 1. && scale.y == 1.)) { return; } cairo_scale(cr, scale.x, scale.y); } @@ -50,7 +50,7 @@ CairoHelper::applyScale(cairo_t *cr, const _XY &scale, const _XY &origin) { - if (!cr || (scale.x == 0. && scale.y == 0.)) { return; } + if (!cr || (scale.x == 1. && scale.y == 1.)) { return; } cairo_translate(cr, origin.x, origin.y); cairo_scale(cr, scale.x, scale.y); cairo_translate(cr, -origin.x, -origin.y); @@ -92,7 +92,6 @@ CairoHelper::applyTransform(cairo_t *cr, const _Transform &transform) { if (!cr) { return; } - if (transform.flip) { applyFlip(cr, transform.height); } if (transform.position) { applyPosition(cr, transform.origin); } applyScale(cr, transform.scale, transform.origin); applySkew(cr, transform.skew, transform.origin); diff --git a/Helpers/CairoHelper.h b/Helpers/CairoHelper.h index 3e74d6c..bb725d2 100644 --- a/Helpers/CairoHelper.h +++ b/Helpers/CairoHelper.h @@ -34,11 +34,8 @@ class CairoHelper _XY origin; _XY scale; _XY skew; - int width; - int height; double rotate; bool position; - bool flip; }; /** @brief apply flip */ static void applyFlip(cairo_t *cr,