Class Frame¶
Defined in File Frame.h
Class Documentation¶
-
class
Frame
¶ rectangle with sides parallel to axes.
when Frame’s are used to define subparts of images, xMin and xMax refer to the first and last pixels in the subimage
Public Functions
-
Frame
()¶ Default constructor.
-
Frame
(double xMin, double yMin, double xMax, double yMax)¶ this one is dangerous: you may swap the 2 middle arguments. Prefer next one
-
Frame
(const Point &lowerLeft, const Point &upperRight)¶ typical use: Frame(Point(xmin,ymin),Point(xmax,ymax))
-
double
getWidth
() const¶ size along x axis
-
double
getHeight
() const¶ size along y axis
-
void
cutMargin
(const double marginSize)¶ shrinks the frame (if marginSize>0), enlarges it (if marginSize<0).
-
void
cutMargin
(const double marginX, const double marginY)¶ shrinks the frame (if marginSize>0), enlarges it (if marginSize<0).
-
bool
operator==
(const Frame &right) const¶ necessary for comparisons (!= is defined from this one implicitely)
-
double
getArea
() const¶
-
bool
inFrame
(double x, double y) const¶ inside?
-
void
dump
(std::ostream &stream = std::cout) const¶
Friends
-
std::ostream &
operator<<
(std::ostream &stream, const Frame &right)¶ allows
.std::cout << frame;
-