TileSet
#include <tileset.h>
Public Types | |
enum | Tile { Top = 0x1 , Left = 0x2 , Bottom = 0x4 , Right = 0x8 , Center = 0x10 , TopLeft = Top|Left , TopRight = Top|Right , BottomLeft = Bottom|Left , BottomRight = Bottom|Right , Ring = Top|Left|Bottom|Right , Horizontal = Left|Right|Center , Vertical = Top|Bottom|Center , Full = Ring|Center , Top = 0x1 , Left = 0x2 , Bottom = 0x4 , Right = 0x8 , Center = 0x10 , TopLeft = Top|Left , TopRight = Top|Right , BottomLeft = Bottom|Left , BottomRight = Bottom|Right , Ring = Top|Left|Bottom|Right , Horizontal = Left|Right|Center , Vertical = Top|Bottom|Center , Full = Ring|Center , Top = 0x1 , Left = 0x2 , Bottom = 0x4 , Right = 0x8 , Center = 0x10 , TopLeft = Top|Left , TopRight = Top|Right , BottomLeft = Bottom|Left , BottomRight = Bottom|Right , Ring = Top|Left|Bottom|Right , Horizontal = Left|Right|Center , Vertical = Top|Bottom|Center , Full = Ring|Center } |
enum | Tile { Top = 0x1 , Left = 0x2 , Bottom = 0x4 , Right = 0x8 , Center = 0x10 , TopLeft = Top|Left , TopRight = Top|Right , BottomLeft = Bottom|Left , BottomRight = Bottom|Right , Ring = Top|Left|Bottom|Right , Horizontal = Left|Right|Center , Vertical = Top|Bottom|Center , Full = Ring|Center , Top = 0x1 , Left = 0x2 , Bottom = 0x4 , Right = 0x8 , Center = 0x10 , TopLeft = Top|Left , TopRight = Top|Right , BottomLeft = Bottom|Left , BottomRight = Bottom|Right , Ring = Top|Left|Bottom|Right , Horizontal = Left|Right|Center , Vertical = Top|Bottom|Center , Full = Ring|Center , Top = 0x1 , Left = 0x2 , Bottom = 0x4 , Right = 0x8 , Center = 0x10 , TopLeft = Top|Left , TopRight = Top|Right , BottomLeft = Bottom|Left , BottomRight = Bottom|Right , Ring = Top|Left|Bottom|Right , Horizontal = Left|Right|Center , Vertical = Top|Bottom|Center , Full = Ring|Center } |
enum | Tile { Top = 0x1 , Left = 0x2 , Bottom = 0x4 , Right = 0x8 , Center = 0x10 , TopLeft = Top|Left , TopRight = Top|Right , BottomLeft = Bottom|Left , BottomRight = Bottom|Right , Ring = Top|Left|Bottom|Right , Horizontal = Left|Right|Center , Vertical = Top|Bottom|Center , Full = Ring|Center , Top = 0x1 , Left = 0x2 , Bottom = 0x4 , Right = 0x8 , Center = 0x10 , TopLeft = Top|Left , TopRight = Top|Right , BottomLeft = Bottom|Left , BottomRight = Bottom|Right , Ring = Top|Left|Bottom|Right , Horizontal = Left|Right|Center , Vertical = Top|Bottom|Center , Full = Ring|Center , Top = 0x1 , Left = 0x2 , Bottom = 0x4 , Right = 0x8 , Center = 0x10 , TopLeft = Top|Left , TopRight = Top|Right , BottomLeft = Bottom|Left , BottomRight = Bottom|Right , Ring = Top|Left|Bottom|Right , Horizontal = Left|Right|Center , Vertical = Top|Bottom|Center , Full = Ring|Center } |
typedef QFlags< Tile > | Tiles |
typedef QFlags< Tile > | Tiles |
typedef QFlags< Tile > | Tiles |
Public Member Functions | |
TileSet (const QPixmap &, int w1, int h1, int w2, int h2) | |
TileSet (const QPixmap &, int w1, int h1, int w2, int h2) | |
TileSet (const QPixmap &, int w1, int h1, int w2, int h2) | |
bool | isValid () const |
bool | isValid () const |
bool | isValid () const |
QPixmap | pixmap (int index) const |
QPixmap | pixmap (int index) const |
QPixmap | pixmap (int index) const |
void | render (const QRect &, QPainter *, Tiles=Ring) const |
void | render (const QRect &, QPainter *, Tiles=Ring) const |
void | render (const QRect &, QPainter *, Tiles=Ring) const |
QSize | size () const |
QSize | size () const |
QSize | size () const |
Protected Types | |
using | PixmapList = QVector<QPixmap> |
using | PixmapList = QVector<QPixmap> |
using | PixmapList = QVector<QPixmap> |
Protected Member Functions | |
void | initPixmap (PixmapList &, const QPixmap &, int w, int h, const QRect &) |
void | initPixmap (PixmapList &, const QPixmap &, int w, int h, const QRect &) |
void | initPixmap (PixmapList &, const QPixmap &, int w, int h, const QRect &) |
Detailed Description
tilesets are collections of stretchable pixmaps corresponding to a given widget corners, sides, and center.
corner pixmaps are never stretched. center pixmaps are
Definition at line 33 of file android/shadowhelper/tileset.h.
Member Typedef Documentation
◆ PixmapList [1/3]
|
protected |
Definition at line 101 of file android/shadowhelper/tileset.h.
◆ PixmapList [2/3]
|
protected |
Definition at line 101 of file linux/shadowhelper/tileset.h.
◆ PixmapList [3/3]
|
protected |
Definition at line 101 of file windows/shadowhelper/tileset.h.
◆ Tiles [1/3]
typedef QFlags< Tile > TileSet::Tiles |
Definition at line 76 of file android/shadowhelper/tileset.h.
◆ Tiles [2/3]
typedef QFlags< Tile > TileSet::Tiles |
Definition at line 76 of file linux/shadowhelper/tileset.h.
◆ Tiles [3/3]
typedef QFlags< Tile > TileSet::Tiles |
Definition at line 76 of file windows/shadowhelper/tileset.h.
Member Enumeration Documentation
◆ Tile [1/3]
enum TileSet::Tile |
Flags specifying what sides to draw in render.
Corners are drawn when the sides forming that corner are drawn, e.g. Top|Left draws the top-center, center-left, and top-left chunks. The center-center chunk is only drawn when Center is requested.
Definition at line 61 of file android/shadowhelper/tileset.h.
◆ Tile [2/3]
enum TileSet::Tile |
Flags specifying what sides to draw in render.
Corners are drawn when the sides forming that corner are drawn, e.g. Top|Left draws the top-center, center-left, and top-left chunks. The center-center chunk is only drawn when Center is requested.
Definition at line 61 of file linux/shadowhelper/tileset.h.
◆ Tile [3/3]
enum TileSet::Tile |
Flags specifying what sides to draw in render.
Corners are drawn when the sides forming that corner are drawn, e.g. Top|Left draws the top-center, center-left, and top-left chunks. The center-center chunk is only drawn when Center is requested.
Definition at line 61 of file windows/shadowhelper/tileset.h.
Constructor & Destructor Documentation
◆ TileSet() [1/4]
TileSet::TileSet | ( | const QPixmap & | source, |
int | w1, | ||
int | h1, | ||
int | w2, | ||
int | h2 ) |
Create a TileSet from a pixmap.
The size of the bottom/right chunks is whatever is left over from the other chunks, whose size is specified in the required parameters.
- Parameters
-
w1 width of the left chunks h1 height of the top chunks w2 width of the not-left-or-right chunks h2 height of the not-top-or-bottom chunks
Definition at line 83 of file android/shadowhelper/tileset.cpp.
◆ TileSet() [2/4]
TileSet::TileSet | ( | ) |
Definition at line 75 of file android/shadowhelper/tileset.cpp.
◆ ~TileSet() [1/3]
|
inlinevirtual |
Definition at line 52 of file android/shadowhelper/tileset.h.
◆ TileSet() [3/4]
TileSet::TileSet | ( | const QPixmap & | , |
int | w1, | ||
int | h1, | ||
int | w2, | ||
int | h2 ) |
Create a TileSet from a pixmap.
The size of the bottom/right chunks is whatever is left over from the other chunks, whose size is specified in the required parameters.
- Parameters
-
w1 width of the left chunks h1 height of the top chunks w2 width of the not-left-or-right chunks h2 height of the not-top-or-bottom chunks
◆ ~TileSet() [2/3]
|
inlinevirtual |
Definition at line 52 of file linux/shadowhelper/tileset.h.
◆ TileSet() [4/4]
TileSet::TileSet | ( | const QPixmap & | , |
int | w1, | ||
int | h1, | ||
int | w2, | ||
int | h2 ) |
Create a TileSet from a pixmap.
The size of the bottom/right chunks is whatever is left over from the other chunks, whose size is specified in the required parameters.
- Parameters
-
w1 width of the left chunks h1 height of the top chunks w2 width of the not-left-or-right chunks h2 height of the not-top-or-bottom chunks
◆ ~TileSet() [3/3]
|
inlinevirtual |
Definition at line 52 of file windows/shadowhelper/tileset.h.
Member Function Documentation
◆ initPixmap()
|
protected |
Definition at line 41 of file android/shadowhelper/tileset.cpp.
◆ isValid() [1/3]
|
inline |
Definition at line 91 of file android/shadowhelper/tileset.h.
◆ isValid() [2/3]
|
inline |
Definition at line 91 of file linux/shadowhelper/tileset.h.
◆ isValid() [3/3]
|
inline |
Definition at line 91 of file windows/shadowhelper/tileset.h.
◆ pixmap() [1/3]
|
inline |
Definition at line 95 of file android/shadowhelper/tileset.h.
◆ pixmap() [2/3]
|
inline |
Definition at line 95 of file linux/shadowhelper/tileset.h.
◆ pixmap() [3/3]
|
inline |
Definition at line 95 of file windows/shadowhelper/tileset.h.
◆ render() [1/3]
Fills the specified rect with tiled chunks.
Corners are never tiled, edges are tiled in one direction, and the center chunk is tiled in both directions. Partial tiles are used as needed so that the entire rect is perfectly filled. Filling is performed as if all chunks are being drawn.
Definition at line 110 of file android/shadowhelper/tileset.cpp.
◆ render() [2/3]
Fills the specified rect with tiled chunks.
Corners are never tiled, edges are tiled in one direction, and the center chunk is tiled in both directions. Partial tiles are used as needed so that the entire rect is perfectly filled. Filling is performed as if all chunks are being drawn.
◆ render() [3/3]
Fills the specified rect with tiled chunks.
Corners are never tiled, edges are tiled in one direction, and the center chunk is tiled in both directions. Partial tiles are used as needed so that the entire rect is perfectly filled. Filling is performed as if all chunks are being drawn.
◆ size() [1/3]
|
inline |
Definition at line 87 of file android/shadowhelper/tileset.h.
◆ size() [2/3]
|
inline |
Definition at line 87 of file linux/shadowhelper/tileset.h.
◆ size() [3/3]
|
inline |
Definition at line 87 of file windows/shadowhelper/tileset.h.
The documentation for this class was generated from the following files:
Documentation copyright © 1996-2024 The KDE developers.
Generated on Fri May 17 2024 11:56:16 by doxygen 1.10.0 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.