SWFShape->setLine

(no version information, might be only in CVS)

SWFShape->setLine -- Sets the shape's line style

Description

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

Ostrzeżenie

Ta funkcja jest w stadium EKSPERYMENTALNYM. Oznacza to, że zachowanie funkcji, jej nazwa, w zasadzie wszystko udokumentowane tutaj może zostać zmienione w przyszłych wersjach PHP bez wcześniejszego uprzedzenia. Używaj tej funkcji na własne ryzyko.

swfshape->setline() sets the shape's line style. width is the line's width. If width is 0, the line's style is removed (then, all other arguments are ignored). If width > 0, then line's color is set to red, green, blue. Last parameter a is optional.

swfshape->setline() accepts 1, 4 or 5 arguments (not 3 or 2).

You must declare all line styles before you use them (see example).

This simple example will draw a big "!#%*@", in funny colors and gracious style.

Przykład 1. swfshape->setline() example

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

  
// bug: have to declare all line styles before you use them
  
$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);
  
$i->moveTo(1500-$f->getWidth("!#%*@")/2, 1000+$f->getAscent()/2);

  
header('Content-type: application/x-shockwave-flash');
  
$m->output();
?>



Język PHP to dzisiaj powszechnie przyjęty standard, podstawa tworzenia dynamicznych stron WWW, opartych na bazach danych.

PHP to język skryptowy. Znaczy to, że jest to język nie kompilowalny. Program jest wykonywany przez interpreter na podstawie jego kodu źródłowego. Język PHP to element technologii internetowej SERVER-SIDE. Znaczy to, że kod języka jest wykonywany od strony serwera (na serwerze).

W jakim celu używac PHP? Po co to komu?

Załóżmy, że potrzebujemy takiej strony internetowej, która wyświetli zawsze bieżącą datę. Dzięki technologii PHP, datę i godzinę odczytywać można z miejsca gdzie wykonuje się skrypt, np. gdy serwer znajduje się w USA a my w Polsce to widoczna jest różnica w czasie który zostanie wyświetlony.

epilacja wrocław quad ceny domeny Nerwica natręctw brokat polskawiza do rosji, wizy do rosji gdańsk, meble do salonu