Pencil2D Animation
Download Community News Docs Contribute
  • Overview
  • Articles
  • Code
  •  
  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • File List
Loading...
Searching...
No Matches
  • core_lib
  • src
  • graphics
  • bitmap
tile.h
1/*
2
3Pencil2D - Traditional Animation Software
4Copyright (C) 2012-2020 Matthew Chiawen Chang
5
6This program is free software; you can redistribute it and/or
7modify it under the terms of the GNU General Public License
8as published by the Free Software Foundation; version 2 of the License.
9
10This program is distributed in the hope that it will be useful,
11but WITHOUT ANY WARRANTY; without even the implied warranty of
12MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13GNU General Public License for more details.
14
15*/
16
17#ifndef TILE_H
18#define TILE_H
19
20#include <QPoint>
21#include <QPixmap>
22
23class Tile
24{
25public:
26
27 explicit Tile (const QPoint& pos, QSize size);
28 ~Tile();
29
30 const QPixmap& pixmap() const { return mTilePixmap; }
31 QPixmap& pixmap() { return mTilePixmap; }
32
33 const QPoint& pos() const { return mPos; }
34 const QPointF& posF() const { return mPosF; }
35 const QRect& bounds() const { return mBounds; }
36 const QSize& size() const { return mSize; }
37
39 void load(const QImage& image, const QPoint& topLeft);
40 void clear();
41
42private:
43 QPixmap mTilePixmap;
44 QPointF mPosF;
45 QPoint mPos;
46 QRect mBounds;
47 QSize mSize;
48};
49
50#endif // TILE_H
Tile
Definition: tile.h:24
Tile::load
void load(const QImage &image, const QPoint &topLeft)
Loads the input image into the tile.
Definition: tile.cpp:35
QImage
QPixmap
QPoint
QPointF
QRect
QSize
Generated on Thu May 8 2025 04:47:53 for Pencil2D by doxygen 1.9.6 based on revision 4513250b1d5b1a3676ec0e67b06b7a885ceaae39