Source Code (Use browser search to find items of interest.)
Class Index
killustrator'Coord (./koffice/killustrator/share/Coord.h:32)
class Coord {
public:
Coord () : x_ (0), y_ (0) {}
Coord (float x, float y) : x_ (x), y_ (y) {}
Coord (const Coord& c) : x_ (c.x_), y_ (c.y_) {}
void x (float f) { x_ = f; }
void y (float f) { y_ = f; }
float x () const { return x_; }
float y () const { return y_; }
Coord& operator= (const Coord& c) {
x_ = c.x_; y_ = c.y_;
return *this;
}
bool operator== (const Coord& c) const {
return x_ == c.x_ && y_ == c.y_;
}
bool operator!= (const Coord& c) const {
return !(*this == c);
}
Coord transform (const QWMatrix& m) const;
void translate (float dx, float dy);
bool isNear (const Coord& p, int range) const;
private:
float x_, y_;
};
killustrator'Coord::transform() (./koffice/killustrator/share/Coord.cc:28)
Coord Coord::transform (const QWMatrix& m) const {
#if QT_VERSION >= 199
double x, y;
m.map ((double) x_, (double) y_, &x, &y);
#else
float x, y;
m.map (x_, y_, &x, &y);
#endif
return Coord (x, y);
}
killustrator'Coord::translate() (./koffice/killustrator/share/Coord.cc:42)
void Coord::translate (float dx, float dy) {
x_ += dx;
y_ += dy;
}
killustrator'Coord::isNear() (./koffice/killustrator/share/Coord.cc:47)
bool Coord::isNear (const Coord& p, int range) const {
return (p.x () >= x_ - range && p.x () <= x_ + range &&
p.y () >= y_ - range && p.y () <= y_ + range);
}