Browse Source

@-Add the swf_ortho function. (Sterling)

PHP-4.0.5
Sterling Hughes 26 years ago
parent
commit
39af86f017
  1. 1
      ext/swf/php_swf.h
  2. 23
      ext/swf/swf.c

1
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);

23
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)

Loading…
Cancel
Save