Kstars

scanrender.h
1 /*
2  SPDX-FileCopyrightText: 2015-2017 Pavel Mraz
3 
4  SPDX-FileCopyrightText: 2017 Jasem Mutlaq
5 
6  SPDX-License-Identifier: GPL-2.0-or-later
7 */
8 
9 #pragma once
10 
11 #include <QtCore>
12 #include <QtGui>
13 
14 #define MAX_BK_SCANLINES 32000
15 
16 typedef struct
17 {
18  int scan[2];
19  float uv[2][2];
20 } bkScan_t;
21 
22 
23 class ScanRender
24 {
25  public:
26  explicit ScanRender(void);
27  void setBilinearInterpolationEnabled(bool enable);
28  bool isBilinearInterpolationEnabled(void);
29  void resetScanPoly(int sx, int sy);
30  void scanLine(int x1, int y1, int x2, int y2);
31  void scanLine(int x1, int y1, int x2, int y2, float u1, float v1, float u2, float v2);
32  void renderPolygon(QColor col, QImage *dst);
33  void renderPolygon(QImage *dst, QImage *src);
34  void renderPolygon(int interpolation, QPointF *pts, QImage *pDest, QImage *pSrc, QPointF *uv);
35 
36  void renderPolygonNI(QImage *dst, QImage *src);
37  void renderPolygonBI(QImage *dst, QImage *src);
38 
39  void renderPolygonAlpha(QImage *dst, QImage *src);
40  void renderPolygonAlphaBI(QImage *dst, QImage *src);
41  void renderPolygonAlphaNI(QImage *dst, QImage *src);
42 
43  void renderPolygonAlpha(QColor col, QImage *dst);
44  void setOpacity(float opacity);
45 
46 private:
47  float m_opacity { 1.0f };
48  int plMinY { 0 };
49  int plMaxY { 0 };
50  int m_sx { 0 };
51  int m_sy { 0 };
52  bkScan_t scLR[MAX_BK_SCANLINES];
53  bool bBilinear { false };
54 };
This file is part of the KDE documentation.
Documentation copyright © 1996-2022 The KDE developers.
Generated on Sat Aug 13 2022 04:01:58 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.