17#ifndef CANVASPAINTER_H
18#define CANVASPAINTER_H
21#include <QCoreApplication>
30#include "onionskinpainteroptions.h"
31#include "onionskinsubpainter.h"
41 bool bAntiAlias =
false;
42 bool bThinLines =
false;
43 bool bOutlines =
false;
45 LayerVisibility eLayerVisibility = LayerVisibility::RELATED;
46 float fLayerVisibilityThreshold = 0.f;
47 bool bOnionSkinMultiLayer =
false;
63 void setOnionSkinOptions(
const OnionSkinPainterOptions& onionSkinOptions) { mOnionSkinPainterOptions = onionSkinOptions;}
66 void ignoreTransformedSelection();
68 void setPaintSettings(
const Object*
object,
int currentLayer,
int frame,
TiledBuffer* tilledBuffer);
69 void paint(
const QRect& blitRect);
70 void paintCached(
const QRect& blitRect);
71 void resetLayerCache();
85 void paintOnionSkin(
QPainter& painter,
const QRect& blitRect);
87 void renderPostLayers(
QPainter& painter,
const QRect& blitRect);
88 void renderPreLayers(
QPainter& painter,
const QRect& blitRect);
94 void paintBitmapOnionSkinFrame(
QPainter& painter,
const QRect& blitRect,
Layer* layer,
int nFrame,
bool colorize);
95 void paintVectorOnionSkinFrame(
QPainter& painter,
const QRect& blitRect,
Layer* layer,
int nFrame,
bool colorize);
96 void paintOnionSkinFrame(
QPainter& painter,
QPainter& onionSkinPainter,
int nFrame,
bool colorize, qreal frameOpacity);
98 void paintCurrentBitmapFrame(
QPainter& painter,
const QRect& blitRect,
Layer* layer,
bool isCurrentLayer);
99 void paintCurrentVectorFrame(
QPainter& painter,
const QRect& blitRect,
Layer* layer,
bool isCurrentLayer);
103 const Object* mObject =
nullptr;
108 int mCurrentLayerIndex = 0;
109 int mFrameNumber = 0;
115 bool mRenderTransform =
false;
124 bool mPreLayersPixmapCacheValid =
false;
125 bool mPostLayersPixmapCacheValid =
false;
135 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...