TileSet

Search for usage in LXR

#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< TileTiles
 
typedef QFlags< TileTiles
 
typedef QFlags< TileTiles
 

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]

using TileSet::PixmapList = QVector<QPixmap>
protected

Definition at line 101 of file android/shadowhelper/tileset.h.

◆ PixmapList [2/3]

using TileSet::PixmapList = QVector<QPixmap>
protected

Definition at line 101 of file linux/shadowhelper/tileset.h.

◆ PixmapList [3/3]

using TileSet::PixmapList = QVector<QPixmap>
protected

Definition at line 101 of file windows/shadowhelper/tileset.h.

◆ Tiles [1/3]

Definition at line 76 of file android/shadowhelper/tileset.h.

◆ Tiles [2/3]

Definition at line 76 of file linux/shadowhelper/tileset.h.

◆ Tiles [3/3]

Definition at line 76 of file windows/shadowhelper/tileset.h.

Member Enumeration Documentation

◆ Tile [1/3]

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]

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]

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
w1width of the left chunks
h1height of the top chunks
w2width of the not-left-or-right chunks
h2height 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]

virtual TileSet::~TileSet ( )
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
w1width of the left chunks
h1height of the top chunks
w2width of the not-left-or-right chunks
h2height of the not-top-or-bottom chunks

◆ ~TileSet() [2/3]

virtual TileSet::~TileSet ( )
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
w1width of the left chunks
h1height of the top chunks
w2width of the not-left-or-right chunks
h2height of the not-top-or-bottom chunks

◆ ~TileSet() [3/3]

virtual TileSet::~TileSet ( )
inlinevirtual

Definition at line 52 of file windows/shadowhelper/tileset.h.

Member Function Documentation

◆ initPixmap()

void TileSet::initPixmap ( PixmapList & pixmaps,
const QPixmap & source,
int w,
int h,
const QRect & rect )
protected

Definition at line 41 of file android/shadowhelper/tileset.cpp.

◆ isValid() [1/3]

bool TileSet::isValid ( ) const
inline

Definition at line 91 of file android/shadowhelper/tileset.h.

◆ isValid() [2/3]

bool TileSet::isValid ( ) const
inline

Definition at line 91 of file linux/shadowhelper/tileset.h.

◆ isValid() [3/3]

bool TileSet::isValid ( ) const
inline

Definition at line 91 of file windows/shadowhelper/tileset.h.

◆ pixmap() [1/3]

QPixmap TileSet::pixmap ( int index) const
inline

Definition at line 95 of file android/shadowhelper/tileset.h.

◆ pixmap() [2/3]

QPixmap TileSet::pixmap ( int index) const
inline

Definition at line 95 of file linux/shadowhelper/tileset.h.

◆ pixmap() [3/3]

QPixmap TileSet::pixmap ( int index) const
inline

Definition at line 95 of file windows/shadowhelper/tileset.h.

◆ render() [1/3]

void TileSet::render ( const QRect & constRect,
QPainter * painter,
Tiles tiles = Ring ) const

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]

void TileSet::render ( const QRect & ,
QPainter * ,
Tiles = Ring ) const

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]

void TileSet::render ( const QRect & ,
QPainter * ,
Tiles = Ring ) const

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]

QSize TileSet::size ( ) const
inline

Definition at line 87 of file android/shadowhelper/tileset.h.

◆ size() [2/3]

QSize TileSet::size ( ) const
inline

Definition at line 87 of file linux/shadowhelper/tileset.h.

◆ size() [3/3]

QSize TileSet::size ( ) const
inline

Definition at line 87 of file windows/shadowhelper/tileset.h.


The documentation for this class was generated from the following files:
This file is part of the KDE documentation.
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.