94 virtual bool getBinary(librevenge::RVNGBinaryData &, std::string &)
const
106 if (diff)
return diff;
109 if (diff)
return (diff < 0) ? -1 : 1;
121 float minV[2], maxV[2];
122 for (
int c = 0; c < 2; c++) minV[c] = maxV[c] = pt[0][c];
124 for (
int i = 1; i < numPt; i++) {
125 for (
int c = 0; c < 2; c++) {
127 if (v < minV[c]) minV[c] = v;
128 else if (v > maxV[c]) maxV[c] = v;
153 if (&p ==
this)
return *
this;
void extend(T val)
extends the bdbox by (val, val) keeping the center
Definition: libmwaw_internal.hxx:1000
MWAWBox2f getBdBox() const
returns the bdbox of the picture
Definition: MWAWPict.hxx:77
ReadResult
an enum to defined the result of a parsing use by some picture's classes which can read their data ...
Definition: MWAWPict.hxx:74
virtual ~MWAWPict()
virtual destructor
Definition: MWAWPict.hxx:56
virtual int cmp(MWAWPict const &a) const
a virtual function used to obtain a strict order, must be redefined in the subs class ...
Definition: MWAWPict.hxx:102
void setBdBox(MWAWBox2f const &box)
sets the bdbox of the picture
Definition: MWAWPict.hxx:85
Definition: MWAWPict.hxx:74
MWAWPict(MWAWPict const &p)
protected constructor must not be called directly
Definition: MWAWPict.hxx:146
MWAWVec2< float > MWAWVec2f
MWAWVec2 of float.
Definition: libmwaw_internal.hxx:721
Definition: MWAWPict.hxx:74
int cmp(MWAWBox2< T > const &p) const
comparison function : fist sorts min by Y,X values then max extremity
Definition: libmwaw_internal.hxx:1043
float m_bdBoxExt
the actual extension of the original box,
Definition: MWAWPict.hxx:163
Type
the different picture types:
Definition: MWAWPict.hxx:64
virtual bool getBinary(librevenge::RVNGBinaryData &, std::string &) const
tries to convert the picture in a binary data :
Definition: MWAWPict.hxx:94
Definition: MWAWPict.hxx:64
MWAWBox2< float > MWAWBox2f
MWAWBox2 of float.
Definition: libmwaw_internal.hxx:1082
Definition: MWAWPict.hxx:74
Definition: MWAWPict.hxx:64
MWAWPict()
protected constructor must not be called directly
Definition: MWAWPict.hxx:144
Definition: MWAWPict.hxx:74
Definition: MWAWPict.hxx:64
virtual Type getType() const =0
returns the picture type
static MWAWBox2f getBdBox(int numPt, MWAWVec2f const *pt)
computes the minimum and maximum of a list of point
Definition: MWAWPict.hxx:115
void extendBDBox(float val)
udaptes the bdbox, by extended it by (val-previousVal)
Definition: MWAWPict.hxx:138
Generic function used to define/store a picture.
Definition: MWAWPict.hxx:52
MWAWBox2f m_bdbox
the bdbox (min and max pt)
Definition: MWAWPict.hxx:161
MWAWPict & operator=(MWAWPict const &p)
protected operator= must not be called directly
Definition: MWAWPict.hxx:151