pike.git / lib / modules / _Image_XCF.pmod

version» Context lines:

pike.git/lib/modules/_Image_XCF.pmod:1:   inherit Image._XCF;    + #define SIGNED(X) if(X>=(1<<31)) X=-((1<<32)-X) +    class PathPoint   {    int type;    float x;    float y;   }      class Path   {    string name;
pike.git/lib/modules/_Image_XCF.pmod:18:    array (PathPoint) points = ({});   }      class Guide   {    int pos;    int vertical;    void create(string data)    {    sscanf(data, "%4c%c", pos,vertical);vertical--; +  SIGNED(pos);    }   }      class Parasite   {    string name;    int flags;    string data;       void create( string _n, int _f, string _d )
pike.git/lib/modules/_Image_XCF.pmod:54:    data = data[slen..];    sscanf(data, "%4c%4c", flags, slen);    res += ({ Parasite( name,flags,data[8..slen+8-1] ) });    data = data[slen+8..];    }    return res;   }      #define FLAG(X,Y) case PROP_##X: sscanf(p->data, "%4c", flags->Y); break;   #define INT(X,Y) case PROP_##X: sscanf(p->data, "%4c", Y); break; + #define SINT(X,Y) case PROP_##X: sscanf(p->data, "%4c", Y); SIGNED(Y); break;      class Hierarchy   {    Image.image img;    Image.image alpha;    int width;    int height;    int bpp;       Hierarchy set_image( int x, int y, int bp, array tiles, int compression,
pike.git/lib/modules/_Image_XCF.pmod:215:    switch(p->type)    {    case PROP_ACTIVE_LAYER:    parent->active_layer = this_object();    break;    case PROP_SELECTION:    parent->selection = this_object();    break;    case PROP_OFFSETS:    sscanf(p->data, "%4c%4c", xoffset, yoffset); +  SIGNED(xoffset); +  SIGNED(yoffset);    break;    INT(OPACITY,opacity);    FLAG(VISIBLE,visible);    FLAG(LINKED,linked);    FLAG(PRESERVE_TRANSPARENCY,preserve_transparency);    FLAG(APPLY_MASK,apply_mask);    FLAG(EDIT_MASK,edit_mask);    FLAG(SHOW_MASK,show_mask);    INT(MODE,mode);    INT(TATTOO,tattoo);
pike.git/lib/modules/_Image_XCF.pmod:274:    Layer active_layer;    Channel active_channel;    Channel selection;          static string read_point_bz1( string data, Path path )    {    object p = PathPoint( );    int x, y;    sscanf(data, "%4c%4c%4c%s", p->type, x, y); +  SIGNED(x); +  SIGNED(y);    p->x = (float)x;    p->y = (float)y;    return data;    }       static string read_point_bz2( string data, Path path )    {    object p = PathPoint( );    sscanf(data, "%4c%4F%4F%s", p->type, p->x, p->y);    return data;