summaryrefslogtreecommitdiff
path: root/ext/swf
diff options
context:
space:
mode:
authorUwe Steinmann <steinm@php.net>2000-05-17 15:47:15 +0000
committerUwe Steinmann <steinm@php.net>2000-05-17 15:47:15 +0000
commitd20eec24ce5e7ac26641a990cb5e09671b62f127 (patch)
tree7609c6ec931e3affe9a2e1e8f2f271230e743e04 /ext/swf
parent7bde3adbd4d5c6b863b3d1c03389ba0f7aab944a (diff)
downloadphp-git-d20eec24ce5e7ac26641a990cb5e09671b62f127.tar.gz
- fixed wrong interpretation of last parameter of swf_rotate()
- add MOD_COLOR and MOD_MATRIX constants
Diffstat (limited to 'ext/swf')
-rw-r--r--ext/swf/config.m46
-rw-r--r--ext/swf/swf.c7
2 files changed, 8 insertions, 5 deletions
diff --git a/ext/swf/config.m4 b/ext/swf/config.m4
index da766d36e5..b02dcf26b6 100644
--- a/ext/swf/config.m4
+++ b/ext/swf/config.m4
@@ -9,7 +9,7 @@ PHP_ARG_WITH(swf, for libswf support,
if test "$PHP_SWF" != "no"; then
for i in /usr/local /usr $PHP_SWF; do
- if test -r $i/libswf.a; then
+ if test -r $i/lib/libswf.a; then
SWF_DIR=$i
fi
done
@@ -18,10 +18,10 @@ if test "$PHP_SWF" != "no"; then
AC_MSG_ERROR(Please reinstall libswf.a - I cannot find libswf.a)
fi
- AC_ADD_INCLUDE($SWF_DIR)
+ AC_ADD_INCLUDE($SWF_DIR/include)
PHP_SUBST(SWF_SHARED_LIBADD)
- AC_ADD_LIBRARY_WITH_PATH(swf, $SWF_DIR, SWF_SHARED_LIBADD)
+ AC_ADD_LIBRARY_WITH_PATH(swf, $SWF_DIR/lib, SWF_SHARED_LIBADD)
AC_DEFINE(HAVE_SWF,1,[ ])
PHP_EXTENSION(swf, $ext_shared)
diff --git a/ext/swf/swf.c b/ext/swf/swf.c
index 5b01fb340b..ea6b7d9199 100644
--- a/ext/swf/swf.c
+++ b/ext/swf/swf.c
@@ -121,6 +121,8 @@ PHP_MINFO_FUNCTION(swf)
PHP_MINIT_FUNCTION(swf)
{
+ REGISTER_LONG_CONSTANT("MOD_COLOR", MOD_COLOR, CONST_CS | CONST_PERSISTENT);
+ REGISTER_LONG_CONSTANT("MOD_MATRIX", MOD_MATRIX, CONST_CS | CONST_PERSISTENT);
REGISTER_LONG_CONSTANT("TYPE_PUSHBUTTON", TYPE_PUSHBUTTON, CONST_CS | CONST_PERSISTENT);
REGISTER_LONG_CONSTANT("TYPE_MENUBUTTON", TYPE_MENUBUTTON, CONST_CS | CONST_PERSISTENT);
REGISTER_DOUBLE_CONSTANT("BSHitTest", BSHitTest, CONST_CS | CONST_PERSISTENT);
@@ -458,6 +460,7 @@ void php_swf_define(INTERNAL_FUNCTION_PARAMETERS, int opt)
if (opt) {
swf_defineline((*objid)->value.lval, (float)(*x1)->value.dval, (float)(*y1)->value.dval,
(float)(*x2)->value.dval, (float)(*y2)->value.dval, (float)(*width)->value.dval);
+ (float)(*x2)->value.dval, (float)(*y2)->value.dval, (float)(*width)->value.dval);
} else {
swf_definerect((*objid)->value.lval, (float)(*x1)->value.dval, (float)(*y1)->value.dval,
(float)(*x2)->value.dval, (float)(*y2)->value.dval, (float)(*width)->value.dval);
@@ -1092,8 +1095,8 @@ PHP_FUNCTION(swf_rotate)
}
convert_to_double_ex(angle);
convert_to_string_ex(axis);
-
- swf_rotate((*angle)->value.dval, (*axis)->value.str.val);
+
+ swf_rotate((*angle)->value.dval, (char)((*axis)->value.str.val)[0]);
}
/* }}} */