]> mj.ucw.cz Git - paperjam.git/blobdiff - pdf-tools.cc
Better error messages from instantiating and running of commands
[paperjam.git] / pdf-tools.cc
index 68a8f8cae4201373f2de193619a7a338badafd80..809238c3b662e6138f55eecd2f968584c61e89c5 100644 (file)
@@ -99,6 +99,21 @@ void BBox::join(BBox &with)
        y_max = max(y_max, with.y_max);
 }
 
+void BBox::enlarge(double by)
+{
+       x_min -= by;
+       x_max += by;
+       y_min -= by;
+       y_max += by;
+}
+
+BBox BBox::enlarged(double by)
+{
+       BBox b = *this;
+       b.enlarge(by);
+       return b;
+}
+
 /*** Unicode strings ***/
 
 // Construct PDF representation of a UTF-8 string