|
Krita Source Code Documentation
|
#include "xcftools.h"Go to the source code of this file.
Classes | |
| struct | Tile |
Macros | |
| #define | ALPHA(rgba) ((uint8_t)(rgba)) |
| #define | ALPHA_SHIFT 0 |
| #define | assertTileCompatibility(t1, t2) assert((t1)->count==(t2)->count) |
| #define | BLUE_SHIFT 24 |
| #define | FULLALPHA(rgba) ((uint8_t)(rgba) == 255) |
| #define | GREEN_SHIFT 16 |
| #define | INIT_SCALETABLE_IF(foo) (ok_scaletable || !(foo) || (mk_scaletable(),0) ) |
| #define | invalidateSummary(tile, mask) do{ assert((tile)->refcount==1); (tile)->summary &= mask; } while(0) |
| #define | NEWALPHA(rgb, a) (((rgba)(rgb) & 0xFFFFFF00) + (a)) |
| #define | NULLALPHA(rgba) ((uint8_t)(rgba) == 0) |
| #define | RED_SHIFT 8 |
| #define | TILESUMMARY_ALLFULL 2 |
| #define | TILESUMMARY_ALLNULL 4 |
| #define | TILESUMMARY_CRISP 1 /* everything either null or full */ |
| #define | TILESUMMARY_UPTODATE 8 |
| #define | TILEXn(dim, tx) ((tx)==(dim).tilesx ? (dim).c.r : (dim).c.l + ((tx)*TILE_WIDTH)) |
| #define | TILEYn(dim, ty) ((ty)==(dim).tilesy ? (dim).c.b : (dim).c.t + ((ty)*TILE_HEIGHT)) |
Typedefs | |
| typedef int | refcount_t |
| typedef uint32_t | rgba |
| typedef int | summary_t |
Functions | |
| summary_t | __ATTRIBUTE__ ((pure)) tileSummary(struct Tile *) |
| void | applyMask (struct Tile *tile, struct Tile *mask) |
| int | degrayPixel (rgba) |
| void | fillTile (struct Tile *, rgba) |
| struct Tile * | forkTile (struct Tile *) |
| void | freeTile (struct Tile *) |
| struct Tile * | getLayerTile (struct xcfLayer *, const struct rect *) |
| struct Tile * | getMaskOrLayerTile (struct tileDimensions *dim, struct xcfTiles *tiles, struct rect want) |
| int | initColormap () |
| int | initLayer (struct xcfLayer *) |
| void | mk_scaletable (void) |
| struct Tile * | newTile (struct rect) |
Variables | |
| rgba | colormap [256] |
| unsigned | colormapLength |
| const rgba | graytable [256] |
| int | ok_scaletable |
| uint8_t | scaletable [256][256] |
| #define assertTileCompatibility | ( | t1, | |
| t2 ) assert((t1)->count==(t2)->count) |
| #define INIT_SCALETABLE_IF | ( | foo | ) | (ok_scaletable || !(foo) || (mk_scaletable(),0) ) |
| #define invalidateSummary | ( | tile, | |
| mask ) do{ assert((tile)->refcount==1); (tile)->summary &= mask; } while(0) |
| #define NEWALPHA | ( | rgb, | |
| a ) (((rgba)(rgb) & 0xFFFFFF00) + (a)) |
| #define TILESUMMARY_CRISP 1 /* everything either null or full */ |
| #define TILEXn | ( | dim, | |
| tx ) ((tx)==(dim).tilesx ? (dim).c.r : (dim).c.l + ((tx)*TILE_WIDTH)) |
| #define TILEYn | ( | dim, | |
| ty ) ((ty)==(dim).tilesy ? (dim).c.b : (dim).c.t + ((ty)*TILE_HEIGHT)) |
| typedef int refcount_t |
| summary_t __ATTRIBUTE__ | ( | (pure) | ) |
Definition at line 531 of file pixels.c.
References ALPHA, ALPHA_SHIFT, assertTileCompatibility, Tile::count, freeTile(), INIT_SCALETABLE_IF, invalidateSummary, NEWALPHA, Tile::pixels, and scaletable.
| int degrayPixel | ( | rgba | pixel | ) |
Definition at line 29 of file pixels.c.
References BLUE_SHIFT, GREEN_SHIFT, and RED_SHIFT.
Definition at line 283 of file pixels.c.
References Tile::count, FULLALPHA, NULLALPHA, Tile::pixels, Tile::summary, TILESUMMARY_ALLFULL, TILESUMMARY_ALLNULL, TILESUMMARY_CRISP, and TILESUMMARY_UPTODATE.
Definition at line 244 of file pixels.c.
References _, FatalUnsupportedXCF(), progname, Tile::refcount, and XCF_PTR_EMPTY.
Definition at line 255 of file pixels.c.
References Tile::refcount, and xcffree().
Definition at line 546 of file pixels.c.
References ALPHA, applyMask(), rect::b, tileDimensions::c, Tile::count, xcfLayer::dim, disjointRects, fillTile(), freeTile(), getMaskOrLayerTile(), xcfLayer::hasMask, INIT_SCALETABLE_IF, invalidateSummary, rect::l, xcfLayer::mask, xcfLayer::name, NEWALPHA, newTile(), xcfLayer::opacity, Tile::pixels, xcfLayer::pixels, rect::r, scaletable, Tile::summary, rect::t, TILESUMMARY_ALLFULL, TILESUMMARY_ALLNULL, TILESUMMARY_CRISP, and XCF_PTR_EMPTY.
| struct Tile * getMaskOrLayerTile | ( | struct tileDimensions * | dim, |
| struct xcfTiles * | tiles, | ||
| struct rect | want ) |
Definition at line 427 of file pixels.c.
References rect::b, tileDimensions::c, copyTilePixels(), Tile::count, fillTile(), freeTile(), isSubrect, rect::l, newTile(), xcfTiles::params, Tile::pixels, rect::r, Tile::summary, rect::t, TILE_HEIGHT, TILE_NUM, TILE_WIDTH, xcfTiles::tileptrs, tileDimensions::tilesx, TILEXn, TILEYn, XCF_OK, and XCF_PTR_EMPTY.
| int initColormap | ( | ) |
Definition at line 199 of file pixels.c.
References _, colormap, colormapLength, xcfImage::colormapptr, convertColormap, copyStraightPixels(), FatalUnsupportedXCF(), XCF, XCF_ERROR, XCF_OK, and xcfL.
| int initLayer | ( | struct xcfLayer * | layer | ) |
Definition at line 167 of file pixels.c.
References _, convertChannel, DEF, xcfLayer::dim, FatalUnsupportedXCF(), xcfTiles::hierarchy, initTileDirectory(), xcfLayer::mask, tileDimensions::ntiles, xcfTiles::params, xcfLayer::pixels, RGB, RGBA, showGimpImageType(), xcfLayer::type, XCF_ERROR, and XCF_OK.
Definition at line 26 of file scaletab.c.
References ok_scaletable, p, and scaletable.
Definition at line 231 of file pixels.c.
References Tile::count, Tile::refcount, Tile::summary, TILE_HEIGHT, TILE_WIDTH, and xcfmalloc().
|
extern |
Definition at line 23 of file scaletab.c.
|
extern |
Definition at line 22 of file scaletab.c.