Implementation of image in the global coordinate system.
#include <ImageComposer_Image.h>
Public Member Functions | |
ImageComposer_Image () | |
Constructor. More... | |
ImageComposer_Image (const ImageComposer_Image &theImage) | |
Copy constructor. More... | |
ImageComposer_Image (const QImage &theImage) | |
Copy constructor. More... | |
~ImageComposer_Image () | |
Destructor. More... | |
void | draw (QPainter &thePainter) const |
Draw the image using the given painter. More... | |
QTransform | transform () const |
Get current image transformation. More... | |
void | setTransform (const QTransform &) |
Change current image transformation. More... | |
void | setLocalTransform (qreal theDx, qreal theDy, qreal theRotationDeg) |
Change current image transformation. More... | |
QRectF | boundingRect () const |
Get image's bounding rectangle in the global CS. More... | |
const ImageComposer_Image & | operator= (const ImageComposer_Image &theImage) |
Operator of another image assignment. More... | |
const QImage & | operator= (const QImage &theImage) |
Operator of another image assignment. More... | |
ImageComposer_Image | apply (const ImageComposer_Operator &theOperator, const QVariant &theOtherObj) const |
Apply the given operator to the image. More... | |
ImageComposer_Image | operator& (const QRect &) const |
Operator of image cropping by a rectangle. More... | |
ImageComposer_Image | operator& (const QPainterPath &) const |
Operator of image cropping by a path. More... | |
ImageComposer_Image | operator& (const ImageComposer_Image &) const |
Operator of image cutting by another image. More... | |
ImageComposer_Image | operator| (const ImageComposer_Image &) const |
Operator of image fusing with another image. More... | |
Static Public Member Functions | |
static QColor | defaultBackground () |
Get default background color used for image operators. More... | |
static void | setDefaultBackground (const QColor &) |
Change default background color used for image operators. More... | |
Private Attributes | |
QTransform | myTransform |
the image transformation in the global CS More... | |
Static Private Attributes | |
static QColor | myDefaultBackground = TRANSPARENT |
the default background color to be used in operators More... | |
ImageComposer_Image::ImageComposer_Image | ( | ) |
ImageComposer_Image::ImageComposer_Image | ( | const ImageComposer_Image & | theImage | ) |
ImageComposer_Image::ImageComposer_Image | ( | const QImage & | theImage | ) |
ImageComposer_Image::~ImageComposer_Image | ( | ) |
ImageComposer_Image ImageComposer_Image::apply | ( | const ImageComposer_Operator & | theOperator, |
const QVariant & | theOtherObj | ||
) | const |
theOperator | the operator to be applied |
theImage | the additional image to compose (optional) |
References ImageComposer_Operator::process().
QRectF ImageComposer_Image::boundingRect | ( | ) | const |
References myTransform.
|
static |
References myDefaultBackground.
void ImageComposer_Image::draw | ( | QPainter & | thePainter | ) | const |
thePainter | the painter for image drawing |
References myTransform.
ImageComposer_Image ImageComposer_Image::operator& | ( | const QRect & | theRect | ) | const |
theRect | the rectangle for cropping |
ImageComposer_Image ImageComposer_Image::operator& | ( | const QPainterPath & | thePath | ) | const |
thePath | the path for cropping |
References apply(), myDefaultBackground, and ImageComposer_Operator::setArgs().
ImageComposer_Image ImageComposer_Image::operator& | ( | const ImageComposer_Image & | theImage | ) | const |
theImage | the image for cutting |
References apply(), myDefaultBackground, and ImageComposer_Operator::setArgs().
const ImageComposer_Image & ImageComposer_Image::operator= | ( | const ImageComposer_Image & | theImage | ) |
theImage | the image to assign |
References myTransform, and operator=().
ImageComposer_Image ImageComposer_Image::operator| | ( | const ImageComposer_Image & | theImage | ) | const |
theImage | the image for fusing |
References apply(), myDefaultBackground, and ImageComposer_Operator::setArgs().
|
static |
theDefaultBackground | a new default background color |
References myDefaultBackground.
void ImageComposer_Image::setLocalTransform | ( | qreal | theDx, |
qreal | theDy, | ||
qreal | theRotationDeg | ||
) |
theDx | the image translation along X axis of the global CS |
theDy | the image translation along Y axis of the global CS |
theRotationDeg | the image rotation in degrees around the image center |
References myTransform.
void ImageComposer_Image::setTransform | ( | const QTransform & | theTransform | ) |
theTransform | a new image transformation |
References myTransform.
QTransform ImageComposer_Image::transform | ( | ) | const |
References myTransform.
|
staticprivate |
|
private |