|
Krita Source Code Documentation
|
#include "config.h"#include "enums.h"#include <stddef.h>#include <stdio.h>#include <inttypes.h>#include <netinet/in.h>Go to the source code of this file.
Classes | |
| struct | rect |
| struct | tileDimensions |
| struct | xcfImage |
| struct | xcfLayer |
| struct | xcfTiles |
Macros | |
| #define | _(s) (s) |
| #define | __ATTRIBUTE__(x) |
| #define | __STDC_FORMAT_MACROS |
| #define | disjointRects(A, B) ((A).l >= (B).r || (A).r <= (B).l || (A).t >= (B).b || (A).b <= (B).t) |
| #define | isSubrect(A, B) ((A).l >= (B).l && (A).r <= (B).r && (A).t >= (B).t && (A).b <= (B).b) |
| #define | N_(s) (s) |
| #define | nls_init() (void)0 |
| #define | strcasecmp strcmp |
| #define | TILE_HEIGHT (1<<TILE_SHIFT) |
| #define | TILE_LEFT(x) ((x) & -TILE_WIDTH) |
| #define | TILE_NUM(x) ((x) >> TILE_SHIFT) |
| #define | TILE_SHIFT 6 |
| #define | TILE_TOP(y) ((y) & -TILE_HEIGHT) |
| #define | TILE_WIDTH (1<<TILE_SHIFT) |
| #define | XCF_ERROR 1 |
| #define | XCF_OK 0 |
| #define | XCF_PTR_EMPTY 0 |
| #define | xcfBE(a) |
| #define | xcfL(a) ((a) & 3 ? xcfBE(a) : ntohl(*(uint32_t *)(xcf_file + (a)))) |
| #define | xcfLE(a) |
Functions | |
| int | closeout (FILE *, const char *) |
| int | computeDimensions (struct tileDimensions *) |
| void void void | FatalBadXCF (const char *format,...) __ATTRIBUTE__((format(printf |
| void | FatalGeneric (int status, const char *format,...) __ATTRIBUTE__((format(printf |
| void void | FatalUnexpected (const char *format,...) __ATTRIBUTE__((format(printf |
| void void void void | FatalUnsupportedXCF (const char *format,...) __ATTRIBUTE__((format(printf |
| void | free_or_close_xcf (void) |
| int | getBasicXcfInfo (void) |
| void void void void void | gpl_blurb (void) |
| FILE * | openout (const char *) |
| void | read_or_mmap_xcf (const char *filename, const char *unzipper) |
| int | xcfCheckspace (uint32_t addr, int spaceafter, const char *format,...) __ATTRIBUTE__((format(printf |
| void | xcffree (void *) |
| void * | xcfmalloc (size_t size) |
| int | xcfNextprop (uint32_t *master, uint32_t *body, PropType *type) |
| int int | xcfOffset (uint32_t addr, int spaceafter, uint32_t *apparent) |
| const char * | xcfString (uint32_t ptr, uint32_t *after) |
Variables | |
| const char * | progname |
| int | use_utf8 |
| int | verboseFlag |
| struct xcfImage | XCF |
| uint8_t * | xcf_file |
| size_t | xcf_length |
| #define _ | ( | s | ) | (s) |
Definition at line 32 of file xcftools.h.
| #define __ATTRIBUTE__ | ( | x | ) |
Definition at line 55 of file xcftools.h.
| #define __STDC_FORMAT_MACROS |
Definition at line 38 of file xcftools.h.
| #define disjointRects | ( | A, | |
| B ) ((A).l >= (B).r || (A).r <= (B).l || (A).t >= (B).b || (A).b <= (B).t) |
Definition at line 135 of file xcftools.h.
Definition at line 133 of file xcftools.h.
| #define N_ | ( | s | ) | (s) |
Definition at line 35 of file xcftools.h.
| #define nls_init | ( | ) | (void)0 |
Definition at line 33 of file xcftools.h.
| #define strcasecmp strcmp |
Definition at line 73 of file xcftools.h.
| #define TILE_HEIGHT (1<<TILE_SHIFT) |
Definition at line 155 of file xcftools.h.
| #define TILE_LEFT | ( | x | ) | ((x) & -TILE_WIDTH) |
Definition at line 161 of file xcftools.h.
| #define TILE_NUM | ( | x | ) | ((x) >> TILE_SHIFT) |
Definition at line 163 of file xcftools.h.
| #define TILE_SHIFT 6 |
Definition at line 153 of file xcftools.h.
| #define TILE_TOP | ( | y | ) | ((y) & -TILE_HEIGHT) |
Definition at line 162 of file xcftools.h.
| #define TILE_WIDTH (1<<TILE_SHIFT) |
Definition at line 154 of file xcftools.h.
| #define XCF_ERROR 1 |
Definition at line 105 of file xcftools.h.
| #define XCF_OK 0 |
Definition at line 106 of file xcftools.h.
| #define XCF_PTR_EMPTY 0 |
Definition at line 107 of file xcftools.h.
| #define xcfBE | ( | a | ) |
Definition at line 79 of file xcftools.h.
Definition at line 91 of file xcftools.h.
| #define xcfLE | ( | a | ) |
Definition at line 83 of file xcftools.h.
| int closeout | ( | FILE * | f, |
| const char * | name ) |
Definition at line 152 of file utils.c.
References _, FatalUnexpected(), XCF_ERROR, and XCF_OK.
| int computeDimensions | ( | struct tileDimensions * | d | ) |
Definition at line 220 of file xcf-general.c.
References FatalBadXCF(), TILE_HEIGHT, TILE_WIDTH, XCF_ERROR, and XCF_OK.
| void FatalGeneric | ( | int | status, |
| const char * | format, | ||
| ... ) |
| int getBasicXcfInfo | ( | void | ) |
Definition at line 248 of file xcf-general.c.
References _, tileDimensions::c, xcfImage::colormapptr, COMPRESS_NONE, xcfImage::compression, computeDimensions(), xcfLayer::dim, FatalBadXCF(), GIMP_NORMAL_MODE, xcfLayer::hasMask, tileDimensions::height, xcfImage::height, xcfTiles::hierarchy, xcfLayer::isGroup, xcfLayer::isVisible, rect::l, xcfImage::layers, xcfLayer::mask, xcfLayer::mode, xcfLayer::name, xcfImage::numLayers, xcfLayer::opacity, xcfLayer::path, xcfLayer::pathLength, xcfLayer::pixels, PROP_APPLY_MASK, PROP_COLORMAP, PROP_COMPRESSION, PROP_END, PROP_GROUP_ITEM, PROP_ITEM_PATH, PROP_MODE, PROP_OFFSETS, PROP_OPACITY, PROP_VISIBLE, xcfLayer::propptr, rect::t, xcfTiles::tileptrs, xcfLayer::type, xcfImage::type, xcfImage::version, tileDimensions::width, xcfImage::width, XCF, XCF_ERROR, xcf_file, XCF_OK, XCF_PTR_EMPTY, xcfCheckspace(), xcffree(), xcfL, xcfmalloc(), xcfNextprop(), xcfOffset(), and xcfString().
Definition at line 102 of file utils.c.
References _, PACKAGE_STRING, and progname.
| FILE * openout | ( | const char * | name | ) |
Definition at line 138 of file utils.c.
References _, FatalUnexpected(), and XCF_PTR_EMPTY.
| void read_or_mmap_xcf | ( | const char * | filename, |
| const char * | unzipper ) |
| int xcfCheckspace | ( | uint32_t | addr, |
| int | spaceafter, | ||
| const char * | format, | ||
| ... ) |
Definition at line 125 of file utils.c.
References xcf_file, and xcf_length.
| void * xcfmalloc | ( | size_t | size | ) |
Definition at line 114 of file utils.c.
References _, FatalUnexpected(), and XCF_PTR_EMPTY.
| int xcfNextprop | ( | uint32_t * | master, |
| uint32_t * | body, | ||
| PropType * | type ) |
Definition at line 52 of file xcf-general.c.
References FatalBadXCF(), length(), PROP_APPLY_MASK, PROP_COLORMAP, PROP_COMPRESSION, PROP_END, PROP_MODE, PROP_OFFSETS, PROP_OPACITY, showPropType(), XCF_ERROR, XCF_OK, xcfCheckspace(), and xcfL.
| int int xcfOffset | ( | uint32_t | addr, |
| int | spaceafter, | ||
| uint32_t * | apparent ) |
Definition at line 34 of file xcf-general.c.
References XCF_ERROR, XCF_OK, xcfCheckspace(), and xcfL.
| const char * xcfString | ( | uint32_t | ptr, |
| uint32_t * | after ) |
Definition at line 117 of file xcf-general.c.
References _, FatalBadXCF(), FatalUnexpected(), ICONV_CONST, length(), use_utf8, xcf_file, XCF_OK, XCF_PTR_EMPTY, xcfCheckspace(), xcffree(), xcfL, and xcfmalloc().
|
extern |
Definition at line 31 of file xcf-general.c.
| struct xcfImage XCF |
|
extern |
Definition at line 29 of file xcf-general.c.
|
extern |
Definition at line 30 of file xcf-general.c.