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