SWFShape->setLeftFill
<<<
SWFShape->setLine SWFShape->setRightFill
>>>

6.21 Ming pour Flash
6 Référence des fonctions
 Manuel PHP

Introduction
Pré-requis
Installation
Configuration à l'exécution
Types de ressources
Constantes pré-définies
Classes pré-définies
ming_keypress
ming_setcubicthreshold
ming_setscale
ming_useConstants
ming_useswfversion
SWFAction
SWFBitmap->getHeight
SWFBitmap->getWidth
SWFBitmap
SWFbutton->addAction
SWFButton::addASound
SWFbutton->addShape
SWFbutton->setAction
SWFbutton->setdown
SWFbutton->setHit
SWFButton::setMenu
SWFbutton->setOver
SWFbutton->setUp
SWFbutton
SWFDisplayItem::addAction
SWFDisplayItem->addColor
SWFDisplayItem::endMask
SWFDisplayItem::getRot
SWFDisplayItem::getX
SWFDisplayItem::getXScale
SWFDisplayItem::getXSkew
SWFDisplayItem::getY
SWFDisplayItem::getYScale
SWFDisplayItem::getYSkew
SWFDisplayItem->move
SWFDisplayItem->moveTo
SWFDisplayItem->multColor
SWFDisplayItem->remove
SWFDisplayItem->Rotate
SWFDisplayItem->rotateTo
SWFDisplayItem->scale
SWFDisplayItem->scaleTo
SWFDisplayItem->setDepth
SWFDisplayItem::setMaskLevel
SWFDisplayItem::setMatrix
SWFDisplayItem->setName
SWFDisplayItem->setRatio
SWFDisplayItem->skewX
SWFDisplayItem->skewXTo
SWFDisplayItem->skewY
SWFDisplayItem->skewYTo
SWFFill->moveTo
SWFFill->rotateTo
SWFFill->scaleTo
SWFFill->skewXTo
SWFFill->skewYTo
SWFFill
SWFFont::getAscent
SWFFont::getDescent
SWFFont::getLeading
SWFFont::getShape
SWFFont::getUTF8Width
swffont->getwidth
SWFFont
SWFFontChar::addChars
SWFFontChar::addUTF8Chars
SWFGradient->addEntry
SWFGradient
SWFMorph->getshape1
SWFMorph->getshape2
SWFMorph
SWFMovie->add
SWFMovie::addExport
SWFMovie::addFont
SWFMovie::importChar
SWFMovie::importFont
SWFMovie::labelFrame
SWFMovie->nextframe
SWFMovie->output
swfmovie->remove
SWFMovie->save
SWFMovie::saveToFile
SWFMovie->setbackground
SWFMovie->setdimension
SWFMovie->setframes
SWFMovie->setrate
SWFMovie::startSound
SWFMovie::stopSound
SWFMovie->streammp3
SWFMovie::writeExports
SWFMovie
SWFPrebuiltClip
SWFShape->addFill
SWFShape::drawArc
SWFShape::drawCircle
SWFShape::drawCubic
SWFShape::drawCubicTo
SWFShape->drawCurve
SWFShape->drawCurveTo
SWFShape::drawGlyph
SWFShape->drawLine
SWFShape->drawLineTo
SWFShape->movePen
SWFShape->movePenTo
SWFShape->setLeftFill
->SWFShape->setLine
SWFShape->setRightFill
SWFShape
SWFSound
SWFSoundInstance::loopCount
SWFSoundInstance::loopInPoint
SWFSoundInstance::loopOutPoint
SWFSoundInstance::noMultiple
swfsprite->add
SWFSprite::labelFrame
SWFSprite->nextframe
SWFSprite->remove
SWFSprite->setframes
SWFSprite::startSound
SWFSprite::stopSound
SWFSprite
SWFText->addString
SWFText::addUTF8String
SWFText::getAscent
SWFText::getDescent
SWFText::getLeading
SWFText::getUTF8Width
SWFText->getWidth
SWFText->moveTo
SWFText->setColor
SWFText->setFont
SWFText->setHeight
SWFText->setSpacing
SWFText
SWFTextField::addChars
SWFTextField->addstring
SWFTextField->align
SWFTextField->setbounds
SWFTextField->setcolor
SWFTextField->setFont
SWFTextField->setHeight
SWFTextField->setindentation
SWFTextField->setLeftMargin
SWFTextField->setLineSpacing
SWFTextField->setMargins
SWFTextField->setname
SWFTextField::setPadding
SWFTextField->setrightMargin
SWFTextField
SWFVideoStream::getNumFrames
SWFVideoStream::setDimension
SWFVideoStream

