summaryrefslogtreecommitdiff
path: root/ext/swf
diff options
context:
space:
mode:
authorSterling Hughes <sterling@php.net>2000-05-23 04:09:20 +0000
committerSterling Hughes <sterling@php.net>2000-05-23 04:09:20 +0000
commit39af86f017e1bc9c8a73ca6c320b55626b0da26d (patch)
treecfe9a715ca7372243a1177bb1c59a093de613d42 /ext/swf
parentd91068a88a8b339ecbc02a64ec5c1bb27c2d873a (diff)
downloadphp-git-39af86f017e1bc9c8a73ca6c320b55626b0da26d.tar.gz
@-Add the swf_ortho function. (Sterling)
Diffstat (limited to 'ext/swf')
-rw-r--r--ext/swf/php_swf.h1
-rw-r--r--ext/swf/swf.c23
2 files changed, 24 insertions, 0 deletions
diff --git a/ext/swf/php_swf.h b/ext/swf/php_swf.h
index 90a1a3361f..3cb06178d5 100644
--- a/ext/swf/php_swf.h
+++ b/ext/swf/php_swf.h
@@ -92,6 +92,7 @@ PHP_FUNCTION(swf_addbuttonrecord);
PHP_FUNCTION(swf_oncondition);
PHP_FUNCTION(swf_endbutton);
PHP_FUNCTION(swf_viewport);
+PHP_FUNCTION(swf_ortho);
PHP_FUNCTION(swf_ortho2);
PHP_FUNCTION(swf_perspective);
PHP_FUNCTION(swf_polarview);
diff --git a/ext/swf/swf.c b/ext/swf/swf.c
index e0b7e2f2e2..b8e8d980f3 100644
--- a/ext/swf/swf.c
+++ b/ext/swf/swf.c
@@ -83,6 +83,7 @@ function_entry swf_functions[] = {
PHP_FE(swf_oncondition, NULL)
PHP_FE(swf_endbutton, NULL)
PHP_FE(swf_viewport, NULL)
+ PHP_FE(swf_ortho, NULL)
PHP_FE(swf_ortho2, NULL)
PHP_FE(swf_perspective, NULL)
PHP_FE(swf_polarview, NULL)
@@ -1001,6 +1002,28 @@ PHP_FUNCTION(swf_ortho2)
}
/* }}} */
+/* {{{ proto void swf_ortho(double xmin, double xmax, double ymin, double ymax, double zmin, double zmax)
+ Defines an orthographic mapping of user coordinates onto the current viewport */
+PHP_FUNCTION(swf_ortho)
+{
+ zval **xmin, **xmax, **ymin, **ymax, **zmin, **zmax;
+ if (ARG_COUNT(ht) != 6 ||
+ zend_get_parameters_ex(6, &xmin, &xmax, &ymin, &ymax, &zmin, &zmax) == FAILURE) {
+ WRONG_PARAM_COUNT;
+ }
+ convert_to_double_ex(xmin);
+ convert_to_double_ex(xmax);
+ convert_to_double_ex(ymin);
+ convert_to_double_ex(ymax);
+ convert_to_double_ex(zmin);
+ convert_to_double_ex(zmax);
+
+ swf_ortho((*xmin)->value.dval, (*xmax)->value.dval,
+ (*ymin)->value.dval, (*ymax)->value.dval,
+ (*zmin)->value.dval, (*zmax)->value.dval);
+}
+/* }}} */
+
/* {{{ proto void swf_polarview(double dist, double azimuth, double incidence, double twist)
Defines he viewer's position in polar coordinates */
PHP_FUNCTION(swf_polarview)