2002-02-27 09:59:52 +00:00
|
|
|
// -*- C++ -*-
|
|
|
|
/**
|
|
|
|
* \file GraphicsParams.h
|
|
|
|
* Copyright 2002 the LyX Team
|
|
|
|
* Read the file COPYING
|
|
|
|
*
|
2002-07-15 10:19:45 +00:00
|
|
|
* \author Angus Leeming <leeming@lyx.org>
|
2002-02-27 09:59:52 +00:00
|
|
|
*
|
2002-07-17 17:55:21 +00:00
|
|
|
* Used internally by the grfx::Image.
|
2002-02-27 09:59:52 +00:00
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef GRAPHICSPARAMS_H
|
|
|
|
#define GRAPHICSPARAMS_H
|
|
|
|
|
|
|
|
#ifdef __GNUG__
|
|
|
|
#pragma interface
|
|
|
|
#endif
|
|
|
|
|
2002-06-26 14:15:08 +00:00
|
|
|
#include "GraphicsTypes.h"
|
2002-02-27 09:59:52 +00:00
|
|
|
#include "LString.h"
|
|
|
|
|
|
|
|
|
|
|
|
namespace grfx {
|
|
|
|
|
|
|
|
/** Parse a string of the form "200pt 500pt 300mm 5in" into a
|
|
|
|
* usable bounding box.
|
|
|
|
*/
|
|
|
|
struct BoundingBox {
|
|
|
|
///
|
|
|
|
BoundingBox();
|
|
|
|
///
|
|
|
|
BoundingBox(string const &);
|
|
|
|
|
|
|
|
/// 0 0 0 0 is empty!
|
|
|
|
bool empty() const;
|
2002-02-28 11:50:42 +00:00
|
|
|
|
2002-04-08 16:51:46 +00:00
|
|
|
int xl;
|
|
|
|
int yb;
|
|
|
|
int xr;
|
|
|
|
int yt;
|
2002-02-27 09:59:52 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
bool operator==(BoundingBox const &, BoundingBox const &);
|
|
|
|
bool operator!=(BoundingBox const &, BoundingBox const &);
|
|
|
|
|
2002-06-28 11:22:56 +00:00
|
|
|
struct Params
|
2002-02-27 09:59:52 +00:00
|
|
|
{
|
2002-06-28 11:22:56 +00:00
|
|
|
Params();
|
2002-02-27 09:59:52 +00:00
|
|
|
|
|
|
|
DisplayType display;
|
|
|
|
|
|
|
|
/// The image filename.
|
|
|
|
string filename;
|
|
|
|
|
2002-04-08 16:51:46 +00:00
|
|
|
/** Note that the BoundingBox is always relative to the BoundingBox
|
|
|
|
* as stored in the EPS file.
|
|
|
|
* Ie, bb.xl and bb.yb == 0 if that corner is not moved.
|
|
|
|
*/
|
2002-02-27 09:59:52 +00:00
|
|
|
BoundingBox bb;
|
|
|
|
|
|
|
|
/** The size of the view inside lyx in pixels or the scaling of the
|
|
|
|
* image.
|
|
|
|
*/
|
|
|
|
unsigned int width;
|
|
|
|
unsigned int height;
|
|
|
|
unsigned int scale;
|
|
|
|
|
|
|
|
/// Rotation angle.
|
|
|
|
int angle;
|
|
|
|
};
|
|
|
|
|
2002-06-28 11:22:56 +00:00
|
|
|
bool operator==(Params const &, Params const &);
|
|
|
|
bool operator!=(Params const &, Params const &);
|
2002-02-27 09:59:52 +00:00
|
|
|
|
|
|
|
} // namespace grfx
|
|
|
|
|
|
|
|
#endif // GRAPHICSPARAMS_H
|