#include "LyXRC.h"
#include "graphics/epstools.h"
-#include "graphics/GraphicsParams.h"
#include "graphics/GraphicsTypes.h"
#include "support/convert.h"
draft = false; // draft mode
scaleBeforeRotation = false; // scale image before rotating
- bb = string(); // bounding box
+ bbox = graphics::BoundingBox(); // bounding box
clip = false; // clip image
rotateAngle = "0"; // angle of rotation in degrees
draft = igp.draft;
scaleBeforeRotation = igp.scaleBeforeRotation;
- bb = igp.bb;
+ bbox = igp.bbox;
clip = igp.clip;
rotateAngle = igp.rotateAngle;
left.draft == right.draft &&
left.scaleBeforeRotation == right.scaleBeforeRotation &&
- left.bb == right.bb &&
+ left.bbox == right.bbox &&
left.clip == right.clip &&
left.rotateAngle == right.rotateAngle &&
if (scaleBeforeRotation)
os << "\tscaleBeforeRotation\n";
- if (!bb.empty()) // bounding box
- os << "\tBoundingBox " << bb << '\n';
+ if (!bbox.empty()) // bounding box
+ os << "\tBoundingBox " << bbox << '\n';
if (clip) // clip image
os << "\tclip\n";
} else if (token == "scaleBeforeRotation") {
scaleBeforeRotation = true;
} else if (token == "BoundingBox") {
- bb.erase();
- for (int i = 0; i < 4; ++i) {
- if (i != 0)
- bb += ' ';
- lex.next();
- bb += lex.getString();
- }
+ lex.next();
+ bbox.xl = Length(lex.getString());
+ lex.next();
+ bbox.yb = Length(lex.getString());
+ lex.next();
+ bbox.xr = Length(lex.getString());
+ lex.next();
+ bbox.yt = Length(lex.getString());
} else if (token == "clip") {
clip = true;
} else if (token == "rotateAngle") {
pars.angle = convert<double>(rotateAngle);
if (clip) {
- pars.bb = bb;
+ pars.bb = bbox;
// Get the original Bounding Box from the file
string const tmp = graphics::readBB_from_PSFile(filename);