3 Object place and move routines
5 Extension module for the rfxswf library.
6 Part of the swftools package.
8 Copyright (c) 2001 Rainer Böhme <rfxswf@reflex-studio.de>
10 This file is distributed under the GPL, see file COPYING for details
16 #define PF_MATRIX 0x04
17 #define PF_CXFORM 0x08
20 #define PF_CLIPACTION 0x40
22 int ObjectPlace(TAG * t,U16 id,U16 depth,MATRIX * m,CXFORM * cx,U8 * name)
26 flags = (id?PF_CHAR:0)|(m?PF_MATRIX:0)|(cx?PF_CXFORM:0)|(name?PF_NAME:0)|((m||cx)&&(!id)?PF_MOVE:0);
30 if (flags&PF_CHAR) SetU16(t,id);
31 if (flags&PF_MATRIX) SetMatrix(t,m);
32 if (flags&PF_CXFORM) SetCXForm(t,cx,(cx->a0!=256)||(cx->a1));
33 if (flags&PF_RATIO) SetU16(t,0);
34 if (flags&PF_NAME) SetString(t,name);
39 int PlaceObject(TAG * t,U16 id,U16 depth,MATRIX * m,CXFORM * cx,U8 * name, U16 clipaction)
43 flags = (id?PF_CHAR:0)|(m?PF_MATRIX:0)|(cx?PF_CXFORM:0)|(name?PF_NAME:0)|
44 ((m||cx)&&(!id)?PF_MOVE:0)|(clipaction?PF_CLIPACTION:0);
48 if (flags&PF_CHAR) SetU16(t,id);
49 if (flags&PF_MATRIX) SetMatrix(t,m);
50 if (flags&PF_CXFORM) SetCXForm(t,cx,(cx->a0!=256)||(cx->a1));
51 if (flags&PF_RATIO) SetU16(t,0);
52 if (flags&PF_NAME) SetString(t,name);
53 if (flags&PF_CLIPACTION) SetU16(t, clipaction);
57 int ObjectMove(TAG * t,U16 depth,MATRIX * m,CXFORM * cx)
58 { return ObjectPlace(t,0,depth,m,cx,NULL);