diff options
author | Henning Makholm <henning@makholm.net> | 2009-07-01 18:00:00 (EDT) |
---|---|---|
committer | Julien Jorge <julien.jorge@stuff-o-matic.com> | 2013-01-10 16:10:03 (EST) |
commit | 70a9b1ca8750a43e8092807d174a8c49407aa213 (patch) | |
tree | 78e1cbff8e9750d918c4bc8782086fc37306492a /xcftools.h | |
parent | c60d2efdeaa61c5e8a930f9635548f5abaf201b3 (diff) | |
download | xcftools-70a9b1ca8750a43e8092807d174a8c49407aa213.zip xcftools-70a9b1ca8750a43e8092807d174a8c49407aa213.tar.gz xcftools-70a9b1ca8750a43e8092807d174a8c49407aa213.tar.bz2 |
Import of release 1.0.5
Diffstat (limited to 'xcftools.h')
-rw-r--r-- | xcftools.h | 13 |
1 files changed, 11 insertions, 2 deletions
@@ -144,8 +144,17 @@ int xcfNextprop(uint32_t *master,uint32_t *body); const char* xcfString(uint32_t ptr,uint32_t *after); /* These are hardcoded in the Gimp sources: */ -#define TILE_WIDTH 64 -#define TILE_HEIGHT 64 +#define TILE_SHIFT 6 +#define TILE_WIDTH (1<<TILE_SHIFT) +#define TILE_HEIGHT (1<<TILE_SHIFT) +/* These definitions of TILE_LEFT and TILE_TOP work correctly for negative + * numbers, but on the other hand depend on TILE_WIDTH and TILE_HEIGHT + * being powers of 2. That's okay, because the tile size cannot change + * anyway. + */ +#define TILE_LEFT(x) ((x) & -TILE_WIDTH) +#define TILE_TOP(y) ((y) & -TILE_HEIGHT) +#define TILE_NUM(x) ((x) >> TILE_SHIFT) struct tileDimensions { struct rect c ; |