Version: 9.15.0
ImageComposer_Image Class Reference

Implementation of image in the global coordinate system. More...

#include <ImageComposer_Image.h>

Inheritance diagram for ImageComposer_Image:
Inheritance graph

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_Imageoperator= (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...
 

Detailed Description

Implementation of image in the global coordinate system.

Constructor & Destructor Documentation

◆ ImageComposer_Image() [1/3]

ImageComposer_Image::ImageComposer_Image ( )

Constructor.

◆ ImageComposer_Image() [2/3]

ImageComposer_Image::ImageComposer_Image ( const ImageComposer_Image theImage)

Copy constructor.

◆ ImageComposer_Image() [3/3]

ImageComposer_Image::ImageComposer_Image ( const QImage &  theImage)

Copy constructor.

◆ ~ImageComposer_Image()

ImageComposer_Image::~ImageComposer_Image ( )

Destructor.

Member Function Documentation

◆ apply()

ImageComposer_Image ImageComposer_Image::apply ( const ImageComposer_Operator theOperator,
const QVariant &  theOtherObj 
) const

Apply the given operator to the image.

Parameters
theOperatorthe operator to be applied
theImagethe additional image to compose (optional)
Returns
the result image

References ImageComposer_Operator::process().

◆ boundingRect()

QRectF ImageComposer_Image::boundingRect ( ) const

Get image's bounding rectangle in the global CS.

Returns
image's bounding rectangle in the global CS

References myTransform.

◆ defaultBackground()

QColor ImageComposer_Image::defaultBackground ( )
static

Get default background color used for image operators.

Returns
default background color

References myDefaultBackground.

◆ draw()

void ImageComposer_Image::draw ( QPainter &  thePainter) const

Draw the image using the given painter.

Parameters
thePainterthe painter for image drawing

References myTransform.

◆ operator&() [1/3]

ImageComposer_Image ImageComposer_Image::operator& ( const ImageComposer_Image theImage) const

Operator of image cutting by another image.

Parameters
theImagethe image for cutting
Returns
cut image

References apply(), myDefaultBackground, and ImageComposer_Operator::setArgs().

◆ operator&() [2/3]

ImageComposer_Image ImageComposer_Image::operator& ( const QPainterPath &  thePath) const

Operator of image cropping by a path.

Parameters
thePaththe path for cropping
Returns
cropped image

References apply(), myDefaultBackground, and ImageComposer_Operator::setArgs().

◆ operator&() [3/3]

ImageComposer_Image ImageComposer_Image::operator& ( const QRect &  theRect) const

Operator of image cropping by a rectangle.

Parameters
theRectthe rectangle for cropping
Returns
cropped image

◆ operator=() [1/2]

const ImageComposer_Image & ImageComposer_Image::operator= ( const ImageComposer_Image theImage)

Operator of another image assignment.

Parameters
theImagethe image to assign
Returns
the assigned image

References myTransform.

◆ operator=() [2/2]

const QImage & ImageComposer_Image::operator= ( const QImage &  theImage)

Operator of another image assignment.

Parameters
theImagethe image to assign
Returns
the assigned image

◆ operator|()

ImageComposer_Image ImageComposer_Image::operator| ( const ImageComposer_Image theImage) const

Operator of image fusing with another image.

Parameters
theImagethe image for fusing
Returns
fused image

References apply(), myDefaultBackground, and ImageComposer_Operator::setArgs().

◆ setDefaultBackground()

void ImageComposer_Image::setDefaultBackground ( const QColor &  theDefaultBackground)
static

Change default background color used for image operators.

Parameters
theDefaultBackgrounda new default background color

References myDefaultBackground.

◆ setLocalTransform()

void ImageComposer_Image::setLocalTransform ( qreal  theDx,
qreal  theDy,
qreal  theRotationDeg 
)

Change current image transformation.

Parameters
theDxthe image translation along X axis of the global CS
theDythe image translation along Y axis of the global CS
theRotationDegthe image rotation in degrees around the image center

References myTransform.

◆ setTransform()

void ImageComposer_Image::setTransform ( const QTransform &  theTransform)

Change current image transformation.

Parameters
theTransforma new image transformation

References myTransform.

◆ transform()

QTransform ImageComposer_Image::transform ( ) const

Get current image transformation.

Returns
current image transformation

References myTransform.

Member Data Documentation

◆ myDefaultBackground

QColor ImageComposer_Image::myDefaultBackground = TRANSPARENT
staticprivate

the default background color to be used in operators

◆ myTransform

QTransform ImageComposer_Image::myTransform
private

the image transformation in the global CS


The documentation for this class was generated from the following files: