Krita Source Code Documentation
Loading...
Searching...
No Matches
KoCheckerBoardPainter.h
Go to the documentation of this file.
1/* This file is part of the KDE project
2 * SPDX-FileCopyrightText: 2008 Jan Hambrecht <jaham@gmx.net>
3 *
4 * SPDX-License-Identifier: LGPL-2.0-or-later
5 */
6
7#ifndef KOCHECKERBOARDPAINTER_H
8#define KOCHECKERBOARDPAINTER_H
9
10#include <QPixmap>
11#include <QColor>
12#include "kritawidgetutils_export.h"
13
14class QPainter;
15
16class KRITAWIDGETUTILS_EXPORT KoCheckerBoardPainter
17{
18public:
19 explicit KoCheckerBoardPainter(int checkerSize);
20 void setCheckerColors(const QColor &lightColor, const QColor &darkColor);
21 void setCheckerSize(int checkerSize);
22 void paint(QPainter &painter, const QRectF &rect, const QPointF &patternOrigin) const;
23 void paint(QPainter &painter, const QRectF &rect) const;
24
25private:
26 void createChecker();
28 QPixmap m_checker;
31};
32
33#endif // KOCHECKERBOARDPAINTER_H