Changeset View
Changeset View
Standalone View
Standalone View
liboxygen/oxygentileset.cpp
Show All 26 Lines | 26 | { | |||
---|---|---|---|---|---|
27 | 27 | | |||
28 | //___________________________________________________________ | 28 | //___________________________________________________________ | ||
29 | inline bool bits(TileSet::Tiles flags, TileSet::Tiles testFlags) | 29 | inline bool bits(TileSet::Tiles flags, TileSet::Tiles testFlags) | ||
30 | { return (flags & testFlags) == testFlags; } | 30 | { return (flags & testFlags) == testFlags; } | ||
31 | 31 | | |||
32 | //______________________________________________________________________________________ | 32 | //______________________________________________________________________________________ | ||
33 | inline qreal devicePixelRatio( const QPixmap& pixmap ) | 33 | inline qreal devicePixelRatio( const QPixmap& pixmap ) | ||
34 | { | 34 | { | ||
35 | #if QT_VERSION >= 0x050300 | | |||
36 | return pixmap.devicePixelRatio(); | 35 | return pixmap.devicePixelRatio(); | ||
37 | #else | | |||
38 | Q_UNUSED( pixmap ); | | |||
39 | return 1; | | |||
40 | #endif | | |||
41 | } | 36 | } | ||
42 | 37 | | |||
43 | //______________________________________________________________________________________ | 38 | //______________________________________________________________________________________ | ||
44 | inline void setDevicePixelRatio( QPixmap& pixmap, qreal value ) | 39 | inline void setDevicePixelRatio( QPixmap& pixmap, qreal value ) | ||
45 | { | 40 | { | ||
46 | #if QT_VERSION >= 0x050300 | | |||
47 | return pixmap.setDevicePixelRatio( value ); | 41 | return pixmap.setDevicePixelRatio( value ); | ||
48 | #else | | |||
49 | Q_UNUSED( pixmap ); | | |||
50 | Q_UNUSED( value ); | | |||
51 | #endif | | |||
52 | } | 42 | } | ||
53 | 43 | | |||
54 | //______________________________________________________________ | 44 | //______________________________________________________________ | ||
55 | int TileSet::_sideExtent = 32; | 45 | int TileSet::_sideExtent = 32; | ||
56 | 46 | | |||
57 | //______________________________________________________________ | 47 | //______________________________________________________________ | ||
58 | void TileSet::initPixmap( PixmapList& pixmaps, const QPixmap &source, int width, int height, const QRect &rect) | 48 | void TileSet::initPixmap( PixmapList& pixmaps, const QPixmap &source, int width, int height, const QRect &rect) | ||
59 | { | 49 | { | ||
▲ Show 20 Lines • Show All 186 Lines • Show Last 20 Lines |