Debian Codegraph @

src/board/imagehandler.h

raw symbols SCIP
1 /***************************************************************************
2 * Copyright (C) 2009 by The qGo Project *
3 * *
4 * This file is part of qGo. *
5 * *
6 * qGo is free software: you can redistribute it and/or modify *
7 * it under the terms of the GNU General Public License as published by *
8 * the Free Software Foundation; either version 2 of the License, or *
9 * (at your option) any later version. *
10 * *
11 * This program is distributed in the hope that it will be useful, *
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of *
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
14 * GNU General Public License for more details. *
15 * *
16 * You should have received a copy of the GNU General Public License *
17 * along with this program; if not, see <http://www.gnu.org/licenses/> *
18 * or write to the Free Software Foundation, Inc., *
19 * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
20 ***************************************************************************/
21
22
23 #ifndef IMAGEDATA_H
24 #define IMAGEDATA_Hcxx . . $ `src/board/imagehandler.h:24:9`!
25
26 #include <QtCore>
27 #include <QPixmap>
28
29 /* DONTREDRAWSTONES lets Qt do the scaling rather than redrawing them
30 * to scale. I'm not convinced it improves the speed all that much
31 * but I do know that it removes the border on the white stones in 2d
32 * mode so until that's fixed or until another solution is found, I'll
33 * comment this out */
34
35 //#define DONTREDRAWSTONES
36 struct WhiteDesccxx . . $ WhiteDesc# {
37 double cosThetacxx . . $ WhiteDesc#cosTheta., sinThetacxx . . $ WhiteDesc#sinTheta.;
38 double stripeWidthcxx . . $ WhiteDesc#stripeWidth., xAddcxx . . $ WhiteDesc#xAdd.;
39 double stripeMulcxx . . $ WhiteDesc#stripeMul., zMulcxx . . $ WhiteDesc#zMul.;
40 };
41
42 class ImageHandlercxx . . $ ImageHandler#
43 {
44 public:
45 ImageHandlercxx . . $ ImageHandler#ImageHandler(49f6e7a06ebc5aa8).();
46 ~cxx . . $ ImageHandler#`~ImageHandler`(ced63f7c635d850d).ImageHandlercxx . . $ ImageHandler#();
47
48 void setDisplaycxx . . $ ImageHandler#setDisplay(b45ddcbc8423892c).(bool isDisplay = false);
49 void setSquareSizecxx . . $ ImageHandler#setSquareSize(d4f767463ce0a6b3).(int size);
50 static QPixmapcxx . . $ QPixmap# *getBoardPixmapcxx . . $ ImageHandler#getBoardPixmap(238698adec9265ce).(QStringcxx . . $ QString# ) ;
51 static QPixmapcxx . . $ QPixmap# *getTablePixmapcxx . . $ ImageHandler#getTablePixmap(238698adec9265ce).(QStringcxx . . $ QString# ) ;
52 #ifdef DONTREDRAWSTONES
53 QList<QPixmap> *getStonePixmaps() const { return stonePixmapsScaled; }
54 QList<QPixmap> *getSmallStonePixmaps() const { return smallStonePixmapsScaled; }
55 QList<QPixmap> *getGhostPixmaps() const { return ghostPixmapsScaled; }
56 #else
57 QListcxx . . $ QList#<QPixmapcxx . . $ QPixmap#> *getStonePixmapscxx . . $ ImageHandler#getStonePixmaps(4d7a006e8cda1ecc).() const { return stonePixmapscxx . . $ ImageHandler#stonePixmaps.; }
58 QListcxx . . $ QList#<QPixmapcxx . . $ QPixmap#> *getSmallStonePixmapscxx . . $ ImageHandler#getSmallStonePixmaps(4d7a006e8cda1ecc).() const { return smallStonePixmapscxx . . $ ImageHandler#smallStonePixmaps.; }
59 QListcxx . . $ QList#<QPixmapcxx . . $ QPixmap#> *getGhostPixmapscxx . . $ ImageHandler#getGhostPixmaps(4d7a006e8cda1ecc).() const { return ghostPixmapscxx . . $ ImageHandler#ghostPixmaps.; }
60 #endif //DONTREDRAWSTONES
61 static QListcxx . . $ QList#<QPixmapcxx . . $ QPixmap#> * getAlternateGhostPixmapscxx . . $ ImageHandler#getAlternateGhostPixmaps(ce0b25172eea24ae).() { return altGhostPixmapscxx . . $ ImageHandler#altGhostPixmaps.; }
62 void ghostImagecxx . . $ ImageHandler#ghostImage(704f3a01150ff264).(QImagecxx . . $ QImage# *img);
63
64 void icopycxx . . $ ImageHandler#icopy(94bb9eec2cee512d).(int *im, QImagecxx . . $ QImage# &qim, int w, int h);
65 void decideAppearancecxx . . $ ImageHandler#decideAppearance(d2bbad5d533427ea).(WhiteDesccxx . . $ WhiteDesc# *desc, int size);
66 double getStripecxx . . $ ImageHandler#getStripe(d9dffde7ddc3be78).(WhiteDesccxx . . $ WhiteDesc# &white, double bright, double z, int x, int y);
67
68
69 protected:
70 void scaleBoardPixmapcxx . . $ ImageHandler#scaleBoardPixmap(e7703eed14a9147e).(QPixmapcxx . . $ QPixmap# *pix, int size);
71
72 private:
73
74 #ifdef DONTREDRAWSTONES
75 void generateStonePixmaps(int size);
76 QList<QPixmap> *stonePixmapsScaled, *ghostPixmapsScaled, *smallStonePixmapsScaled;
77 #endif //DONTREDRAWSTONES
78 void paintBlackStonecxx . . $ ImageHandler#paintBlackStone(4e9e9c8a28d6ae02). (QImagecxx . . $ QImage# &bi, int d, int stone_render);
79 void paintShadowStonecxx . . $ ImageHandler#paintShadowStone(1cbfcdfc6ad5b986). (QImagecxx . . $ QImage# &si, int d);
80 void paintWhiteStonecxx . . $ ImageHandler#paintWhiteStone(4e9e9c8a28d6ae02). (QImagecxx . . $ QImage# &wi, int d, int stone_render);
81 int * painting_buffercxx . . $ ImageHandler#painting_buffer.;
82
83 bool isDisplayBoardcxx . . $ ImageHandler#isDisplayBoard.;
84 QListcxx . . $ QList#<QPixmapcxx . . $ QPixmap#> *stonePixmapscxx . . $ ImageHandler#stonePixmaps., *ghostPixmapscxx . . $ ImageHandler#ghostPixmaps., *smallStonePixmapscxx . . $ ImageHandler#smallStonePixmaps.;
85 static QListcxx . . $ QList#<QPixmapcxx . . $ QPixmap#> *altGhostPixmapscxx . . $ ImageHandler#altGhostPixmaps.;
86 static QPixmapcxx . . $ QPixmap# *tablePixmapcxx . . $ ImageHandler#tablePixmap.;
87 static QPixmapcxx . . $ QPixmap# *woodPixmap1cxx . . $ ImageHandler#woodPixmap1.;
88 static int classCountercxx . . $ ImageHandler#classCounter.;
89 };
90
91 #endif