]> granicus.if.org Git - php/commitdiff
@-Add the swf_ortho function. (Sterling)
authorSterling Hughes <sterling@php.net>
Tue, 23 May 2000 04:09:20 +0000 (04:09 +0000)
committerSterling Hughes <sterling@php.net>
Tue, 23 May 2000 04:09:20 +0000 (04:09 +0000)
ext/swf/php_swf.h
ext/swf/swf.c

index 90a1a3361fda2c739835e8c377cd677c44850dac..3cb06178d5cfa51c090a042d42d501f11a690f0a 100644 (file)
@@ -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);
index e0b7e2f2e2395f2bc3ca14017c72adced0573dc5..b8e8d980f3dae94483cad7338247bab2969c52e4 100644 (file)
@@ -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)