All Classes Namespaces Functions Variables Enumerations Properties Pages
Public Member Functions | Private Member Functions | Private Attributes | Static Private Attributes | List of all members
CanvasPainter Class Reference

Public Member Functions

void setCanvas (QPixmap *canvas)
 
void setViewTransform (const QTransform view, const QTransform viewInverse)
 
void setOptions (const CanvasPainterOptions &p)
 
void setTransformedSelection (QRect selection, QTransform transform)
 
void ignoreTransformedSelection ()
 
QRect getCameraRect ()
 
void setPaintSettings (const Object *object, int currentLayer, int frame, QRect rect, BitmapImage *buffer)
 
void paint ()
 
void paintCached ()
 
void renderGrid (QPainter &painter)
 
void resetLayerCache ()
 

Private Member Functions

void initializePainter (QPainter &painter, QPixmap &pixmap)
 CanvasPainter::initializePainter Enriches the painter with a context and sets it's initial matrix. More...
 
void renderPreLayers (QPainter &painter)
 
void renderCurLayer (QPainter &painter)
 
void renderPostLayers (QPainter &painter)
 
void paintBackground ()
 
void paintOnionSkin (QPainter &painter)
 
void renderPostLayers (QPixmap *pixmap)
 
void renderCurLayer (QPixmap *pixmap)
 
void renderPreLayers (QPixmap *pixmap)
 
void paintCurrentFrame (QPainter &painter, int startLayer, int endLayer)
 Paints layers within the specified range for the current frame. More...
 
void paintBitmapFrame (QPainter &, Layer *layer, int nFrame, bool colorize, bool useLastKeyFrame, bool isCurrentFrame)
 
void paintVectorFrame (QPainter &, Layer *layer, int nFrame, bool colorize, bool useLastKeyFrame, bool isCurrentFrame)
 
void paintTransformedSelection (QPainter &painter)
 
void paintGrid (QPainter &painter)
 
void paintCameraBorder (QPainter &painter)
 
void paintAxis (QPainter &painter)
 
void prescale (BitmapImage *bitmapImage)
 
qreal calculateRelativeOpacityForLayer (int layerIndex) const
 Calculate layer opacity based on current layer offset.
 

Private Attributes

CanvasPainterOptions mOptions
 
const ObjectmObject = nullptr
 
QPixmapmCanvas = nullptr
 
QTransform mViewTransform
 
QTransform mViewInverse
 
QRect mCameraRect
 
int mCurrentLayerIndex = 0
 
int mFrameNumber = 0
 
BitmapImagemBuffer = nullptr
 
QImage mScaledBitmap
 
bool mRenderTransform = false
 
QRect mSelection
 
QTransform mSelectionTransform
 
std::unique_ptr< QPixmapmPreLayersCache
 
std::unique_ptr< QPixmapmPostLayersCache
 

Static Private Attributes

static const int OVERLAY_SAFE_CENTER_CROSS_SIZE = 25
 

Detailed Description

Definition at line 60 of file canvaspainter.h.

Member Function Documentation

void CanvasPainter::initializePainter ( QPainter painter,
QPixmap pixmap 
)
private

CanvasPainter::initializePainter Enriches the painter with a context and sets it's initial matrix.

Parameters
painterThe in/out painter
pixmapThe paint device ie. a pixmap

Definition at line 120 of file canvaspainter.cpp.

void CanvasPainter::paintCurrentFrame ( QPainter painter,
int  startLayer,
int  endLayer 
)
private

Paints layers within the specified range for the current frame.

Parameters
painterThe painter to paint to
startLayerThe first layer to paint (inclusive)
endLayerThe last layer to paint (inclusive)

Definition at line 489 of file canvaspainter.cpp.


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