]> mj.ucw.cz Git - paperjam.git/blobdiff - pdf-tools.cc
page->bbox renamed to page->image_box
[paperjam.git] / pdf-tools.cc
index 136fe99d72b2037fea0e19ddd82b9a38fdd5a774..29e79bff9f835e4ca10eb595883f7cca09eaee6c 100644 (file)
@@ -84,6 +84,14 @@ void BBox::transform(pdf_matrix &m)
                swap(y_min, y_max);
 }
 
+void BBox::join(BBox &with)
+{
+       x_min = min(x_min, with.x_min);
+       x_max = max(x_max, with.x_max);
+       y_min = min(y_min, with.y_min);
+       y_max = max(y_max, with.y_max);
+}
+
 /*** Unicode strings ***/
 
 // Construct PDF representation of a UTF-8 string