#include "php_ming.h"
static zend_function_entry ming_functions[] = {
- PHP_FALIAS(ming_setcubicthreshold, ming_setCubicThreshold, NULL)
- PHP_FALIAS(swfbutton_keypress, swfbutton_keypress, NULL)
+ PHP_FALIAS(ming_setcubicthreshold, ming_setCubicThreshold, NULL)
+ PHP_FALIAS(ming_setscale, ming_setScale, NULL)
+ PHP_FALIAS(swfbutton_keypress, swfbutton_keypress, NULL)
{ NULL, NULL, NULL }
};
{
zval **num;
- if(ZEND_NUM_ARGS() != 1 ||
- zend_get_parameters_ex(1, &num) == FAILURE)
+ if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(1, &num) == FAILURE)
WRONG_PARAM_COUNT;
convert_to_long_ex(num);
Ming_setCubicThreshold(Z_LVAL_PP(num));
}
+PHP_FUNCTION(ming_setScale)
+{
+ zval **num;
+
+ if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(1, &num) == FAILURE)
+ WRONG_PARAM_COUNT;
+
+ convert_to_double_ex(num);
+
+ Ming_setScale(Z_DVAL_PP(num));
+}
+
static int le_swfmoviep;
static int le_swfshapep;
static int le_swffillp;
static zend_function_entry swfaction_functions[] = {
PHP_FALIAS(swfaction, swfaction_init, NULL)
- PHP_FALIAS(add, swfaction_add, NULL)
{ NULL, NULL, NULL }
};
-/* {{{ proto object swfaction_init([string])
- returns a new SWFAction object, optionally compiling the given script */
+/* {{{ proto object swfaction_init(string)
+ returns a new SWFAction object, compiling the given script */
PHP_FUNCTION(swfaction_init)
{
zval **script;
int ret;
- if(ZEND_NUM_ARGS() == 0)
- {
- action = newSWFAction();
- }
- if(ZEND_NUM_ARGS() == 1)
- {
- SWFOutput out;
-
- if(zend_get_parameters_ex(1, &script) == FAILURE)
- WRONG_PARAM_COUNT;
+ if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(1, &script) == FAILURE)
+ WRONG_PARAM_COUNT;
- convert_to_string_ex(script);
+ convert_to_string_ex(script);
- /* XXX - need to deal with compiler errors */
- action = compileSWFActionCode(Z_STRVAL_PP(script));
+ /* XXX - need to deal with compiler errors */
+ action = compileSWFActionCode(Z_STRVAL_PP(script));
- if(!action)
- php_error(E_ERROR, "Couldn't compile code. And I'm not smart enough to tell you why, sorry.");
- }
- else
- WRONG_PARAM_COUNT;
+ if(!action)
+ php_error(E_ERROR, "Couldn't compile code. And I'm not smart enough to tell you why, sorry.");
ret = zend_list_insert(action, le_swfactionp);
return (SWFAction)action;
}
-/* }}} */
-/* {{{ proto void swfaction_add(action, [args..])
- adds the given action (and optional args) to this SWFAction */
-
-PHP_FUNCTION(swfaction_add)
-{
- SWFAction action = getAction(getThis());
- /* XXX - etc. */
-}
-
/* }}} */
/* }}} */
if(ZEND_NUM_ARGS() != 0)
WRONG_PARAM_COUNT;
- RETURN_LONG(SWFBitmap_getWidth(getBitmap(getThis())));
+ RETURN_DOUBLE(SWFBitmap_getWidth(getBitmap(getThis())));
}
/* }}} */
if(ZEND_NUM_ARGS() != 0)
WRONG_PARAM_COUNT;
- RETURN_LONG(SWFBitmap_getHeight(getBitmap(getThis())));
+ RETURN_DOUBLE(SWFBitmap_getHeight(getBitmap(getThis())));
}
/* }}} */
if(ZEND_NUM_ARGS() != 2 || zend_get_parameters_ex(2, &x, &y) == FAILURE)
WRONG_PARAM_COUNT;
- convert_to_long_ex(x);
- convert_to_long_ex(y);
+ convert_to_double_ex(x);
+ convert_to_double_ex(y);
- SWFDisplayItem_moveTo(getDisplayItem(getThis()), Z_LVAL_PP(x), Z_LVAL_PP(y));
+ SWFDisplayItem_moveTo(getDisplayItem(getThis()), Z_DVAL_PP(x), Z_DVAL_PP(y));
}
/* }}} */
if(ZEND_NUM_ARGS() != 2 || zend_get_parameters_ex(2, &x, &y) == FAILURE)
WRONG_PARAM_COUNT;
- convert_to_long_ex(x);
- convert_to_long_ex(y);
+ convert_to_double_ex(x);
+ convert_to_double_ex(y);
- SWFDisplayItem_move(getDisplayItem(getThis()), Z_LVAL_PP(x), Z_LVAL_PP(y));
+ SWFDisplayItem_move(getDisplayItem(getThis()), Z_DVAL_PP(x), Z_DVAL_PP(y));
}
/* }}} */
if(ZEND_NUM_ARGS() != 2 || zend_get_parameters_ex(2, &x, &y) == FAILURE)
WRONG_PARAM_COUNT;
- convert_to_long_ex(x);
- convert_to_long_ex(y);
+ convert_to_double_ex(x);
+ convert_to_double_ex(y);
- SWFFill_moveTo(getFill(getThis()), Z_LVAL_PP(x), Z_LVAL_PP(y));
+ SWFFill_moveTo(getFill(getThis()), Z_DVAL_PP(x), Z_DVAL_PP(y));
}
/* }}} */
PHP_FUNCTION(swffont_getWidth)
{
zval **zstring;
- int width;
+ float width;
if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(1, &zstring) == FAILURE)
WRONG_PARAM_COUNT;
width = SWFFont_getStringWidth(getFont(getThis()), Z_STRVAL_PP(zstring));
- RETURN_LONG(width);
+ RETURN_DOUBLE(width);
}
/* }}} */
if(ZEND_NUM_ARGS() != 0)
WRONG_PARAM_COUNT;
- RETURN_LONG(SWFFont_getAscent(getFont(getThis())));
+ RETURN_DOUBLE(SWFFont_getAscent(getFont(getThis())));
}
/* }}} */
if(ZEND_NUM_ARGS() != 0)
WRONG_PARAM_COUNT;
- RETURN_LONG(SWFFont_getDescent(getFont(getThis())));
+ RETURN_DOUBLE(SWFFont_getDescent(getFont(getThis())));
}
/* }}} */
if(ZEND_NUM_ARGS() != 0)
WRONG_PARAM_COUNT;
- RETURN_LONG(SWFFont_getLeading(getFont(getThis())));
+ RETURN_DOUBLE(SWFFont_getLeading(getFont(getThis())));
}
/* }}} */
if((ZEND_NUM_ARGS() != 2) || zend_get_parameters_ex(2, &x, &y) == FAILURE)
WRONG_PARAM_COUNT;
- convert_to_long_ex(x);
- convert_to_long_ex(y);
+ convert_to_double_ex(x);
+ convert_to_double_ex(y);
- SWFMovie_setDimension(movie, Z_LVAL_PP(x), Z_LVAL_PP(y));
+ SWFMovie_setDimension(movie, Z_DVAL_PP(x), Z_DVAL_PP(y));
}
/* }}} */
if((*zfile)->type == IS_RESOURCE)
{
ZEND_FETCH_RESOURCE(file, FILE *, zfile, -1,"File-Handle",php_file_le_fopen());
-
- RETURN_LONG(SWFMovie_output(getMovie(getThis()),
- &phpFileOutputMethod, file));
}
else
{
}
/* }}} */
-/* {{{ proto void swfshape_movepento(int x, int y)
+/* {{{ proto void swfshape_movepento(double x, double y)
Moves the pen to shape coordinates (x,y) */
PHP_FUNCTION(swfshape_movepento)
if((ZEND_NUM_ARGS() != 2) || zend_get_parameters_ex(2, &x, &y) == FAILURE)
WRONG_PARAM_COUNT;
- convert_to_long_ex(x);
- convert_to_long_ex(y);
+ convert_to_double_ex(x);
+ convert_to_double_ex(y);
SWFShape_movePenTo(getShape(getThis()),
- Z_LVAL_PP(x), Z_LVAL_PP(y));
+ Z_DVAL_PP(x), Z_DVAL_PP(y));
}
/* }}} */
-/* {{{ proto void swfshape_movepen(int x, int y)
+/* {{{ proto void swfshape_movepen(double x, double y)
Moves the pen from its current location by vector (x,y) */
PHP_FUNCTION(swfshape_movepen)
if((ZEND_NUM_ARGS() != 2) || zend_get_parameters_ex(2, &x, &y) == FAILURE)
WRONG_PARAM_COUNT;
- convert_to_long_ex(x);
- convert_to_long_ex(y);
+ convert_to_double_ex(x);
+ convert_to_double_ex(y);
SWFShape_movePen(getShape(getThis()),
- Z_LVAL_PP(x), Z_LVAL_PP(y));
+ Z_DVAL_PP(x), Z_DVAL_PP(y));
}
/* }}} */
-/* {{{ proto void swfshape_drawlineto(int x, int y)
+/* {{{ proto void swfshape_drawlineto(double x, double y)
Draws a line from the current pen position to shape coordinates (x,y)
in the current line style */
if ((ZEND_NUM_ARGS() != 2) || zend_get_parameters_ex(2, &x, &y) == FAILURE)
WRONG_PARAM_COUNT;
- convert_to_long_ex(x);
- convert_to_long_ex(y);
+ convert_to_double_ex(x);
+ convert_to_double_ex(y);
- SWFShape_drawLineTo(getShape(getThis()), Z_LVAL_PP(x), Z_LVAL_PP(y));
+ SWFShape_drawLineTo(getShape(getThis()), Z_DVAL_PP(x), Z_DVAL_PP(y));
}
/* }}} */
-/* {{{ proto void swfshape_drawline(int dx, int dy)
+/* {{{ proto void swfshape_drawline(double dx, double dy)
Draws a line from the current pen position (x,y) to the point (x+dx,y+dy)
in the current line style */
if ((ZEND_NUM_ARGS() != 2) || zend_get_parameters_ex(2, &x, &y) == FAILURE)
WRONG_PARAM_COUNT;
- convert_to_long_ex(x);
- convert_to_long_ex(y);
+ convert_to_double_ex(x);
+ convert_to_double_ex(y);
- SWFShape_drawLine(getShape(getThis()), Z_LVAL_PP(x), Z_LVAL_PP(y));
+ SWFShape_drawLine(getShape(getThis()), Z_DVAL_PP(x), Z_DVAL_PP(y));
}
/* }}} */
-/* {{{ proto void swfshape_drawcurveto(int cx, int cy, int ax, int ay)
- Draws a curve from the current pen position (x,y) to the point (ax,ay)
- in the current line style, using point (cx,cy) as a control point */
+/* {{{ proto void swfshape_drawcurveto(double ax, double ay, double bx, double by [, double dx, double dy])
+ Draws a curve from the current pen position (x,y) to the point (bx,by)
+ in the current line style, using point (ax,ay) as a control point.
+ Or draws a cubic bezier to point (dx,dy) with control points (ax,ay) and (bx,by)
+*/
PHP_FUNCTION(swfshape_drawcurveto)
{
if(zend_get_parameters_ex(4, &cx, &cy, &ax, &ay) == FAILURE)
WRONG_PARAM_COUNT;
- convert_to_long_ex(cx);
- convert_to_long_ex(cy);
- convert_to_long_ex(ax);
- convert_to_long_ex(ay);
+ convert_to_double_ex(cx);
+ convert_to_double_ex(cy);
+ convert_to_double_ex(ax);
+ convert_to_double_ex(ay);
SWFShape_drawCurveTo(getShape(getThis()),
- Z_LVAL_PP(cx), Z_LVAL_PP(cy),
- Z_LVAL_PP(ax), Z_LVAL_PP(ay));
+ Z_DVAL_PP(cx), Z_DVAL_PP(cy),
+ Z_DVAL_PP(ax), Z_DVAL_PP(ay));
}
else if(ZEND_NUM_ARGS() == 6)
{
if(zend_get_parameters_ex(6, &bx, &by, &cx, &cy, &dx, &dy) == FAILURE)
WRONG_PARAM_COUNT;
- convert_to_long_ex(bx);
- convert_to_long_ex(by);
- convert_to_long_ex(cx);
- convert_to_long_ex(cy);
- convert_to_long_ex(dx);
- convert_to_long_ex(dy);
+ convert_to_double_ex(bx);
+ convert_to_double_ex(by);
+ convert_to_double_ex(cx);
+ convert_to_double_ex(cy);
+ convert_to_double_ex(dx);
+ convert_to_double_ex(dy);
RETURN_LONG(SWFShape_drawCubicTo(getShape(getThis()),
- Z_LVAL_PP(bx), Z_LVAL_PP(by),
- Z_LVAL_PP(cx), Z_LVAL_PP(cy),
- Z_LVAL_PP(dx), Z_LVAL_PP(dy)));
+ Z_DVAL_PP(bx), Z_DVAL_PP(by),
+ Z_DVAL_PP(cx), Z_DVAL_PP(cy),
+ Z_DVAL_PP(dx), Z_DVAL_PP(dy)));
}
else
WRONG_PARAM_COUNT;
}
/* }}} */
-/* {{{ proto void swfshape_drawcurve(int cdx, int cdy, int adx, int ady)
- Draws a curve from the current pen position (x,y) to the point (x+adx,y+ady)
- in the current line style, using point (x+cdx,y+cdy) as a control point */
+/* {{{ proto void swfshape_drawcurve(double adx, double ady, double bdx, double bdy [, double cdx, double cdy])
+ Draws a curve from the current pen position (x,y) to the point (x+bdx,y+bdy)
+ in the current line style, using point (x+adx,y+ady) as a control point
+ Or draws a cubic bezier to point (x+cdx,x+cdy) with control points
+ (x+adx,y+ady) and (x+bdx,y+bdy)
+*/
PHP_FUNCTION(swfshape_drawcurve)
{
if(zend_get_parameters_ex(4, &cx, &cy, &ax, &ay) == FAILURE)
WRONG_PARAM_COUNT;
- convert_to_long_ex(cx);
- convert_to_long_ex(cy);
- convert_to_long_ex(ax);
- convert_to_long_ex(ay);
+ convert_to_double_ex(cx);
+ convert_to_double_ex(cy);
+ convert_to_double_ex(ax);
+ convert_to_double_ex(ay);
SWFShape_drawCurve(getShape(getThis()),
- Z_LVAL_PP(cx), Z_LVAL_PP(cy),
- Z_LVAL_PP(ax), Z_LVAL_PP(ay));
+ Z_DVAL_PP(cx), Z_DVAL_PP(cy),
+ Z_DVAL_PP(ax), Z_DVAL_PP(ay));
}
else if(ZEND_NUM_ARGS() == 6)
{
if(zend_get_parameters_ex(6, &bx, &by, &cx, &cy, &dx, &dy) == FAILURE)
WRONG_PARAM_COUNT;
- convert_to_long_ex(bx);
- convert_to_long_ex(by);
- convert_to_long_ex(cx);
- convert_to_long_ex(cy);
- convert_to_long_ex(dx);
- convert_to_long_ex(dy);
+ convert_to_double_ex(bx);
+ convert_to_double_ex(by);
+ convert_to_double_ex(cx);
+ convert_to_double_ex(cy);
+ convert_to_double_ex(dx);
+ convert_to_double_ex(dy);
RETURN_LONG(SWFShape_drawCubic(getShape(getThis()),
- Z_LVAL_PP(bx), Z_LVAL_PP(by),
- Z_LVAL_PP(cx), Z_LVAL_PP(cy),
- Z_LVAL_PP(dx), Z_LVAL_PP(dy)));
+ Z_DVAL_PP(bx), Z_DVAL_PP(by),
+ Z_DVAL_PP(cx), Z_DVAL_PP(cy),
+ Z_DVAL_PP(dx), Z_DVAL_PP(dy)));
}
else
WRONG_PARAM_COUNT;
if((ZEND_NUM_ARGS() != 1) || zend_get_parameters_ex(1, &r) == FAILURE)
WRONG_PARAM_COUNT;
- convert_to_long_ex(r);
+ convert_to_double_ex(r);
- SWFShape_drawCircle(getShape(getThis()), Z_LVAL_PP(r));
+ SWFShape_drawCircle(getShape(getThis()), Z_DVAL_PP(r));
}
/* }}} */
zend_get_parameters_ex(3, &r, &start, &end) == FAILURE)
WRONG_PARAM_COUNT;
- convert_to_long_ex(r);
+ convert_to_double_ex(r);
convert_to_double_ex(start);
convert_to_double_ex(end);
/* convert angles to radians, since that's what php uses elsewhere */
- SWFShape_drawArc(getShape(getThis()), Z_LVAL_PP(r),
+ SWFShape_drawArc(getShape(getThis()), Z_DVAL_PP(r),
Z_DVAL_PP(start)*M_PI/180, Z_DVAL_PP(end)*M_PI/180);
}
/* }}} */
-/* {{{ proto void swfshape_drawcubic(int bx, int by, int cx, int cy, int dx, int dy)
+/* {{{ proto void swfshape_drawcubic(double bx, double by, double cx, double cy, double dx, double dy)
Draws a cubic bezier curve using the current position and the three given
points as control points */
zend_get_parameters_ex(6, &bx, &by, &cx, &cy, &dx, &dy) == FAILURE)
WRONG_PARAM_COUNT;
- convert_to_long_ex(bx);
- convert_to_long_ex(by);
- convert_to_long_ex(cx);
- convert_to_long_ex(cy);
- convert_to_long_ex(dx);
- convert_to_long_ex(dy);
+ convert_to_double_ex(bx);
+ convert_to_double_ex(by);
+ convert_to_double_ex(cx);
+ convert_to_double_ex(cy);
+ convert_to_double_ex(dx);
+ convert_to_double_ex(dy);
RETURN_LONG(SWFShape_drawCubic(getShape(getThis()),
- Z_LVAL_PP(bx), Z_LVAL_PP(by),
- Z_LVAL_PP(cx), Z_LVAL_PP(cy),
- Z_LVAL_PP(dx), Z_LVAL_PP(dy)));
+ Z_DVAL_PP(bx), Z_DVAL_PP(by),
+ Z_DVAL_PP(cx), Z_DVAL_PP(cy),
+ Z_DVAL_PP(dx), Z_DVAL_PP(dy)));
}
/* }}} */
-/* {{{ proto void swfshape_drawcubic(int bx, int by, int cx, int cy, int dx, int dy)
+/* {{{ proto void swfshape_drawcubic(double bx, double by, double cx, double cy, double dx, double dy)
Draws a cubic bezier curve using the current position and the three given
points as control points */
zend_get_parameters_ex(6, &bx, &by, &cx, &cy, &dx, &dy) == FAILURE)
WRONG_PARAM_COUNT;
- convert_to_long_ex(bx);
- convert_to_long_ex(by);
- convert_to_long_ex(cx);
- convert_to_long_ex(cy);
- convert_to_long_ex(dx);
- convert_to_long_ex(dy);
+ convert_to_double_ex(bx);
+ convert_to_double_ex(by);
+ convert_to_double_ex(cx);
+ convert_to_double_ex(cy);
+ convert_to_double_ex(dx);
+ convert_to_double_ex(dy);
RETURN_LONG(SWFShape_drawCubicTo(getShape(getThis()),
- Z_LVAL_PP(bx), Z_LVAL_PP(by),
- Z_LVAL_PP(cx), Z_LVAL_PP(cy),
- Z_LVAL_PP(dx), Z_LVAL_PP(dy)));
+ Z_DVAL_PP(bx), Z_DVAL_PP(by),
+ Z_DVAL_PP(cx), Z_DVAL_PP(cy),
+ Z_DVAL_PP(dx), Z_DVAL_PP(dy)));
}
/* }}} */
}
/* }}} */
-/* {{{ proto void swftext_setHeight(int height)
+/* {{{ proto void swftext_setHeight(double height)
Sets this SWFText object's current height to given height */
PHP_FUNCTION(swftext_setHeight)
if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(1, &height) == FAILURE)
WRONG_PARAM_COUNT;
- convert_to_long_ex(height);
+ convert_to_double_ex(height);
- SWFText_setHeight(text, Z_LVAL_PP(height));
+ SWFText_setHeight(text, Z_DVAL_PP(height));
}
/* }}} */
}
/* }}} */
-/* {{{ proto void swftext_moveTo(int x, int y)
+/* {{{ proto void swftext_moveTo(double x, double y)
Moves this SWFText object's current pen position to (x,y) in text
coordinates */
if(ZEND_NUM_ARGS() != 2 || zend_get_parameters_ex(2, &x, &y) == FAILURE)
WRONG_PARAM_COUNT;
- convert_to_long_ex(x);
- convert_to_long_ex(y);
+ convert_to_double_ex(x);
+ convert_to_double_ex(y);
- SWFText_setXY(text, Z_LVAL_PP(x), Z_LVAL_PP(y));
+ SWFText_setXY(text, Z_DVAL_PP(x), Z_DVAL_PP(y));
}
/* }}} */
}
/* }}} */
-/* {{{ proto int swftext_getWidth(string)
+/* {{{ proto double swftext_getWidth(string)
calculates the width of the given string in this text objects current font and size */
PHP_FUNCTION(swftext_getWidth)
width = SWFText_getStringWidth(getText(getThis()), Z_STRVAL_PP(zstring));
- RETURN_LONG(width);
+ RETURN_DOUBLE(width);
}
/* }}} */
-/* {{{ proto int swftext_getAscent()
+/* {{{ proto double swftext_getAscent()
returns the ascent of the current font at its current size, or 0 if not available */
PHP_FUNCTION(swftext_getAscent)
if(ZEND_NUM_ARGS() != 0)
WRONG_PARAM_COUNT;
- RETURN_LONG(SWFText_getAscent(getText(getThis())));
+ RETURN_DOUBLE(SWFText_getAscent(getText(getThis())));
}
/* }}} */
-/* {{{ proto int swftext_getDescent()
+/* {{{ proto double swftext_getDescent()
returns the descent of the current font at its current size, or 0 if not available */
PHP_FUNCTION(swftext_getDescent)
if(ZEND_NUM_ARGS() != 0)
WRONG_PARAM_COUNT;
- RETURN_LONG(SWFText_getDescent(getText(getThis())));
+ RETURN_DOUBLE(SWFText_getDescent(getText(getThis())));
}
/* }}} */
-/* {{{ proto int swftext_getLeading()
+/* {{{ proto double swftext_getLeading()
returns the leading of the current font at its current size, or 0 if not available */
PHP_FUNCTION(swftext_getLeading)
if(ZEND_NUM_ARGS() != 0)
WRONG_PARAM_COUNT;
- RETURN_LONG(SWFText_getLeading(getText(getThis())));
+ RETURN_DOUBLE(SWFText_getLeading(getText(getThis())));
}
/* }}} */
}
/* }}} */
-/* {{{ proto void swftextfield_setBounds(int width, int height)
+/* {{{ proto void swftextfield_setBounds(double width, double height)
sets the width and height of this textfield */
PHP_FUNCTION(swftextfield_setBounds)
if(ZEND_NUM_ARGS() != 2 || zend_get_parameters_ex(2, &width, &height) == FAILURE)
WRONG_PARAM_COUNT;
- convert_to_long_ex(width);
- convert_to_long_ex(height);
+ convert_to_double_ex(width);
+ convert_to_double_ex(height);
- SWFTextField_setBounds(field, Z_LVAL_PP(width), Z_LVAL_PP(height));
+ SWFTextField_setBounds(field, Z_DVAL_PP(width), Z_DVAL_PP(height));
}
/* }}} */
}
/* }}} */
-/* {{{ proto void swftextfield_setHeight(int)
- sets the height of this textfield */
+/* {{{ proto void swftextfield_setHeight(double height)
+ sets the font height of this textfield */
PHP_FUNCTION(swftextfield_setHeight)
{
if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(1, &height) == FAILURE)
WRONG_PARAM_COUNT;
- convert_to_long_ex(height);
+ convert_to_double_ex(height);
- SWFTextField_setHeight(field, Z_LVAL_PP(height));
+ SWFTextField_setHeight(field, Z_DVAL_PP(height));
}
/* }}} */
-/* {{{ proto void swftextfield_setLeftMargin(int)
+/* {{{ proto void swftextfield_setLeftMargin(double)
sets the left margin of this textfield */
PHP_FUNCTION(swftextfield_setLeftMargin)
if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(1, &margin) == FAILURE)
WRONG_PARAM_COUNT;
- convert_to_long_ex(margin);
+ convert_to_double_ex(margin);
- SWFTextField_setLeftMargin(field, Z_LVAL_PP(margin));
+ SWFTextField_setLeftMargin(field, Z_DVAL_PP(margin));
}
/* }}} */
-/* {{{ proto void swftextfield_setRightMargin(int)
+/* {{{ proto void swftextfield_setRightMargin(double)
sets the right margin of this textfield */
PHP_FUNCTION(swftextfield_setRightMargin)
if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(1, &margin) == FAILURE)
WRONG_PARAM_COUNT;
- convert_to_long_ex(margin);
+ convert_to_double_ex(margin);
- SWFTextField_setRightMargin(field, Z_LVAL_PP(margin));
+ SWFTextField_setRightMargin(field, Z_DVAL_PP(margin));
}
/* }}} */
-/* {{{ proto void swftextfield_setMargins(int left, int right)
+/* {{{ proto void swftextfield_setMargins(double left, double right)
sets both margins of this textfield */
PHP_FUNCTION(swftextfield_setMargins)
zend_get_parameters_ex(2, &left, &right) == FAILURE)
WRONG_PARAM_COUNT;
- convert_to_long_ex(left);
- convert_to_long_ex(right);
+ convert_to_double_ex(left);
+ convert_to_double_ex(right);
- SWFTextField_setLeftMargin(field, Z_LVAL_PP(left));
- SWFTextField_setRightMargin(field, Z_LVAL_PP(right));
+ SWFTextField_setLeftMargin(field, Z_DVAL_PP(left));
+ SWFTextField_setRightMargin(field, Z_DVAL_PP(right));
}
/* }}} */
-/* {{{ proto void swftextfield_setIndentation(int)
+/* {{{ proto void swftextfield_setIndentation(double)
sets the indentation of the first line of this textfield */
PHP_FUNCTION(swftextfield_setIndentation)
if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(1, &indent) == FAILURE)
WRONG_PARAM_COUNT;
- convert_to_long_ex(indent);
+ convert_to_double_ex(indent);
- SWFTextField_setIndentation(field, Z_LVAL_PP(indent));
+ SWFTextField_setIndentation(field, Z_DVAL_PP(indent));
}
/* }}} */
-/* {{{ proto void swftextfield_setLineSpacing(int)
+/* {{{ proto void swftextfield_setLineSpacing(double)
sets the line spacing of this textfield */
PHP_FUNCTION(swftextfield_setLineSpacing)
if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(1, &spacing) == FAILURE)
WRONG_PARAM_COUNT;
- convert_to_long_ex(spacing);
+ convert_to_double_ex(spacing);
- SWFTextField_setIndentation(field, Z_LVAL_PP(spacing));
+ SWFTextField_setLineSpacing(field, Z_DVAL_PP(spacing));
}
/* }}} */
-/* {{{ proto void swftextfield_setColor(int)
+/* {{{ proto void swftextfield_setColor(int r, int g, int b [, int a])
sets the color of this textfield */
PHP_FUNCTION(swftextfield_setColor)
CONSTANT("SWFTEXTFIELD_WORDWRAP", SWFTEXTFIELD_WORDWRAP);
CONSTANT("SWFTEXTFIELD_DRAWBOX", SWFTEXTFIELD_DRAWBOX);
CONSTANT("SWFTEXTFIELD_NOSELECT", SWFTEXTFIELD_NOSELECT);
+ CONSTANT("SWFTEXTFIELD_HTML", SWFTEXTFIELD_HTML);
/* flags for SWFTextField_align */
CONSTANT("SWFTEXTFIELD_ALIGN_LEFT", SWFTEXTFIELD_ALIGN_LEFT);