/manual/www.php.ru/manual/function.imagefilledpolygon.html
HTML | 469 lines | 289 code | 124 blank | 56 comment | 0 complexity | 69cd1bdcb52db36b88a217f44382733e MD5 | raw file
- <!--
- HTML dropped by Zend Guard Compressor 4.2
- php.ru team: mz, az, yuri, vb, cyxapuk, 440hz, administrator
- 2004-2007 (c) expi-web.com
- 2007-2008 (c) odware.com
- 0101-1010 (с) 440hz
- 2b|~2b=?
- -->
- <!-- EHOT тут всё пожрал ! -->
- <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
- <html>
- <head>
- <link rel="alternate" type="application/rss+xml" title="php.ru/forum - последние сообщения" href="http://www.php.ru/forum/rss.php">
- <link rel="SHORTCUT ICON" href="http://www.php.ru/favicon.ico" />
- <META name="description" content="php.ru - форум PHP программистов, поиск по всем ресурсам сети, посвященным php">
- <meta http-equiv="description" content="php.ru - форум PHP программистов, поиск по всем ресурсам сети, посвященным php">
- <META name="keywords" content="php, php5, apache, mysql, session">
- <meta http-equiv="keywords" content="php, php5, apache, mysql, session">
- <title>php.ru - imagefilledpolygon</title>
- <LINK REL="stylesheet" TYPE="text/css" HREF="http://www.php.ru/index.css">
- <script language="JavaScript" src="http://www.php.ru/ajax/ajax.js"></script>
- </head>
- <body>
- <table height='100%' width='100%' cellspacing='0' cellpadding='0'>
- <tr height='99%' valign='top'>
- <td align='center'>
-
- <table style='margin-top: 4px' width=100% cellspacing=0 cellpadding=3>
- <tr>
- <td>PHP - <a href="http://ru.wikipedia.org/wiki/%D0%A0%D0%B5%D0%BA%D1%83%D1%80%D1%81%D0%B8%D0%B2%D0%BD%D1%8B%D0%B9_%D0%B0%D0%BA%D1%80%D0%BE%D0%BD%D0%B8%D0%BC" target=_blank class=lnk>рекурсивный акроним</a> словосочетания «<a href="/manual/introduction.html" class=lnk>PHP: Hypertext Preprocessor</a>»</td>
- </tr>
- </table>
- <script language="JavaScript" src="http://www.php.ru/ajax/subsys_ajax.js"></script>
- <!--
- commet by 440hz
- 20.10.2007
- <script language="JavaScript" src="http://www.php.ru/ajax/pu_search.js"></script>
- -->
- <script language="JavaScript" src="http://www.php.ru/ajax/cz.js?a=b"></script>
- <table style='margin-top: 5px' width=100% bgcolor=#9999cc cellspacing=0 cellpadding=0 border=0>
- <form name=SEARCH method=GET action="http://www.php.ru/search/?SID=a4lny3bv0dmxba0q" onsubmit="return puSubmit();">
- <input type=hidden name=PAGE value=1>
- <tr>
- <td width='1' valign='middle'>
- <a href='/'><img src="http://www.php.ru/;-)/logo.gif" width=133 height=93 alt="php" border=0 hspace=10 vspace=0></a>
- </td>
- <td width='100%' valign='middle'>
- <!--
-
- commet by 440hz
- 20.10.2007
- <div id='pu_search' class='pu_search'></div>
- <div id='pu_search_description' class='pu_search_decription'></div>
-
- -->
- <input type=text style='width:99%; margin: 10px' maxlength='200' name='QS' class='in' id='query' autocomplete='off' value="" />
- </td>
- </tr>
- <tr bgcolor='#666699' valign='middle'>
- <td style='border-top: 1px solid #333366;'><br /></td>
- <td style='border-top: 1px solid #333366;'><div style="padding: 4px 4px 4px 10px; height: 24px; color: #CCCCFF;" id="stat">Хто там?<script>doLoadCZ('stat','stat');</script></div></td>
- </tr>
- </form>
- </table>
- <table id="menu" cellspaciong=0 cellpadding=3>
- <tr>
- <td><a href="/" class=current>Главная</a></td>
- <td><a href="/download/" class=current>Скачать</a></td>
- <td><a href="/doc/" class=current>Документация</a></td>
- <td><a href="/forum/" class=current>Форум</a></td>
- <td width=100% align=right><a href="/phpinfo.html" class=current>phpinfo()</a></td>
- </tr>
- </table>
-
- <!-- AdRiver code START. Type:728x90 Site: php.ru PZ: 0 BN: 1 -->
- <script language="javascript" type="text/javascript"><!--
- var RndNum4NoCash = Math.round(Math.random() * 1000000000);
- var ar_Tail='unknown'; if (document.referrer) ar_Tail = escape(document.referrer);
- document.write(
- '<iframe src="http://ad.adriver.ru/cgi-bin/erle.cgi?'
- + 'sid=148680&bn=1&target=blank&bt=36&pz=0&rnd=' + RndNum4NoCash + '&tail256=' + ar_Tail
- + '" frameborder=0 vspace=0 hspace=0 width=728 height=90 marginwidth=0'
- + ' marginheight=0 scrolling=no></iframe>');
- //--></script>
- <noscript>
- <a href="http://ad.adriver.ru/cgi-bin/click.cgi?sid=148680&bn=1&bt=36&pz=0&rnd=1525626915" target=_blank>
- <img src="http://ad.adriver.ru/cgi-bin/rle.cgi?sid=148680&bn=1&bt=36&pz=0&rnd=1525626915" alt="-AdRiver-" border=0 width=728 height=90></a>
- </noscript>
- <!-- AdRiver code END -->
- <table width='100%' cellspacing='0' cellpadding='0'>
- <tr valign='top'>
- <td width=100%><div style="margin: 10px 10px 10px 50px;"><center><div style="width: 800px; text-align: left"><DIV
- CLASS="NAVHEADER"
- ><TABLE
- SUMMARY="Header navigation table"
- WIDTH="100%"
- BORDER="0"
- CELLPADDING="0"
- CELLSPACING="0"
- ><TR
- ><TH
- COLSPAN="3"
- ALIGN="center"
- >Руководство по PHP</TH
- ></TR
- ><TR
- ><TD
- WIDTH="10%"
- ALIGN="left"
- VALIGN="bottom"
- ><A
- HREF="function.imagefilledellipse.html"
- ACCESSKEY="P"
- >Пред.</A
- ></TD
- ><TD
- WIDTH="80%"
- ALIGN="center"
- VALIGN="bottom"
- ></TD
- ><TD
- WIDTH="10%"
- ALIGN="right"
- VALIGN="bottom"
- ><A
- HREF="function.imagefilledrectangle.html"
- ACCESSKEY="N"
- >След.</A
- ></TD
- ></TR
- ></TABLE
- ><HR
- ALIGN="LEFT"
- WIDTH="100%"></DIV
- ><H1
- ><A
- NAME="function.imagefilledpolygon"
- ></A
- >imagefilledpolygon</H1
- ><DIV
- CLASS="refnamediv"
- ><A
- NAME="AEN68024"
- ></A
- ><P
- > (PHP 3, PHP 4, PHP 5)</P
- >imagefilledpolygon -- Draw a filled polygon</DIV
- ><DIV
- CLASS="refsect1"
- ><A
- NAME="AEN68027"
- ></A
- ><H2
- >Description</H2
- >bool <B
- CLASS="methodname"
- >imagefilledpolygon</B
- > ( resource image, array points, int num_points, int color )<BR
- ></BR
- ><P
- > <B
- CLASS="function"
- >imagefilledpolygon()</B
- > creates a filled polygon
- in image <VAR
- CLASS="parameter"
- >image</VAR
- >.
- </P
- ><P
- > <VAR
- CLASS="parameter"
- >points</VAR
- > is an array containing the
- <VAR
- CLASS="literal"
- >x</VAR
- > and <VAR
- CLASS="literal"
- >y</VAR
- > co-ordinates
- of the polygons vertices consecutively.
- </P
- ><P
- > The parameter <VAR
- CLASS="parameter"
- >num_points</VAR
- > is the total
- number of vertices, which must be larger than 3.
- </P
- ><P
- > <TABLE
- WIDTH="100%"
- BORDER="0"
- CELLPADDING="0"
- CELLSPACING="0"
- CLASS="EXAMPLE"
- ><TR
- ><TD
- ><DIV
- CLASS="example"
- ><A
- NAME="AEN68054"
- ></A
- ><P
- ><B
- >Пример 1. <B
- CLASS="function"
- >imagefilledpolygon()</B
- > example</B
- ></P
- ><TABLE
- BORDER="0"
- BGCOLOR="#E0E0E0"
- CELLPADDING="5"
- ><TR
- ><TD
- ><code><font color="#000000">
- <font color="#0000BB"><?php<br /></font><font color="#FF8000">// set up array of points for polygon<br /></font><font color="#0000BB">$values </font><font color="#007700">= array(<br /> </font><font color="#0000BB">40</font><font color="#007700">, </font><font color="#0000BB">50</font><font color="#007700">, </font><font color="#FF8000">// Point 1 (x, y)<br /> </font><font color="#0000BB">20</font><font color="#007700">, </font><font color="#0000BB">240</font><font color="#007700">, </font><font color="#FF8000">// Point 2 (x, y)<br /> </font><font color="#0000BB">60</font><font color="#007700">, </font><font color="#0000BB">60</font><font color="#007700">, </font><font color="#FF8000">// Point 3 (x, y)<br /> </font><font color="#0000BB">240</font><font color="#007700">, </font><font color="#0000BB">20</font><font color="#007700">, </font><font color="#FF8000">// Point 4 (x, y)<br /> </font><font color="#0000BB">50</font><font color="#007700">, </font><font color="#0000BB">40</font><font color="#007700">, </font><font color="#FF8000">// Point 5 (x, y)<br /> </font><font color="#0000BB">10</font><font color="#007700">, </font><font color="#0000BB">10 </font><font color="#FF8000">// Point 6 (x, y)<br /> </font><font color="#007700">);<br /><br /></font><font color="#FF8000">// create image<br /></font><font color="#0000BB">$image </font><font color="#007700">= </font><font color="#0000BB">imagecreatetruecolor</font><font color="#007700">(</font><font color="#0000BB">250</font><font color="#007700">, </font><font color="#0000BB">250</font><font color="#007700">);<br /><br /></font><font color="#FF8000">// some colors<br /></font><font color="#0000BB">$bg </font><font color="#007700">= </font><font color="#0000BB">imagecolorallocate</font><font color="#007700">(</font><font color="#0000BB">$image</font><font color="#007700">, </font><font color="#0000BB">200</font><font color="#007700">, </font><font color="#0000BB">200</font><font color="#007700">, </font><font color="#0000BB">200</font><font color="#007700">);<br /></font><font color="#0000BB">$blue </font><font color="#007700">= </font><font color="#0000BB">imagecolorallocate</font><font color="#007700">(</font><font color="#0000BB">$image</font><font color="#007700">, </font><font color="#0000BB">0</font><font color="#007700">, </font><font color="#0000BB">0</font><font color="#007700">, </font><font color="#0000BB">255</font><font color="#007700">);<br /><br /></font><font color="#FF8000">// draw a polygon<br /></font><font color="#0000BB">imagefilledpolygon</font><font color="#007700">(</font><font color="#0000BB">$image</font><font color="#007700">, </font><font color="#0000BB">$values</font><font color="#007700">, </font><font color="#0000BB">6</font><font color="#007700">, </font><font color="#0000BB">$blue</font><font color="#007700">);<br /><br /></font><font color="#FF8000">// flush image<br /></font><font color="#0000BB">header</font><font color="#007700">(</font><font color="#DD0000">'Content-type: image/png'</font><font color="#007700">);<br /></font><font color="#0000BB">imagepng</font><font color="#007700">(</font><font color="#0000BB">$image</font><font color="#007700">);<br /></font><font color="#0000BB">imagedestroy</font><font color="#007700">(</font><font color="#0000BB">$image</font><font color="#007700">);<br /></font><font color="#0000BB">?></font>
- </font>
- </code></TD
- ></TR
- ></TABLE
- ></DIV
- ></TD
- ></TR
- ></TABLE
- >
- </P
- ></DIV
- ><DIV
- CLASS="NAVFOOTER"
- ><HR
- ALIGN="LEFT"
- WIDTH="100%"><TABLE
- SUMMARY="Footer navigation table"
- WIDTH="100%"
- BORDER="0"
- CELLPADDING="0"
- CELLSPACING="0"
- ><TR
- ><TD
- WIDTH="33%"
- ALIGN="left"
- VALIGN="top"
- ><A
- HREF="function.imagefilledellipse.html"
- ACCESSKEY="P"
- >Пред.</A
- ></TD
- ><TD
- WIDTH="34%"
- ALIGN="center"
- VALIGN="top"
- ><A
- HREF="index.html"
- ACCESSKEY="H"
- >Начало</A
- ></TD
- ><TD
- WIDTH="33%"
- ALIGN="right"
- VALIGN="top"
- ><A
- HREF="function.imagefilledrectangle.html"
- ACCESSKEY="N"
- >След.</A
- ></TD
- ></TR
- ><TR
- ><TD
- WIDTH="33%"
- ALIGN="left"
- VALIGN="top"
- >imagefilledellipse</TD
- ><TD
- WIDTH="34%"
- ALIGN="center"
- VALIGN="top"
- ><A
- HREF="ref.image.html"
- ACCESSKEY="U"
- >Уровень выше</A
- ></TD
- ><TD
- WIDTH="33%"
- ALIGN="right"
- VALIGN="top"
- >imagefilledrectangle</TD
- ></TR
- ></TABLE
- ></DIV
- ></div></center></div></td>
- <td><div style="display:none; width:200px;" id="o3" name="o3"><script charset="windows-1251" type="text/javascript" src="http://www.ozon.ru/PartnerTwinerNew.aspx?revident=bea9126b-c8e1-4bf5-b6d8-9a057f8feac6" ></script></div><script>o = document.getElementById('o3'); if(o) { var s = o.innerHTML; s = s.replace(/F6F6F6/gi,"FFFFFF"); o.innerHTML = s.replace(/padding-top: 10px; padding-bottom: 10px;/,"display:none;"); o.style.display = 'block'; } </script><br><div style="margin: 10px;"><script type="text/javascript"><!--
- google_ad_client = "pub-4093271809023514";
- /* 120x600, создано 01.11.2008 */
- google_ad_slot = "0438855731";
- google_ad_width = 120;
- google_ad_height = 600;
- //-->
- </script>
- <script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js"></script></div></td>
- </tr>
- </table>
- </td>
- </tr>
- <tr valign='bottom' height='1%'>
- <td> <table width=100% cellspacing=0 cellpadding=5 border=0 bgcolor=#9999CC>
- <tr valign=center>
- <td class='phpcopyright' width='45%' align='left'> Engine <a href="http://www.mnogosearch.org/">MnoGoSearch</a></td>
- <td class='phpcopyright' width='10%' align='center'>2007-2010 © <a href="mailto:webmaster@php.ru">PHP.RU</a></td>
- <td class='phpcopyright' width='45%' align='right' >Powered by <a target="_blank" href="http://odware.ru">ODware</a> <a HREF="http://440hz.ru">440Hz</a> </td>
- </tr>
- </table>
- <div style="text-align: right; padding: 5px">
- <!--LiveInternet counter-->
- <script type="text/javascript">document.write('<a href="http://www.liveinternet.ru/click" target=_blank><img src="http://counter.yadro.ru/hit?t53.6;r' + escape(document.referrer) + ((typeof(screen)=='undefined')?'':';s'+screen.width+'*'+screen.height+'*'+(screen.colorDepth?screen.colorDepth:screen.pixelDepth)) + ';u' + escape(document.URL) +';i' + escape('Жж'+document.title.substring(0,80)) + ';' + Math.random() + '" border=0 width=88 height=31 alt="" title="LiveInternet: показано число просмотров и посетителей за 24 часа"><\/a>');
- </script>
- <!--/LiveInternet-->
- <!-- SpyLOG -->
- <script src="http://tools.spylog.ru/counter2.2.js" type="text/javascript" id="spylog_code" counter="830950" ></script>
- <noscript><a href="http://u8309.50.spylog.com/cnt?cid=830950&f=3&p=0" target="_blank"><img src="http://u8309.50.spylog.com/cnt?cid=830950&p=0&f=4" alt='SpyLOG' border='0' width=88 height=31 ></a>
- </noscript>
- <!--/ SpyLOG -->
- </div>
- </td>
- </tr>
- </table>
- <script>
- <!--
- document.SEARCH.QS.focus();
- // --></script>
- <!--
- как же вы все это читаете?
- 440hz
- -->
- </body>
- </html>