ID/USUÁRIO:

SENHA:


» perdi minha senha!
» abrir teclado virtual
 . todo o site
 Página principal
 Mapa do site

 . listagens
 Funções de A - D
 Funções de E - H
 Funções de I - M
 Funções de N - Z

 . funções PHP
 image_type_to_mime_type ( )
 image2wbmp ( )
 imagearc ( )
 imagechar ( )
 imagecharup ( )
 imagecolorallocate ( )
 imagecolorallocatealpha ( )
 imagecolorat ( )
 imagecolorclosest ( )
 imagecolordeallocate ( )
 imagecolorexactalpha ( )
 imagecolormatch ( )
 imagecolorresolve ( )
 imagecolorresolvealpha ( )
 imagecolorsforindex ( )
 imagecolortransparent ( )
 imagecopy ( )
 imagecopymerge ( )
 imagecreate ( )
 imagecreatefromgd ( )
 imagecreatefromgd2 ( )
 imagecreatefromgd2part ( )
 imagecreatefromgif ( )
 imagecreatefromjpeg ( )
 imagecreatefrompng ( )
 imagecreatefromwbmp ( )
 imagecreatetruecolor ( )
 imageellipse ( )
 imagefilledellipse ( )
 imagefilledpolygon ( )
 imagegif ( )
 imagejpeg ( )
 imageline ( )
 imagepng ( )
 imagepolygon ( )
 imagepsloadfont ( )
 imagestring ( )
 imagesx ( )
 imagesy ( )
 imagettftext ( )
 imagetypes ( )
 imagewbmp ( )
 implode ( )
 in_array ( )
 is_dir ( )
 is_executable ( )
 is_file ( )
 is_link ( )
 is_readable ( )
 is_uploaded_file ( )
 is_writable ( )
 JDDayOfWeek ( )
 JDMonthname ( )
 JDToFrench ( )
 JDToGregorian ( )
 jdtojewish ( )
 JDToJulian ( )
 jdtounix ( )
 JewishToJD ( )
 jpeg2wbmp ( )
 JulianToJD ( )
 key ( )
 krsort ( )
 ksort ( )
 levenshtein ( )
 link ( )
 linkinfo ( )
 list ( )
 localeconv ( )
 localtime ( )
 lstat ( )
 ltrim
 md5 ( )
 md5_file ( )
 microtime ( )
 mkdir ( )
 mktime ( )
 money_format ( )
 move_uploaded_file ( )
 









 

  Funções PHP

. Glossários
     
Funções PHP - imageline ( )
Menu Guias e Glossários


Com o nosso glossário PHP, você poderá localizar todos os comandos e funções do PHP, facilitando a construção da sua home-page.

» Para ver scripts em PHP, clique aqui.
 

Função: imageline ( )


(PHP 3, PHP 4 , PHP 5)

imageline -- Desenha uma linha

int imageline ( resource image, int x1, int y1, int x2, int y2, int color)

imageline() desenha uma linha de x1, y1 até x2, y2 (o canto superior esquerdo é 0, 0) na imagem image de cor color.

Exemplo:

Exemplo 1. Desenhando uma linha

<?php
function imagelinethick($image, $x1, $y1, $x2, $y2, $color, $thick = 1)
{
/* this way it works well only for orthogonal lines
imagesetthickness($image, $thick);
return imageline($image, $x1, $y1, $x2, $y2, $color);
*/
if ($thick == 1) {
return imageline($image, $x1, $y1, $x2, $y2, $color);
}
$t = $thick / 2 - 0.5;
if ($x1 == $x2 || $y1 == $y2) {
return imagefilledrectangle($image, round(min($x1, $x2) - $t), round(min($y1, $y2) - $t), round(max($x1, $x2) + $t), round(max($y1, $y2) + $t), $color);
}
$k = ($y2 - $y1) / ($x2 - $x1); //y = kx + q
$a = $t / sqrt(1 + pow($k, 2));
$points = array(
round($x1 - (1+$k)*$a), round($y1 + (1-$k)*$a),
round($x1 - (1-$k)*$a), round($y1 - (1+$k)*$a),
round($x2 + (1+$k)*$a), round($y2 - (1-$k)*$a),
round($x2 + (1-$k)*$a), round($y2 + (1+$k)*$a),
);
imagefilledpolygon($image, $points, 4, $color);
return imagepolygon($image, $points, 4, $color);
}
?>

Veja também imagecreate() e imagecolorallocate().




As funçoes estão dividas em 4 listagens:
- Funções de A - D
- Funções de E - H
- Funções de I - M
- Funções de N - Z

Clique no menu ao lado para ter acesso às funções ou para trocar de listagens.




Veja também:
CONTADOR DE VISITAS: Coloque um contador de visitas gratuito no seu site, e descubra como anda o movimento do seu site!


 
» Ou busque pela sua oferta:


De: R$ ,00    Até: R$ ,00
    Página Inicial | Mapa do site | Termos de Uso | Política de Privacidade | Hospedagem de sites
    © 2002-09 SuperTráfego.com - 2181 usuários online - O SuperTráfego é mantido por Spacic Interactive

Setup Grátis + Planos a partir de R$ 7,90!

     
Tráfego grátis para o seu site Setup grátis + planos a partir de R$ 7,90 Registro de domínio .COM .NET .BIZ .INFO Emoticons grátis Ganhe dinheiro com o seu site
Visite nosso patrocinador
Publicidade
  Ofertas: Shopping de ofertas