Commit 4b56adac by Albert Astals Cid

### Make some PDFRectangle methods const

parent 0e938b2f
 ... ... @@ -20,7 +20,7 @@ // Copyright (C) 2007 Julien Rebetez // Copyright (C) 2008 Iñigo Martínez // Copyright (C) 2012 Fabio D'Urso // Copyright (C) 2012, 2017, 2018 Albert Astals Cid // Copyright (C) 2012, 2017, 2018, 2020 Albert Astals Cid // Copyright (C) 2013 Thomas Freitag // Copyright (C) 2013, 2017 Adrian Johnson // Copyright (C) 2018 Adam Reichold ... ... @@ -61,8 +61,8 @@ public: PDFRectangle() { x1 = y1 = x2 = y2 = 0; } PDFRectangle(double x1A, double y1A, double x2A, double y2A) { x1 = x1A; y1 = y1A; x2 = x2A; y2 = y2A; } bool isValid() { return x1 != 0 || y1 != 0 || x2 != 0 || y2 != 0; } bool contains(double x, double y) { return x1 <= x && x <= x2 && y1 <= y && y <= y2; } bool isValid() const { return x1 != 0 || y1 != 0 || x2 != 0 || y2 != 0; } bool contains(double x, double y) const { return x1 <= x && x <= x2 && y1 <= y && y <= y2; } void clipTo(PDFRectangle *rect); bool operator==(const PDFRectangle &rect) const { return x1 == rect.x1 && y1 == rect.y1 && x2 == rect.x2 && y2 == rect.y2; } ... ...
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!