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;
62 void setOnionSkinOptions(
const OnionSkinPainterOptions& onionSkinOptions) { mOnionSkinPainterOptions = onionSkinOptions;}
65 void ignoreTransformedSelection();
67 void setPaintSettings(
const Object*
object,
int currentLayer,
int frame,
TiledBuffer* tilledBuffer);
68 void paint(
const QRect& blitRect);
69 void paintCached(
const QRect& blitRect);
70 void resetLayerCache();
83 void paintOnionSkin(
QPainter& painter,
const QRect& blitRect);
85 void renderPostLayers(
QPainter& painter,
const QRect& blitRect);
86 void renderPreLayers(
QPainter& painter,
const QRect& blitRect);
92 void paintBitmapOnionSkinFrame(
QPainter& painter,
const QRect& blitRect,
Layer* layer,
int nFrame,
bool colorize);
93 void paintVectorOnionSkinFrame(
QPainter& painter,
const QRect& blitRect,
Layer* layer,
int nFrame,
bool colorize);
94 void paintOnionSkinFrame(
QPainter& painter,
QPainter& onionSkinPainter,
int nFrame,
bool colorize, qreal frameOpacity);
96 void paintCurrentBitmapFrame(
QPainter& painter,
const QRect& blitRect,
Layer* layer,
bool isCurrentLayer);
97 void paintCurrentVectorFrame(
QPainter& painter,
const QRect& blitRect,
Layer* layer,
bool isCurrentLayer);
101 const Object* mObject =
nullptr;
106 int mCurrentLayerIndex = 0;
107 int mFrameNumber = 0;
113 bool mRenderTransform =
false;
122 bool mPreLayersPixmapCacheValid =
false;
123 bool mPostLayersPixmapCacheValid =
false;
133 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...