SWFShape->drawCurveTo()
(PHP 4 >= 4.0.5)
SWFShape->drawCurveTo() — Draws a curve
Описание
Эта функция является ЭКСПЕРИМЕНТАЛЬНОЙ. Поведение этой функции, ее имя и относящаяся к ней документация могут измениться в последующих версиях PHP без уведомления. Используйте эту функцию на свой страх и риск.
swfshape->drawcurveto() draws a quadratic curve (using the current line style, set by swfshape->setline()) from the current pen position to (anchorx ,anchory ) using (controlx ,controly ) as a control point. That is, head towards the control point, then smoothly turn to the anchor point.
With 6 parameters, it draws a cubic bezier to point (targetx , targety ) with control points (controlx , controly ) and (anchorx , anchory ).
- PHP Руководство
- Функции по категориям
- Индекс функций
- Справочник функций
- Генерация нетекстовых MIME форматов
- Ming (flash)
- Функция SWFShape::addFill() - Adds a solid fill to the shape
- Функция SWFShape::__construct() - Creates a new shape object
- Функция SWFShape::drawArc() - Draws an arc of radius r centered at the current location, from angle startAngle to angle endAngle measured clockwise from 12 o'clock
- Функция SWFShape::drawCircle() - Draws a circle of radius r centered at the current location, in a counter-clockwise fashion
- Функция SWFShape::drawCubic() - Draws a cubic bezier curve using the current position and the three given points as control points
- Функция SWFShape::drawCubicTo() - Draws a cubic bezier curve using the current position and the three given points as control points
- Функция SWFShape::drawCurve() - Draws a curve (relative)
- Функция SWFShape::drawCurveTo() - Draws a curve
- Функция SWFShape::drawGlyph() - Draws the first character in the given string into the shape using the glyph definition from the given font
- Функция SWFShape::drawLine() - Draws a line (relative)
- Функция SWFShape::drawLineTo() - Draws a line
- Функция SWFShape::movePen() - Moves the shape's pen (relative)
- Функция SWFShape::movePenTo() - Moves the shape's pen
- Функция SWFShape::setLeftFill() - Sets left rasterizing color
- Функция SWFShape::setLine() - Sets the shape's line style
- Функция SWFShape::setRightFill() - Sets right rasterizing color
Коментарии
for those new this all this, "anchor" is where you want to end up and "control" is the point you would go to if you were drawing a square.
for example, this would draw a quarter circle
<?php
$s->movePenTo(100, 100);
$s->drawLineTo(200, 100);
$s->drawCurveTo(200, 200, 100, 200);
$s->drawLineTo(100, 100);
?>