6.21.108 SWFShape->setLine()Modifie le style de ligne de la forme

[ Exemples avec swfshape.setline ]   CVS uniquement

void  swfshape->setline ( swfshape   shape )
Attention

Cette fonction est EXPERIMENTALE . Cela signifie que le comportement de cette fonction, son nom et concrètement, TOUT ce qui est documenté ici peut changer dans un futur proche, SANS PREAVIS! Soyez-en conscient, et utilisez cette fonction à vos risques et périls.

void  swfshape->setline ( int   width , int   red , int   green , int   blue , int   a )
Attention

Cette fonction est EXPERIMENTALE . Cela signifie que le comportement de cette fonction, son nom et concrètement, TOUT ce qui est documenté ici peut changer dans un futur proche, SANS PREAVIS! Soyez-en conscient, et utilisez cette fonction à vos risques et périls.

SWFShape->setLine modifie le style de ligne de la forme. width est la largeur de la ligne. Si width vaut 0, le style est supprimé (et tous les autres arguments sont ignorés). Si width > 0, alors la couleur de la ligne devient ( red , green , blue ). Les couleurs sont représentées en RGB. Le dernier paramètre a est optionnel.

Vous devez déclarer un style avant de l'utiliser (voir exemple).

Cet exemple enfantin dessine une chaîne "!#%*@", dans des couleurs marrantes et un style rigolo.
Exemple SWFShape->setLine

<?php
$s
= new SWFShape();
$f1 = $s->addFill(0xff, 0, 0);
$f2 = $s->addFill(0xff, 0x7f, 0);
$f3 = $s->addFill(0xff, 0xff, 0);
$f4 = $s->addFill(0, 0xff, 0);
$f5 = $s->addFill(0, 0, 0xff);
// erreur : il faut déclarer tous les styles avant
// de les utiliser.
$s->setLine(40, 0x7f, 0, 0);
$s->setLine(40, 0x7f, 0x3f, 0);
$s->setLine(40, 0x7f, 0x7f, 0);
$s->setLine(40, 0, 0x7f, 0);
$s->setLine(40, 0, 0, 0x7f);
$f = new SWFFont('Techno.fdb');
$s->setRightFill($f1);
$s->setLine(40, 0x7f, 0, 0);
$s->drawGlyph($f, '!');
$s->movePen($f->getWidth('!'), 0);
$s->setRightFill($f2);
$s->setLine(40, 0x7f, 0x3f, 0);
$s->drawGlyph($f, '#');
$s->movePen($f->getWidth('#'), 0);
$s->setRightFill($f3);
$s->setLine(40, 0x7f, 0x7f, 0);
$s->drawGlyph($f, '%');
$s->movePen($f->getWidth('%'), 0);
$s->setRightFill($f4);
$s->setLine(40, 0, 0x7f, 0);
$s->drawGlyph($f, '*');
$s->movePen($f->getWidth('*'), 0);
$s->setRightFill($f5);
$s->setLine(40, 0, 0, 0x7f);
$s->drawGlyph($f, '@');
$m = new SWFMovie();
$m->setDimension(3000,2000);
$m->setRate(12.0);
$i = $m->add($s);

// note la chaîne est ici!!!
$i->moveTo(1500-$f->getWidth("!#%*@")/2, 1000+$f->getAscent()/2);
header('Content-type: application/x-shockwave-flash');
$m->output();
?>

<< SWFShape->setLine >>
SWFShape->setLeftFill Ming pour Flash SWFShape->setRightFill