17#ifndef CANVASPAINTER_H
18#define CANVASPAINTER_H
21#include <QCoreApplication>
30#include "onionskinpainteroptions.h"
31#include "onionskinsubpainter.h"
39 bool bAntiAlias =
false;
40 bool bThinLines =
false;
41 bool bOutlines =
false;
42 LayerVisibility eLayerVisibility = LayerVisibility::RELATED;
43 float fLayerVisibilityThreshold = 0.f;
59 void setOnionSkinOptions(
const OnionSkinPainterOptions& onionSkinOptions) { mOnionSkinPainterOptions = onionSkinOptions;}
62 void ignoreTransformedSelection();
65 void paint(
const QRect& blitRect);
66 void paintCached(
const QRect& blitRect);
67 void resetLayerCache();
80 void paintOnionSkin(
QPainter& painter,
const QRect& blitRect);
82 void renderPostLayers(
QPainter& painter,
const QRect& blitRect);
83 void renderPreLayers(
QPainter& painter,
const QRect& blitRect);
89 void paintBitmapOnionSkinFrame(
QPainter& painter,
const QRect& blitRect,
Layer* layer,
int nFrame,
bool colorize);
90 void paintVectorOnionSkinFrame(
QPainter& painter,
const QRect& blitRect,
Layer* layer,
int nFrame,
bool colorize);
91 void paintOnionSkinFrame(
QPainter& painter,
QPainter& onionSkinPainter,
const QRect& blitRect,
int nFrame,
bool colorize, qreal frameOpacity);
93 void paintCurrentBitmapFrame(
QPainter& painter,
const QRect& blitRect,
Layer* layer,
bool isCurrentLayer);
94 void paintCurrentVectorFrame(
QPainter& painter,
const QRect& blitRect,
Layer* layer,
bool isCurrentLayer);
98 const Object* mObject =
nullptr;
103 int mCurrentLayerIndex = 0;
104 int mFrameNumber = 0;
110 bool mRenderTransform =
false;
119 bool mPreLayersPixmapCacheValid =
false;
120 bool mPostLayersPixmapCacheValid =
false;
126 const static int OVERLAY_SAFE_CENTER_CROSS_SIZE = 25;
void initializePainter(QPainter &painter, QPaintDevice &device, const QRect &blitRect)
CanvasPainter::initializePainter Enriches the painter with a context and sets it's initial matrix.
void paintCurrentFrame(QPainter &painter, const QRect &blitRect, int startLayer, int endLayer)
Paints layers within the specified range for the current frame.
A Sub Painter class is meant to be used in existing painter classes It does not and should not cary t...