95 virtual bool getBinary(WPXBinaryData &, std::string &)
const {
105 if (diff)
return diff;
108 if (diff)
return (diff < 0) ? -1 : 1;
119 float minV[2], maxV[2];
120 for (
int c = 0; c < 2; c++) minV[c] = maxV[c] = pt[0][c];
122 for (
int i = 1; i < numPt; i++) {
123 for (
int c = 0; c < 2; c++) {
125 if (v < minV[c]) minV[c] = v;
126 else if (v > maxV[c]) maxV[c] = v;
148 if (&p ==
this)
return *
this;
int cmp(Box2< T > const &p) const
comparison function : fist sorts min by Y,X values then max extremity
Definition: libmwaw_internal.hxx:841
Vec2< float > Vec2f
Vec2 of float.
Definition: libmwaw_internal.hxx:582
ReadResult
an enum to defined the result of a parsing use by some picture's classes which can read their data ...
Definition: MWAWPict.hxx:77
void extend(T val)
extends the bdbox by (val, val) keeping the center
Definition: libmwaw_internal.hxx:822
Box2< float > Box2f
Box2 of float.
Definition: libmwaw_internal.hxx:877
virtual ~MWAWPict()
virtual destructor
Definition: MWAWPict.hxx:57
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
Definition: MWAWPict.hxx:77
Definition: MWAWPict.hxx:67
MWAWPict(MWAWPict const &p)
protected constructor must not be called directly
Definition: MWAWPict.hxx:143
Box2f m_bdbox
the bdbox (min and max pt)
Definition: MWAWPict.hxx:156
Definition: MWAWPict.hxx:77
Definition: MWAWPict.hxx:67
float m_bdBoxExt
the actual extension of the original box,
Definition: MWAWPict.hxx:158
void setBdBox(Box2f const &box)
sets the bdbox of the picture
Definition: MWAWPict.hxx:87
Type
the different picture types:
Definition: MWAWPict.hxx:67
Definition: MWAWPict.hxx:67
static Box2f getBdBox(int numPt, Vec2f const *pt)
computes the minimum and maximum of a list of point
Definition: MWAWPict.hxx:114
Definition: MWAWPict.hxx:77
Definition: MWAWPict.hxx:67
Box2f getBdBox() const
returns the bdbox of the picture
Definition: MWAWPict.hxx:80
MWAWPict()
protected constructor must not be called directly
Definition: MWAWPict.hxx:141
Definition: MWAWPict.hxx:77
Definition: MWAWPict.hxx:67
virtual Type getType() const =0
returns the picture type
void extendBDBox(float val)
udaptes the bdbox, by extended it by (val-previousVal)
Definition: MWAWPict.hxx:136
virtual bool getBinary(WPXBinaryData &, std::string &) const
tries to convert the picture in a binary data :
Definition: MWAWPict.hxx:95
Generic function used to define/store a picture.
Definition: MWAWPict.hxx:53
MWAWPict & operator=(MWAWPict const &p)
protected operator= must not be called directly
Definition: MWAWPict.hxx:147