PageRenderTime 31ms CodeModel.GetById 20ms RepoModel.GetById 1ms app.codeStats 0ms

/manual/www.php.ru/manual/function.imagefilledpolygon.html

https://github.com/overchuk/vim
HTML | 469 lines | 289 code | 124 blank | 56 comment | 0 complexity | 69cd1bdcb52db36b88a217f44382733e MD5 | raw file
  1. <!--
  2. HTML dropped by Zend Guard Compressor 4.2
  3. php.ru team: mz, az, yuri, vb, cyxapuk, 440hz, administrator
  4. 2004-2007 (c) expi-web.com
  5. 2007-2008 (c) odware.com
  6. 0101-1010 (с) 440hz
  7. 2b|~2b=?
  8. -->
  9. <!-- EHOT тут всё пожрал ! -->
  10. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
  11. <html>
  12. <head>
  13. <link rel="alternate" type="application/rss+xml" title="php.ru/forum - последние сообщения" href="http://www.php.ru/forum/rss.php">
  14. <link rel="SHORTCUT ICON" href="http://www.php.ru/favicon.ico" />
  15. <META name="description" content="php.ru - форум PHP программистов, поиск по всем ресурсам сети, посвященным php">
  16. <meta http-equiv="description" content="php.ru - форум PHP программистов, поиск по всем ресурсам сети, посвященным php">
  17. <META name="keywords" content="php, php5, apache, mysql, session">
  18. <meta http-equiv="keywords" content="php, php5, apache, mysql, session">
  19. <title>php.ru - imagefilledpolygon</title>
  20. <LINK REL="stylesheet" TYPE="text/css" HREF="http://www.php.ru/index.css">
  21. <script language="JavaScript" src="http://www.php.ru/ajax/ajax.js"></script>
  22. </head>
  23. <body>
  24. <table height='100%' width='100%' cellspacing='0' cellpadding='0'>
  25. <tr height='99%' valign='top'>
  26. <td align='center'>
  27. <table style='margin-top: 4px' width=100% cellspacing=0 cellpadding=3>
  28. <tr>
  29. <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> словосочетания &laquo;<a href="/manual/introduction.html" class=lnk>PHP: Hypertext Preprocessor</a>&raquo;</td>
  30. </tr>
  31. </table>
  32. <script language="JavaScript" src="http://www.php.ru/ajax/subsys_ajax.js"></script>
  33. <!--
  34. commet by 440hz
  35. 20.10.2007
  36. <script language="JavaScript" src="http://www.php.ru/ajax/pu_search.js"></script>
  37. -->
  38. <script language="JavaScript" src="http://www.php.ru/ajax/cz.js?a=b"></script>
  39. <table style='margin-top: 5px' width=100% bgcolor=#9999cc cellspacing=0 cellpadding=0 border=0>
  40. <form name=SEARCH method=GET action="http://www.php.ru/search/?SID=a4lny3bv0dmxba0q" onsubmit="return puSubmit();">
  41. <input type=hidden name=PAGE value=1>
  42. <tr>
  43. <td width='1' valign='middle'>
  44. <a href='/'><img src="http://www.php.ru/;-)/logo.gif" width=133 height=93 alt="php" border=0 hspace=10 vspace=0></a>
  45. </td>
  46. <td width='100%' valign='middle'>
  47. <!--
  48. commet by 440hz
  49. 20.10.2007
  50. <div id='pu_search' class='pu_search'></div>
  51. <div id='pu_search_description' class='pu_search_decription'></div>
  52. -->
  53. <input type=text style='width:99%; margin: 10px' maxlength='200' name='QS' class='in' id='query' autocomplete='off' value="" />
  54. </td>
  55. </tr>
  56. <tr bgcolor='#666699' valign='middle'>
  57. <td style='border-top: 1px solid #333366;'><br /></td>
  58. <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>
  59. </tr>
  60. </form>
  61. </table>
  62. <table id="menu" cellspaciong=0 cellpadding=3>
  63. <tr>
  64. <td><a href="/" class=current>Главная</a></td>
  65. <td><a href="/download/" class=current>Скачать</a></td>
  66. <td><a href="/doc/" class=current>Документация</a></td>
  67. <td><a href="/forum/" class=current>Форум</a></td>
  68. <td width=100% align=right><a href="/phpinfo.html" class=current>phpinfo()</a></td>
  69. </tr>
  70. </table>
  71. <!-- AdRiver code START. Type:728x90 Site: php.ru PZ: 0 BN: 1 -->
  72. <script language="javascript" type="text/javascript"><!--
  73. var RndNum4NoCash = Math.round(Math.random() * 1000000000);
  74. var ar_Tail='unknown'; if (document.referrer) ar_Tail = escape(document.referrer);
  75. document.write(
  76. '<iframe src="http://ad.adriver.ru/cgi-bin/erle.cgi?'
  77. + 'sid=148680&bn=1&target=blank&bt=36&pz=0&rnd=' + RndNum4NoCash + '&tail256=' + ar_Tail
  78. + '" frameborder=0 vspace=0 hspace=0 width=728 height=90 marginwidth=0'
  79. + ' marginheight=0 scrolling=no></iframe>');
  80. //--></script>
  81. <noscript>
  82. <a href="http://ad.adriver.ru/cgi-bin/click.cgi?sid=148680&bn=1&bt=36&pz=0&rnd=1525626915" target=_blank>
  83. <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>
  84. </noscript>
  85. <!-- AdRiver code END -->
  86. <table width='100%' cellspacing='0' cellpadding='0'>
  87. <tr valign='top'>
  88. <td width=100%><div style="margin: 10px 10px 10px 50px;"><center><div style="width: 800px; text-align: left"><DIV
  89. CLASS="NAVHEADER"
  90. ><TABLE
  91. SUMMARY="Header navigation table"
  92. WIDTH="100%"
  93. BORDER="0"
  94. CELLPADDING="0"
  95. CELLSPACING="0"
  96. ><TR
  97. ><TH
  98. COLSPAN="3"
  99. ALIGN="center"
  100. >Руководство по PHP</TH
  101. ></TR
  102. ><TR
  103. ><TD
  104. WIDTH="10%"
  105. ALIGN="left"
  106. VALIGN="bottom"
  107. ><A
  108. HREF="function.imagefilledellipse.html"
  109. ACCESSKEY="P"
  110. >Пред.</A
  111. ></TD
  112. ><TD
  113. WIDTH="80%"
  114. ALIGN="center"
  115. VALIGN="bottom"
  116. ></TD
  117. ><TD
  118. WIDTH="10%"
  119. ALIGN="right"
  120. VALIGN="bottom"
  121. ><A
  122. HREF="function.imagefilledrectangle.html"
  123. ACCESSKEY="N"
  124. >След.</A
  125. ></TD
  126. ></TR
  127. ></TABLE
  128. ><HR
  129. ALIGN="LEFT"
  130. WIDTH="100%"></DIV
  131. ><H1
  132. ><A
  133. NAME="function.imagefilledpolygon"
  134. ></A
  135. >imagefilledpolygon</H1
  136. ><DIV
  137. CLASS="refnamediv"
  138. ><A
  139. NAME="AEN68024"
  140. ></A
  141. ><P
  142. > (PHP 3, PHP 4, PHP 5)</P
  143. >imagefilledpolygon&nbsp;--&nbsp;Draw a filled polygon</DIV
  144. ><DIV
  145. CLASS="refsect1"
  146. ><A
  147. NAME="AEN68027"
  148. ></A
  149. ><H2
  150. >Description</H2
  151. >bool <B
  152. CLASS="methodname"
  153. >imagefilledpolygon</B
  154. > ( resource image, array points, int num_points, int color )<BR
  155. ></BR
  156. ><P
  157. >&#13; <B
  158. CLASS="function"
  159. >imagefilledpolygon()</B
  160. > creates a filled polygon
  161. in image <VAR
  162. CLASS="parameter"
  163. >image</VAR
  164. >.
  165. </P
  166. ><P
  167. >&#13; <VAR
  168. CLASS="parameter"
  169. >points</VAR
  170. > is an array containing the
  171. <VAR
  172. CLASS="literal"
  173. >x</VAR
  174. > and <VAR
  175. CLASS="literal"
  176. >y</VAR
  177. > co-ordinates
  178. of the polygons vertices consecutively.
  179. </P
  180. ><P
  181. >&#13; The parameter <VAR
  182. CLASS="parameter"
  183. >num_points</VAR
  184. > is the total
  185. number of vertices, which must be larger than 3.
  186. </P
  187. ><P
  188. >&#13; <TABLE
  189. WIDTH="100%"
  190. BORDER="0"
  191. CELLPADDING="0"
  192. CELLSPACING="0"
  193. CLASS="EXAMPLE"
  194. ><TR
  195. ><TD
  196. ><DIV
  197. CLASS="example"
  198. ><A
  199. NAME="AEN68054"
  200. ></A
  201. ><P
  202. ><B
  203. >Пример 1. <B
  204. CLASS="function"
  205. >imagefilledpolygon()</B
  206. > example</B
  207. ></P
  208. ><TABLE
  209. BORDER="0"
  210. BGCOLOR="#E0E0E0"
  211. CELLPADDING="5"
  212. ><TR
  213. ><TD
  214. ><code><font color="#000000">
  215. <font color="#0000BB">&lt;?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 />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</font><font color="#0000BB">40</font><font color="#007700">,&nbsp;&nbsp;</font><font color="#0000BB">50</font><font color="#007700">,&nbsp;&nbsp;</font><font color="#FF8000">// Point 1 (x, y)<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</font><font color="#0000BB">20</font><font color="#007700">,&nbsp;&nbsp;</font><font color="#0000BB">240</font><font color="#007700">, </font><font color="#FF8000">// Point 2 (x, y)<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</font><font color="#0000BB">60</font><font color="#007700">,&nbsp;&nbsp;</font><font color="#0000BB">60</font><font color="#007700">,&nbsp;&nbsp;</font><font color="#FF8000">// Point 3 (x, y)<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</font><font color="#0000BB">240</font><font color="#007700">, </font><font color="#0000BB">20</font><font color="#007700">,&nbsp;&nbsp;</font><font color="#FF8000">// Point 4 (x, y)<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</font><font color="#0000BB">50</font><font color="#007700">,&nbsp;&nbsp;</font><font color="#0000BB">40</font><font color="#007700">,&nbsp;&nbsp;</font><font color="#FF8000">// Point 5 (x, y)<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</font><font color="#0000BB">10</font><font color="#007700">,&nbsp;&nbsp;</font><font color="#0000BB">10&nbsp;&nbsp;&nbsp;</font><font color="#FF8000">// Point 6 (x, y)<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</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&nbsp;&nbsp;&nbsp;</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">?&gt;</font>
  216. </font>
  217. </code></TD
  218. ></TR
  219. ></TABLE
  220. ></DIV
  221. ></TD
  222. ></TR
  223. ></TABLE
  224. >
  225. </P
  226. ></DIV
  227. ><DIV
  228. CLASS="NAVFOOTER"
  229. ><HR
  230. ALIGN="LEFT"
  231. WIDTH="100%"><TABLE
  232. SUMMARY="Footer navigation table"
  233. WIDTH="100%"
  234. BORDER="0"
  235. CELLPADDING="0"
  236. CELLSPACING="0"
  237. ><TR
  238. ><TD
  239. WIDTH="33%"
  240. ALIGN="left"
  241. VALIGN="top"
  242. ><A
  243. HREF="function.imagefilledellipse.html"
  244. ACCESSKEY="P"
  245. >Пред.</A
  246. ></TD
  247. ><TD
  248. WIDTH="34%"
  249. ALIGN="center"
  250. VALIGN="top"
  251. ><A
  252. HREF="index.html"
  253. ACCESSKEY="H"
  254. >Начало</A
  255. ></TD
  256. ><TD
  257. WIDTH="33%"
  258. ALIGN="right"
  259. VALIGN="top"
  260. ><A
  261. HREF="function.imagefilledrectangle.html"
  262. ACCESSKEY="N"
  263. >След.</A
  264. ></TD
  265. ></TR
  266. ><TR
  267. ><TD
  268. WIDTH="33%"
  269. ALIGN="left"
  270. VALIGN="top"
  271. >imagefilledellipse</TD
  272. ><TD
  273. WIDTH="34%"
  274. ALIGN="center"
  275. VALIGN="top"
  276. ><A
  277. HREF="ref.image.html"
  278. ACCESSKEY="U"
  279. >Уровень выше</A
  280. ></TD
  281. ><TD
  282. WIDTH="33%"
  283. ALIGN="right"
  284. VALIGN="top"
  285. >imagefilledrectangle</TD
  286. ></TR
  287. ></TABLE
  288. ></DIV
  289. ></div></center></div></td>
  290. <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"><!--
  291. google_ad_client = "pub-4093271809023514";
  292. /* 120x600, создано 01.11.2008 */
  293. google_ad_slot = "0438855731";
  294. google_ad_width = 120;
  295. google_ad_height = 600;
  296. //-->
  297. </script>
  298. <script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js"></script></div></td>
  299. </tr>
  300. </table>
  301. </td>
  302. </tr>
  303. <tr valign='bottom' height='1%'>
  304. <td> <table width=100% cellspacing=0 cellpadding=5 border=0 bgcolor=#9999CC>
  305. <tr valign=center>
  306. <td class='phpcopyright' width='45%' align='left'>&nbsp;&nbsp;Engine <a href="http://www.mnogosearch.org/">MnoGoSearch</a></td>
  307. <td class='phpcopyright' width='10%' align='center'>2007-2010 &copy <a href="mailto:webmaster@php.ru">PHP.RU</a></td>
  308. <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> &nbsp;&nbsp;</td>
  309. </tr>
  310. </table>
  311. <div style="text-align: right; padding: 5px">
  312. <!--LiveInternet counter-->
  313. <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>');
  314. </script>
  315. <!--/LiveInternet-->
  316. <!-- SpyLOG -->
  317. <script src="http://tools.spylog.ru/counter2.2.js" type="text/javascript" id="spylog_code" counter="830950" ></script>
  318. <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>
  319. </noscript>
  320. <!--/ SpyLOG -->
  321. </div>
  322. </td>
  323. </tr>
  324. </table>
  325. <script>
  326. <!--
  327. document.SEARCH.QS.focus();
  328. // --></script>
  329. <!--
  330. как же вы все это читаете?
  331. 440hz
  332. -->
  333. </body>
  334. </html>