1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448
|
.\" Automatically generated by Pod::Man 2.16 (Pod::Simple 3.05)
.\"
.\" Standard preamble:
.\" ========================================================================
.de Sh \" Subsection heading
.br
.if t .Sp
.ne 5
.PP
\fB\\$1\fR
.PP
..
.de Sp \" Vertical space (when we can't use .PP)
.if t .sp .5v
.if n .sp
..
.de Vb \" Begin verbatim text
.ft CW
.nf
.ne \\$1
..
.de Ve \" End verbatim text
.ft R
.fi
..
.\" Set up some character translations and predefined strings. \*(-- will
.\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left
.\" double quote, and \*(R" will give a right double quote. \*(C+ will
.\" give a nicer C++. Capital omega is used to do unbreakable dashes and
.\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff,
.\" nothing in troff, for use with C<>.
.tr \(*W-
.ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p'
.ie n \{\
. ds -- \(*W-
. ds PI pi
. if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch
. if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch
. ds L" ""
. ds R" ""
. ds C` ""
. ds C' ""
'br\}
.el\{\
. ds -- \|\(em\|
. ds PI \(*p
. ds L" ``
. ds R" ''
'br\}
.\"
.\" Escape single quotes in literal strings from groff's Unicode transform.
.ie \n(.g .ds Aq \(aq
.el .ds Aq '
.\"
.\" If the F register is turned on, we'll generate index entries on stderr for
.\" titles (.TH), headers (.SH), subsections (.Sh), items (.Ip), and index
.\" entries marked with X<> in POD. Of course, you'll have to process the
.\" output yourself in some meaningful fashion.
.ie \nF \{\
. de IX
. tm Index:\\$1\t\\n%\t"\\$2"
..
. nr % 0
. rr F
.\}
.el \{\
. de IX
..
.\}
.\"
.\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2).
.\" Fear. Run. Save yourself. No user-serviceable parts.
. \" fudge factors for nroff and troff
.if n \{\
. ds #H 0
. ds #V .8m
. ds #F .3m
. ds #[ \f1
. ds #] \fP
.\}
.if t \{\
. ds #H ((1u-(\\\\n(.fu%2u))*.13m)
. ds #V .6m
. ds #F 0
. ds #[ \&
. ds #] \&
.\}
. \" simple accents for nroff and troff
.if n \{\
. ds ' \&
. ds ` \&
. ds ^ \&
. ds , \&
. ds ~ ~
. ds /
.\}
.if t \{\
. ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u"
. ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u'
. ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u'
. ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u'
. ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u'
. ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u'
.\}
. \" troff and (daisy-wheel) nroff accents
.ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V'
.ds 8 \h'\*(#H'\(*b\h'-\*(#H'
.ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#]
.ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H'
.ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u'
.ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#]
.ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#]
.ds ae a\h'-(\w'a'u*4/10)'e
.ds Ae A\h'-(\w'A'u*4/10)'E
. \" corrections for vroff
.if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u'
.if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u'
. \" for low resolution devices (crt and lpr)
.if \n(.H>23 .if \n(.V>19 \
\{\
. ds : e
. ds 8 ss
. ds o a
. ds d- d\h'-1'\(ga
. ds D- D\h'-1'\(hy
. ds th \o'bp'
. ds Th \o'LP'
. ds ae ae
. ds Ae AE
.\}
.rm #[ #] #H #V #F C
.\" ========================================================================
.\"
.IX Title "SWF::Shape 3"
.TH SWF::Shape 3 "2009-02-15" "perl v5.10.0" "User Contributed Perl Documentation"
.\" For nroff, turn off justification. Always turn off hyphenation; it makes
.\" way too many mistakes in technical documents.
.if n .ad l
.nh
.SH "NAME"
SWF::Shape \- Shape class
.SH "SYNOPSIS"
.IX Header "SYNOPSIS"
.Vb 3
\& use SWF::Shape;
\& $shape = new SWF::Shape();
\& $dispitem = $movie\->add($shape);
.Ve
.SH "DESCRIPTION"
.IX Header "DESCRIPTION"
SWF::Shape is the fundamental object of a flash movie.
.SH "METHODS"
.IX Header "METHODS"
.IP "new \fISWF::Shape()\fR" 4
.IX Item "new SWF::Shape()"
Creates a new Shape object.
.ie n .IP "$shape\fR\->movePenTo($x, \f(CW$y)" 4
.el .IP "\f(CW$shape\fR\->movePenTo($x, \f(CW$y\fR)" 4
.IX Item "$shape->movePenTo($x, $y)"
Move the Shape's (imaginary) pen location to ($x, \f(CW$y\fR) in the Shape's coordinate space.
.ie n .IP "$shape\fR\->movePen($dx, \f(CW$dy)" 4
.el .IP "\f(CW$shape\fR\->movePen($dx, \f(CW$dy\fR)" 4
.IX Item "$shape->movePen($dx, $dy)"
Add ($dx, \f(CW$dy\fR) to the Shape's pen current location.
.ie n .IP "$x\fR = \f(CW$shape\fR\->\fIgetPenX()" 4
.el .IP "\f(CW$x\fR = \f(CW$shape\fR\->\fIgetPenX()\fR" 4
.IX Item "$x = $shape->getPenX()"
Returns Pen's x\-coordinates
.ie n .IP "$y\fR = \f(CW$shape\fR\->\fIgetPenY()" 4
.el .IP "\f(CW$y\fR = \f(CW$shape\fR\->\fIgetPenY()\fR" 4
.IX Item "$y = $shape->getPenY()"
Returns Pen's y\-coordinates
.ie n .IP "($x, $y\fR) = \f(CW$shape\fR\->\fIgetPen()" 4
.el .IP "($x, \f(CW$y\fR) = \f(CW$shape\fR\->\fIgetPen()\fR" 4
.IX Item "($x, $y) = $shape->getPen()"
Returns Pen's (x,y) coordinates
.ie n .IP "$shape\fR\->drawLineTo($x, \f(CW$y)" 4
.el .IP "\f(CW$shape\fR\->drawLineTo($x, \f(CW$y\fR)" 4
.IX Item "$shape->drawLineTo($x, $y)"
Draw a line (using current line style, set by one of the setLine...() methods) from the current position to ($x, \f(CW$y\fR).
.ie n .IP "$shape\fR\->drawLine($dx, \f(CW$dy)" 4
.el .IP "\f(CW$shape\fR\->drawLine($dx, \f(CW$dy\fR)" 4
.IX Item "$shape->drawLine($dx, $dy)"
Draw a line (using current line style set by one of the setLine...() methods) from the current position to displacement ($dx, \f(CW$dy\fR).
.ie n .IP "$shape\fR\->drawCurveTo($controlx, \f(CW$controly\fR, \f(CW$anchorx\fR, \f(CW$anchory)" 4
.el .IP "\f(CW$shape\fR\->drawCurveTo($controlx, \f(CW$controly\fR, \f(CW$anchorx\fR, \f(CW$anchory\fR)" 4
.IX Item "$shape->drawCurveTo($controlx, $controly, $anchorx, $anchory)"
Draw a quadratic curve (using current line style, set by one of the setLine...() methods)
from current pen position to ($anchorx, \f(CW$anchory\fR) using control point ($controlx, \f(CW$controly\fR).
.ie n .IP "$shape\fR\->drawCurve($controldx, \f(CW$controly\fR, \f(CW$anchorx\fR, \f(CW$anchory)" 4
.el .IP "\f(CW$shape\fR\->drawCurve($controldx, \f(CW$controly\fR, \f(CW$anchorx\fR, \f(CW$anchory\fR)" 4
.IX Item "$shape->drawCurve($controldx, $controly, $anchorx, $anchory)"
Draw a quadratic curve (using current line style, set by one of the setLine...() methods)
from current pen position to displacement ($anchordx, \f(CW$anchordy\fR) using displacement control point ($controldx, \f(CW$controldy\fR).
.ie n .IP "$shape\->drawCubicTo($bx,$by,$cx,$cx,$dx,$dy)" 4
.el .IP "\f(CW$shape\fR\->drawCubicTo($bx,$by,$cx,$cx,$dx,$dy)" 4
.IX Item "$shape->drawCubicTo($bx,$by,$cx,$cx,$dx,$dy)"
.PD 0
.ie n .IP "$shape\->drawCubic($bx,$by,$cx,$cx,$dx,$dy)" 4
.el .IP "\f(CW$shape\fR\->drawCubic($bx,$by,$cx,$cx,$dx,$dy)" 4
.IX Item "$shape->drawCubic($bx,$by,$cx,$cx,$dx,$dy)"
.PD
Draw a cubic curve (using current line style).
[ToDo: Add some more details and demo code]
.ie n .IP "$shape\fR\->setLine($width, \f(CW$r\fR, \f(CW$g\fR, \f(CW$b [,$a])" 4
.el .IP "\f(CW$shape\fR\->setLine($width, \f(CW$r\fR, \f(CW$g\fR, \f(CW$b\fR [,$a])" 4
.IX Item "$shape->setLine($width, $r, $g, $b [,$a])"
Sets Shape's line width and color (\s-1RGB\s0). To remove the Shape's line style call \f(CW$shape\fR\->\fIhideLine()\fR.
The used line width for drawing is a product of \f(CW$width\fR argument and scale value set, see SWF::setScale($scale).
Arguments \f(CW$r\fR, \f(CW$g\fR, \f(CW$b\fR stand for red, green and blue color parts, optional \f(CW$a\fR for alpha value.
.ie n .IP "$shape\fR\->setLineStyle($width, \f(CW$r\fR, \f(CW$g\fR, \f(CW$b [,$a])" 4
.el .IP "\f(CW$shape\fR\->setLineStyle($width, \f(CW$r\fR, \f(CW$g\fR, \f(CW$b\fR [,$a])" 4
.IX Item "$shape->setLineStyle($width, $r, $g, $b [,$a])"
This \s-1OLD\s0 deprecated method is documented here only for compatibility reason.
The line width \-in \s-1TWIPS\s0 units\- is independent of Ming scale value (more bug than feature).
.ie n .IP "$shape\fR\->setLine2($width, \f(CW$r\fR, \f(CW$g\fR, \f(CW$b\fR ,$a, \f(CW$flags\fR, \f(CW$miterLimit)" 4
.el .IP "\f(CW$shape\fR\->setLine2($width, \f(CW$r\fR, \f(CW$g\fR, \f(CW$b\fR ,$a, \f(CW$flags\fR, \f(CW$miterLimit\fR)" 4
.IX Item "$shape->setLine2($width, $r, $g, $b ,$a, $flags, $miterLimit)"
A new method available for \s-1SWF\s0 version >=8 setting shape's line width and color (\s-1RGBA\s0) with additional
control flags (see below) and miter limit. To remove the Shape's line style call \f(CW$shape\fR\->\fIhideLine()\fR.
The used line width for drawing is a product of \f(CW$width\fR argument and scale value set, see SWF::setScale($scale).
Arguments \f(CW$r\fR, \f(CW$g\fR, \f(CW$b\fR, \f(CW$a\fR stand for red, green, blue and alpha color parts. \f(CW$a\fR is not optional here.
.Sp
Available flags are:
Line cap style: select one of the following flags (default is round cap style)
.Sp
.Vb 3
\& SWF_LINESTYLE_CAP_ROUND
\& SWF_LINESTYLE_CAP_NONE
\& SWF_LINESTYLE_CAP_SQUARE
.Ve
.Sp
Line join style: select one of the following flags (default is round join style)
.Sp
.Vb 3
\& SWF_LINESTYLE_JOIN_ROUND
\& SWF_LINESTYLE_JOIN_BEVEL
\& SWF_LINESTYLE_JOIN_MITER
.Ve
.Sp
Scaling flags: disable horizontal / vertical scaling
.Sp
.Vb 2
\& SWF_LINESTYLE_FLAG_NOHSCALE
\& SWF_LINESTYLE_FLAG_NOVSCALE
.Ve
.Sp
Enable pixel hinting to correct blurry vertical / horizontal lines: all anchors will be aligned to full pixels
.Sp
.Vb 1
\& SWF_LINESTYLE_FLAG_HINTING
.Ve
.Sp
Disable stroke closure: if no-close flag is set caps will be applied instead of joins.
.Sp
.Vb 1
\& SWF_LINESTYLE_FLAG_NOCLOSE
.Ve
.Sp
End-cap style: default round
.Sp
.Vb 3
\& SWF_LINESTYLE_FLAG_ENDCAP_ROUND
\& SWF_LINESTYLE_FLAG_ENDCAP_NONE
\& SWF_LINESTYLE_FLAG_ENDCAP_SQUARE
.Ve
.Sp
If join style is \s-1SWF_LINESTYLE_JOIN_MITER\s0 a miter limit factor must be set. Miter max length is then calculated as:
max miter len = miter limit * width. If join style is not miter, this value will be ignored.
.ie n .IP "$shape\fR\->setLineStyle2($width, \f(CW$r\fR, \f(CW$g\fR, \f(CW$b\fR ,$a, \f(CW$flags\fR, \f(CW$miterLimit)" 4
.el .IP "\f(CW$shape\fR\->setLineStyle2($width, \f(CW$r\fR, \f(CW$g\fR, \f(CW$b\fR ,$a, \f(CW$flags\fR, \f(CW$miterLimit\fR)" 4
.IX Item "$shape->setLineStyle2($width, $r, $g, $b ,$a, $flags, $miterLimit)"
This \s-1OLD\s0 deprecated method is mentioned here only for compatibility reason, you'd better use \fIsetLine2()\fR.
.ie n .IP "$shape\fR\->setLine2Filled($width, \f(CW$fill\fR, \f(CW$flags\fR, \f(CW$miterLimit)" 4
.el .IP "\f(CW$shape\fR\->setLine2Filled($width, \f(CW$fill\fR, \f(CW$flags\fR, \f(CW$miterLimit\fR)" 4
.IX Item "$shape->setLine2Filled($width, $fill, $flags, $miterLimit)"
A new method available for \s-1SWF\s0 version >=8 setting shape's line width and fill style, \f(CW$fill\fR is an object
of SWF::Fill class. For other argument details see item \f(CW$shape\fR\->\fIsetLine2()\fR.
.ie n .IP "$shape\fR\->setLine2StyleFilled($width, \f(CW$fill\fR, \f(CW$flags\fR, \f(CW$miterLimit)" 4
.el .IP "\f(CW$shape\fR\->setLine2StyleFilled($width, \f(CW$fill\fR, \f(CW$flags\fR, \f(CW$miterLimit\fR)" 4
.IX Item "$shape->setLine2StyleFilled($width, $fill, $flags, $miterLimit)"
This \s-1OLD\s0 deprecated method is mentioned here only for compatibility reason, you'd better use \fIsetLine2Filled()\fR.
.ie n .IP "$shape\fR\->\fIhideLine()" 4
.el .IP "\f(CW$shape\fR\->\fIhideLine()\fR" 4
.IX Item "$shape->hideLine()"
Remove the Shape's line, i.e. make lines painted after this method call invisible.
.ie n .IP "$fill\fR = \f(CW$shape\fR\->addSolidFill($r, \f(CW$g\fR, \f(CW$b [,$a])" 4
.el .IP "\f(CW$fill\fR = \f(CW$shape\fR\->addSolidFill($r, \f(CW$g\fR, \f(CW$b\fR [,$a])" 4
.IX Item "$fill = $shape->addSolidFill($r, $g, $b [,$a])"
.PD 0
.ie n .IP "$fill\fR = \f(CW$shape\fR\->addFill($r, \f(CW$g\fR, \f(CW$b [,$a])" 4
.el .IP "\f(CW$fill\fR = \f(CW$shape\fR\->addFill($r, \f(CW$g\fR, \f(CW$b\fR [,$a])" 4
.IX Item "$fill = $shape->addFill($r, $g, $b [,$a])"
.PD
Adds a solid fill to \f(CW$shape\fR list of fill styles and returns an SWF::Fill object. This object is used with the \*(L"\fIsetLine()\fR\*(R" method described below. The default value of \f(CW$a\fR is 0.
.ie n .IP "$fill\fR = \f(CW$shape\->addBitmapFill($bitmap [,FLAG])" 4
.el .IP "\f(CW$fill\fR = \f(CW$shape\fR\->addBitmapFill($bitmap [,FLAG])" 4
.IX Item "$fill = $shape->addBitmapFill($bitmap [,FLAG])"
.PD 0
.ie n .IP "$fill\fR = \f(CW$shape\->addFill($bitmap [,FLAG])" 4
.el .IP "\f(CW$fill\fR = \f(CW$shape\fR\->addFill($bitmap [,FLAG])" 4
.IX Item "$fill = $shape->addFill($bitmap [,FLAG])"
.PD
Adds a bitmap fill to \f(CW$shape\fR list of fill styles and returns an SWF::Fill object. This object is used with the \*(L"\fIsetLine()\fR\*(R" method described below.
.Sp
\&\f(CW$bitmap\fR is an SWF::Bitmap object while \s-1FLAG\s0 argument can be \s-1SWFFILL_TILED_BITMAP\s0 or \s-1SWFFILL_CLIPPED_BITMAP\s0. Make sure to import these constants to your package before useing it, i.e. use the following statement:
.Sp
.Vb 1
\& use SWF::Fill <list of constants>;
.Ve
.Sp
The default value of \s-1FLAG\s0 is \s-1SWFFILL_TILED_BITMAP\s0.
.ie n .IP "$fill\fR = \f(CW$shape\->addGradientFill($gradient [,FLAG])" 4
.el .IP "\f(CW$fill\fR = \f(CW$shape\fR\->addGradientFill($gradient [,FLAG])" 4
.IX Item "$fill = $shape->addGradientFill($gradient [,FLAG])"
.PD 0
.ie n .IP "$fill\fR = \f(CW$shape\->addFill($gradient [,FLAG])" 4
.el .IP "\f(CW$fill\fR = \f(CW$shape\fR\->addFill($gradient [,FLAG])" 4
.IX Item "$fill = $shape->addFill($gradient [,FLAG])"
.PD
Adds a gradient fill to \f(CW$shape\fR list of fill styles and returns an SWF::Fill object. This object is used with the \*(L"\fIsetLine()\fR\*(R" method described below.
.Sp
\&\f(CW$gradient\fR is an SWF::Gradient object while \s-1FLAG\s0 argument can be \s-1SWFFILL_LINEAR_GRADIENT\s0 or \s-1SWFFILL_RADIAL_GRADIENT\s0, plus \s-1SWFFILL_FOCAL_GRADIENT\s0 for V8.
Make sure to import these constants to your package before useing it, i.e. use the following statement:
.Sp
.Vb 1
\& use SWF::Fill <list of constants>;
.Ve
.Sp
The default value of \s-1FLAG\s0 is \s-1SWFFILL_LINEAR_GRADIENT\s0.
.ie n .IP "$shape\->xs_setLeftFill($fill)" 4
.el .IP "\f(CW$shape\fR\->xs_setLeftFill($fill)" 4
.IX Item "$shape->xs_setLeftFill($fill)"
.PD 0
.ie n .IP "$shape\->setLeftFill($fill)" 4
.el .IP "\f(CW$shape\fR\->setLeftFill($fill)" 4
.IX Item "$shape->setLeftFill($fill)"
.PD
Sets the fill on the left side of the edge. \f(CW$fill\fR is an SWF::Fill object returned from \*(L"addFill\*(R" method.
.ie n .IP "$shape\fR\->setLeftFill($r, \f(CW$g\fR, \f(CW$b [,$a])" 4
.el .IP "\f(CW$shape\fR\->setLeftFill($r, \f(CW$g\fR, \f(CW$b\fR [,$a])" 4
.IX Item "$shape->setLeftFill($r, $g, $b [,$a])"
This is another way of saying:
.Sp
.Vb 2
\& my $fill = $shape\->addSolidFill($r, $g, $b [,$a]);
\& $shape\->setLeftFill($fill);
.Ve
.ie n .IP "$shape\->xs_setRightFill($fill)" 4
.el .IP "\f(CW$shape\fR\->xs_setRightFill($fill)" 4
.IX Item "$shape->xs_setRightFill($fill)"
.PD 0
.ie n .IP "$shape\->setRightFill($fill)" 4
.el .IP "\f(CW$shape\fR\->setRightFill($fill)" 4
.IX Item "$shape->setRightFill($fill)"
.PD
Sets the fill on the right side of the edge. \f(CW$fill\fR is an SWF::Fill object returned from \*(L"addFill\*(R" method.
.ie n .IP "$shape\fR\->setRightFill($r, \f(CW$g\fR, \f(CW$b [,$a])" 4
.el .IP "\f(CW$shape\fR\->setRightFill($r, \f(CW$g\fR, \f(CW$b\fR [,$a])" 4
.IX Item "$shape->setRightFill($r, $g, $b [,$a])"
This is another way of saying:
.Sp
.Vb 2
\& my $fill = $shape\->addSolidFill($r, $g, $b [,$a]);
\& $shape\->setRightFill($fill);
.Ve
.ie n .IP "$shape\->drawCircle($r)" 4
.el .IP "\f(CW$shape\fR\->drawCircle($r)" 4
.IX Item "$shape->drawCircle($r)"
Draws a circle with radious \f(CW$r\fR, also changes current position.
.ie n .IP "$shape\fR\->drawArc($r, \f(CW$startAngle\fR, \f(CW$endAngle)" 4
.el .IP "\f(CW$shape\fR\->drawArc($r, \f(CW$startAngle\fR, \f(CW$endAngle\fR)" 4
.IX Item "$shape->drawArc($r, $startAngle, $endAngle)"
Draws an arc with radious \f(CW$r\fR form start to end.
.ie n .IP "$shape\->useVersion(version)" 4
.el .IP "\f(CW$shape\fR\->useVersion(version)" 4
.IX Item "$shape->useVersion(version)"
This function allows to set the shapes version information. The version is only
a hint. If necessary the version is upgraded. Valid values: are 3 and 4.
Value of 3 is default, but 4 if linestyle2 is used.
Some shape features are available only for shape version 4 and
\&\s-1SWF\s0 file version>=8. One example is the usage of focal gradients:
.Sp
.Vb 6
\& $g = new SWF::Gradient();
\& $g\->setFocalPoint(\-0.9);
\& $g\->addEntry(0.000000,0xff,0x00,0x00,0xff);
\& $g\->addEntry(1.000000,0x00,0xff,0x00,0xff);
\& $shape\->useVersion(4);
\& $shape\->addGradientFill($g,SWFFILL_FOCAL_GRADIENT);
.Ve
.ie n .IP "$version\fR = \f(CW$shape\fR\->\fIgetVersion()" 4
.el .IP "\f(CW$version\fR = \f(CW$shape\fR\->\fIgetVersion()\fR" 4
.IX Item "$version = $shape->getVersion()"
Gets the current shape object version.
.ie n .IP "$shape\fR\->\fIdumpOutline()" 4
.el .IP "\f(CW$shape\fR\->\fIdumpOutline()\fR" 4
.IX Item "$shape->dumpOutline()"
Returns a string describing shape's outline. After drawing in a shape
expect getting a multi-line string like:
.Sp
.Vb 4
\& moveto 368,5
\& curveto 348,5 327,1
\& curveto 307,\-3 284,\-15
\&etc. etc.
.Ve
.ie n .IP "$shape\fR\->\fIend()" 4
.el .IP "\f(CW$shape\fR\->\fIend()\fR" 4
.IX Item "$shape->end()"
Stops drawing on this shape and make the shape complete.
Further method calls won't produce any lines, circles etc.
By using this demo code later no circle is painted:
.Sp
.Vb 3
\& $shape\->drawLineTo(300,300);
\& $shape\->end();
\& $shape\->drawCircle(200);
.Ve
.ie n .IP "$shape\fR\->drawGlyph($font, \f(CW$cnumber\fR [, \f(CW$size])" 4
.el .IP "\f(CW$shape\fR\->drawGlyph($font, \f(CW$cnumber\fR [, \f(CW$size\fR])" 4
.IX Item "$shape->drawGlyph($font, $cnumber [, $size])"
Draws character of \f(CW$cnumber\fR of \f(CW$font\fR. Also Unicode fonts are possible, if the font does provide that, just like next example:
.Sp
.Vb 2
\& $font=new SWF::Font("Thai\-Bold.fdb");
\& $sh\->drawGlyph($font, 0x0E44, 44);
.Ve
.ie n .IP "$shape\->drawCharacterBounds($character)" 4
.el .IP "\f(CW$shape\fR\->drawCharacterBounds($character)" 4
.IX Item "$shape->drawCharacterBounds($character)"
Draws an outer rectangle fitting for \f(CW$character\fR, an object of SWF::Character.
.ie n .IP "$shape\->setRenderHintingFlags(flags)" 4
.el .IP "\f(CW$shape\fR\->setRenderHintingFlags(flags)" 4
.IX Item "$shape->setRenderHintingFlags(flags)"
Set render hinting flags. Possible values are
SWF::Constants::SWF_SHAPE_USESCALINGSTROKES and
SWF::Constants::SWF_SHAPE_USENONSCALINGSTROKES
.Sp
This method also will set version of this SWF::Shape object to 4.
.SH "AUTHOR"
.IX Header "AUTHOR"
Soheil Seyfaie (soheil at users.sourceforge.net), Albrecht Kleine
.SH "SEE ALSO"
.IX Header "SEE ALSO"
\&\s-1SWF\s0, SWF::Bitmap, SWF::Button, SWF::Constants, SWF::DisplayItem,
SWF::Fill, SWF::Font, SWF::Gradient, SWF::Morph, SWF::Movie, SWF::MovieClip,
SWF::TextField, SWF::Text, SWF::Character
|