PHP 7.2.0 Release Candidate 2 Released

imageline

(PHP 4, PHP 5)

imagelineDraw a line

Description

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

Draws a line between the two given points.

Parameters

image

An image resource, returned by one of the image creation functions, such as imagecreatetruecolor().

x1

x-coordinate for first point.

y1

y-coordinate for first point.

x2

x-coordinate for second point.

y2

y-coordinate for second point.

color

The line color. A color identifier created with imagecolorallocate().

Return Values

Returns TRUE on success or FALSE on failure.

Examples

Example #1 Drawing a thick line

<?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 0.5;
    if (
$x1 == $x2 || $y1 == $y2) {
        return 
imagefilledrectangle($imageround(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(pow($k2));
    
$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$points4$color);
    return 
imagepolygon($image$points4$color);
}

?>

See Also

add a note add a note

User Contributed Notes 28 notes

up
4
pb_2001 at haefft dot de
11 years ago
This is a function to make a dotted line. It accepts (it actually requires) 7 parameters and returns 1 if everything went OK and 0 if there was a problem.

int imagelinedotted ( resource im, int x1, int y1, int x2, int y2, int dist, int col )

imagelinedotted() draws a line from x1, y1 to x2, y2 (top left is 0, 0) in image im of colour col where dist defines the distance (measured in pixels) between one dot and another.

<?php
function imagelinedotted ($im, $x1, $y1, $x2, $y2, $dist, $col) {
   
$transp = imagecolortransparent ($im);
   
   
$style = array ($col);
   
    for (
$i=0; $i<$dist; $i++) {
       
array_push($style, $transp);        // Generate style array - loop needed for customisable distance between the dots
   
}
   
   
imagesetstyle ($im, $style);
    return (integer)
imageline ($im, $x1, $y1, $x2, $y2, IMG_COLOR_STYLED);
   
imagesetstyle ($im, array($col));        // Reset style - just in case...
}
?>
up
4
kramesch_NOSPAM_ at _nospam_idsolutions dot at
15 years ago
Here is a simple code to draw a line with an arbitrary stroke. The parameter aStroke is treated as a cyclic boolean array where true equals "set a point"
e.g. $aDotStroke = array(true,false);

function ImageStrokeLine($im,$x1,$y1,$x2,$y2,$farbe, $aStroke)
  {
    $deltax = abs($x2 - $x1);       
    $deltay = abs($y2 - $y1);       
    $x = $x1;                      
    $y = $y1;                      
   
    if ($x2 >= $x1)                
    {
      $xinc1 = 1;
      $xinc2 = 1;
    }
    else                         
    {
      $xinc1 = -1;
      $xinc2 = -1;
    }
   
    if ($y2 >= $y1)                
    {
      $yinc1 = 1;
      $yinc2 = 1;
    }
    else                         
    {
      $yinc1 = -1;
      $yinc2 = -1;
    }
   
    if ($deltax >= $deltay) 
    {
      $xinc1 = 0;                
      $yinc2 = 0;                
      $den = $deltax;
      $num = $deltax / 2;
      $numadd = $deltay;
      $numpixels = $deltax;
    }
    else                         
    {
      $xinc2 = 0;            
      $yinc1 = 0;            
      $den = $deltay;
      $num = $deltay / 2;
      $numadd = $deltax;
      $numpixels = $deltay;
    }
   
    for ($curpixel = 0; $curpixel <= $numpixels; $curpixel++)
    {
      if ($iStrokeCount >= count($aStroke))
      {
        $iStrokeCount = 0;
      }
 
      if ($aStroke[$iStrokeCount++])
      {
        ImageSetPixel($im,$x, $y,$farbe);           
      }           
      $num += $numadd;           
      if ($num >= $den)            
      {
        $num -= $den;              
        $x += $xinc1;              
        $y += $yinc1;              
      }
      $x += $xinc2;                
      $y += $yinc2;                
    }
  }
up
3
d [AT] sprid [DOT] de
12 years ago
Here my function do clear all problems. With this, you can draw firstly smooth lines (basic code adapted from code_couturier at graffiti dot net, with some performance changes). The special is, you can define the alpha-value of the line (0 = normal smooth line, 127 = fully transparent). Change whatever you want to make it better, but post your results ;)

<?php
/**
* function imageSmoothAlphaLine() - version 1.0
* Draws a smooth line with alpha-functionality
*
* @param   ident    the image to draw on
* @param   integer  x1
* @param   integer  y1
* @param   integer  x2
* @param   integer  y2
* @param   integer  red (0 to 255)
* @param   integer  green (0 to 255)
* @param   integer  blue (0 to 255)
* @param   integer  alpha (0 to 127)
*
* @access  public
*
* @author  DASPRiD <d@sprid.de>
*/
function imageSmoothAlphaLine ($image, $x1, $y1, $x2, $y2, $r, $g, $b, $alpha=0) {
 
$icr = $r;
 
$icg = $g;
 
$icb = $b;
 
$dcol = imagecolorallocatealpha($image, $icr, $icg, $icb, $alpha);
 
  if (
$y1 == $y2 || $x1 == $x2)
   
imageline($image, $x1, $y2, $x1, $y2, $dcol);
  else {
   
$m = ($y2 - $y1) / ($x2 - $x1);
   
$b = $y1 - $m * $x1;

    if (
abs ($m) <2) {
     
$x = min($x1, $x2);
     
$endx = max($x1, $x2) + 1;

      while (
$x < $endx) {
       
$y = $m * $x + $b;
       
$ya = ($y == floor($y) ? 1: $y - floor($y));
       
$yb = ceil($y) - $y;
  
       
$trgb = ImageColorAt($image, $x, floor($y));
       
$tcr = ($trgb >> 16) & 0xFF;
       
$tcg = ($trgb >> 8) & 0xFF;
       
$tcb = $trgb & 0xFF;
       
imagesetpixel($image, $x, floor($y), imagecolorallocatealpha($image, ($tcr * $ya + $icr * $yb), ($tcg * $ya + $icg * $yb), ($tcb * $ya + $icb * $yb), $alpha));
 
       
$trgb = ImageColorAt($image, $x, ceil($y));
       
$tcr = ($trgb >> 16) & 0xFF;
       
$tcg = ($trgb >> 8) & 0xFF;
       
$tcb = $trgb & 0xFF;
       
imagesetpixel($image, $x, ceil($y), imagecolorallocatealpha($image, ($tcr * $yb + $icr * $ya), ($tcg * $yb + $icg * $ya), ($tcb * $yb + $icb * $ya), $alpha));
 
       
$x++;
      }
    } else {
     
$y = min($y1, $y2);
     
$endy = max($y1, $y2) + 1;

      while (
$y < $endy) {
       
$x = ($y - $b) / $m;
       
$xa = ($x == floor($x) ? 1: $x - floor($x));
       
$xb = ceil($x) - $x;
 
       
$trgb = ImageColorAt($image, floor($x), $y);
       
$tcr = ($trgb >> 16) & 0xFF;
       
$tcg = ($trgb >> 8) & 0xFF;
       
$tcb = $trgb & 0xFF;
       
imagesetpixel($image, floor($x), $y, imagecolorallocatealpha($image, ($tcr * $xa + $icr * $xb), ($tcg * $xa + $icg * $xb), ($tcb * $xa + $icb * $xb), $alpha));
 
       
$trgb = ImageColorAt($image, ceil($x), $y);
       
$tcr = ($trgb >> 16) & 0xFF;
       
$tcg = ($trgb >> 8) & 0xFF;
       
$tcb = $trgb & 0xFF;
       
imagesetpixel ($image, ceil($x), $y, imagecolorallocatealpha($image, ($tcr * $xb + $icr * $xa), ($tcg * $xb + $icg * $xa), ($tcb * $xb + $icb * $xa), $alpha));
 
       
$y ++;
      }
    }
  }
}
// end of 'imageSmoothAlphaLine()' function
?>
up
2
Nils
5 years ago
A quick function using imageline that I wrote so i could specify a starting point, angle and length of vector.

Thought other people might find this useful.

<?php
$size
= 600;
$img = imagecreatetruecolor($size, $size);

$white = imagecolorallocate($img, 255, 255, 255);
$black = imagecolorallocate($img, 0, 0, 0);

imagefilledrectangle($img,0,0,$size,$size,$white);

function
Vector($palette,$startx,$starty,$angle,$length,$colour){
   
$angle = deg2rad($angle);
   
$endx = $startx+cos($angle)*$length;
   
$endy = $starty-sin($angle)*$length;
    return(
imageline($palette,$startx,$starty,$endx,$endy,$colour));
}

Vector($img,$size/2,$size/2,30,200,$black);

header("Content-type: image/png");
imagepng($img);

?>

For this script angles work in a anti-clockwise direction (modify + and - in function to change start of 0 degrees and also direction of angle calculated)
up
3
sbm007 at gmail dot com
7 years ago
Here is a analog clock representation of the system time along with digits for hours and little dots for minutes/seconds:

<?php
$img
= imagecreatetruecolor(450, 450);

$white = imagecolorallocate($img, 255, 255, 255);
$red = imagecolorallocate($img, 255, 0, 0);
$black = imagecolorallocate($img, 0, 0, 0);
$grey = imagecolorallocate($img, 211, 211, 211);

imagefill($img, 0, 0, $white);
imagearc($img, 224, 224, 400, 400, 0, 0, $black);
imagefilledarc($img, 224, 224, 15, 15, 0, 0, $black, IMG_ARC_PIE);

for (
$zz = 0; $zz < 60; $zz++) {
   
$digitCoords['x'][] = 175 * cos(deg2rad(($zz-10) * (360/60))) + 224;
   
$digitCoords['y'][] = 175 * sin(deg2rad(($zz-10) * (360/60))) + 224;
}

for (
$zz = 0; $zz < 60; $zz++) {
    if (
$zz % 5 == 0)
       
imagestring($img, 5, $digitCoords['x'][$zz] - 4, $digitCoords['y'][$zz] - 6, ($zz/5) + 1, $black);
    else
       
imagefilledarc($img, $digitCoords['x'][$zz], $digitCoords['y'][$zz], 3, 3, 0, 0, $grey, IMG_ARC_PIE);
}

$seconds = date('s');
$minutes = date('i') + ($seconds/60);
$hours = date('h') + ($minutes/60);

$r_sec = 175;
$r_min = 175;
$r_hr = 125;

$x_sec = $r_sec * cos(deg2rad(($seconds-15) * (360/60))) + 224;
$y_sec = $r_sec * sin(deg2rad(($seconds-15) * (360/60))) + 224;

$x_min = $r_min * cos(deg2rad(($minutes-15) * (360/60))) + 224;
$y_min = $r_min * sin(deg2rad(($minutes-15) * (360/60))) + 224;

$x_hr = $r_hr * cos(deg2rad(($hours-3) * (360/12))) + 224;
$y_hr = $r_hr * sin(deg2rad(($hours-3) * (360/12))) + 224;

imageline($img, 224, 224, $x_sec, $y_sec, $red);
imagesetthickness($img, 3);
imageline($img, 224, 224, $x_min, $y_min, $black);
imagesetthickness($img, 5);
imageline($img, 224, 224, $x_hr, $y_hr, $black);

header("Content-type: image/png");
imagepng($img);

imagedestroy($img);
?>
up
2
ruturaj_v at yahoo dot com
13 years ago
here is a function that helps you create arrows...

<?php
function get_arrowheads ($x1, $y1, $x2, $y2, $arrhead, $arrang) {
   
$debug = false;
   
   
define("INFINITE", 'INFINITE');
    if ((
$x2-$x1)==0) {
        if (
$y1 == 0) {
           
$slope = 0;
        } else {
           
$slope = INFINITE;
        }
    } else {
       
$slope = -($y2-$y1)/($x2-$x1);
    }

   
//$slope = number_format($slope, 2, '.','');
   
if ($slope == 'INFINITE') {
       
$ang = 90;
    } else {
       
$ang = atan ($slope);
       
$ang = ($ang * 180)/pi();
    }
   
//$ang = number_format($ang, 2, '.', '');
    //echo ($ang);
    //exit;

    //convert the angle
   
$arrang1 = ($ang - $arrang);
   
$arrangdeg1 = ($ang - $arrang);
   
//echo ($arrang1);exit;
   
$arrang1 = ($arrang1*pi())/180;

   
$arrang2 = ($ang + $arrang);
   
$arrangdeg2 = ($ang + $arrang);
   
$arrang2 = ($arrang2*pi())/180;
   
//echo ($arrang1);

   
$arx1 = (floor(cos($arrang1)*$arrhead));
   
$ary1 = (floor(sin($arrang1)*$arrhead));
   
$arx2 = (floor(cos($arrang2)*$arrhead));
   
$ary2 = (floor(sin($arrang2)*$arrhead));
    if (
$debug) {
        echo (
"Values of arx1.. before add/sub</br>");
        echo (
"$arx1,$ary1&nbsp;&nbsp;&nbsp;$arx2,$ary2</br>");
    }
    if (
$ang==0) {
        if (
$x2 > $x1) {
           
$arx1 = $x2 - $arx1;    $ary1 = $y2 - $ary1;
           
$arx2 = $x2 - $arx2;    $ary2 = $y2 - $ary2;
        } elseif (
$x2 < $x1) {
           
$arx1 = $x2 + $arx1;    $ary1 = $y2 - $ary1;
           
$arx2 = $x2 + $arx2;    $ary2 = $y2 - $ary2;
        }
    }
    if (
$ang > 0 && $ang < 90) {
        if ((
$x2 > $x1) && ($y2 < $y1)) {
           
$arx1 = $x2 - $arx1;    $ary1 = $y2 + $ary1;
           
$arx2 = $x2 - $arx2;    $ary2 = $y2 + $ary2;
        } elseif ((
$x2 < $x1) && ($y2 > $y1)) {
           
$arx1 = $x2 + $arx1;    $ary1 = $y2 - $ary1;
           
$arx2 = $x2 + $arx2;    $ary2 = $y2 - $ary2;
        }
    }
    if (
$ang==90) {
        if ((
$y2 > $y1)) {
           
$arx1 = $x2 - $arx1;    $ary1 = $y2 - $ary1;
           
$arx2 = $x2 - $arx2;    $ary2 = $y2 - $ary2;
        } elseif ((
$y2 < $y1)) {
           
$arx1 = $x2 - $arx1;    $ary1 = $y2 + $ary1;
           
$arx2 = $x2 - $arx2;    $ary2 = $y2 + $ary2;
        }
    }
    if (
$ang > -90 && $ang < 0) {
        if ((
$x2 > $x1) && ($y2 > $y1)) {
           
$arx1 = $x2 - $arx1;    $ary1 = $y2 + $ary1;
           
$arx2 = $x2 - $arx2;    $ary2 = $y2 + $ary2;
        } elseif ((
$x2 < $x1) && ($y2 < $y1)) {
           
$arx1 = $x2 + $arx1;    $ary1 = $y2 - $ary1;
           
$arx2 = $x2 + $arx2;    $ary2 = $y2 - $ary2;
        }
    }

    if (
$debug) {
        echo (
"Angle of line is (".$ang*180/pi().")</br>");
        echo (
"Angle of line1 is $arrangdeg1</br>");
        echo (
"Angle of line2 is $arrangdeg2</br>");
        echo (
"$arx1,$ary1&nbsp;&nbsp;&nbsp;$x2,$y2</br>");
        echo (
"$arx2,$ary2&nbsp;&nbsp;&nbsp;$x2,$y2");
        exit;
    }
   
   
$array_arrows = array (
                   
'x1' =>$arx1,
                   
'y1' => $ary1,
                   
'x2' => $arx2,
                   
'y2' => $ary2
                   
);
    return
$array_arrows;

}

$x1 = 200; $y1 = 200;
$x2 = 400; $y2 = 100;
$arrhead = 15; //10px
$arrang = 10; //10 deg

$ar_arrws = get_arrowheads ($x1, $y1, $x2, $y2, $arrhead, $arrang);

$im  = imagecreate (400, 400);
$w   = imagecs="ss="default">cos$minutes, $y1);
400
);
400
)re/>$arrhead = imagecs="ss="default">cos$minutes, $y1(400, 400<">400= 5);
pan class="default">imagecs="ss="default">cos$minutes
, (
$x1, $y1, $x2, $y2(5);
pan class="default">imagecs="ss="default">cos$minutes
, (, $y1, , $y1, , $y1, , $y1, $red);
pan class="default">imagecs="ss="default">cos$minutes
, , $x2, $y2, ']ault">$y2, ']ault">$y2(5);
pan class="default">imagecs="ss="default">cos$minutes
, , $x2, $y2, ']ault">$y2, ']ault">$y2(5">$img);
?>
<105038
105038a href="/manual/vote-note.php?id=42390&page=function.imageline&vote=up" title="Vote up!" class="usernotes-vo105038
105038a href="/manual/vote-note.php?id=42390&page=function.imageline&vote=down" title="Vote down!" class="usernotes-voted">down 105038 iv> <0iv class="tally" id="142390" title="62% like this..."> 105038 i<>
ruturaj_v at yahoo dot com11-07-24 09:44v class="d6e" title="2004-05-14 08:48">13 years ago
(t;doer(= l bold(: 5">$im that helps you create arrows...
$imge-notBoldL />imageline class="keyword">, ($x1, $y1, $x2, $x2, $x2imagesetlt">$ang, $x2imagesetlt">$ang 'IN 5">$im{ 5">$imult">$x2$y_hr imagelineimagesetault">180; 5">$imufors="default">cos$minutesimagesetlt">$ang= cos$minutesimagesets...magelineimagesetau"default">cos$minutesimageset++) 5">$imu{>$y2$ary2 $x2imagesetnbsp    }
  &nbsspan class="default">imagesets...mageline
, $y2$ary2 imageset;}   cos$minutesjspan class="default">imagesetlt">$ang= cos$minutesjspan class="default">imagesets...magelineimagesetau"default">cos$minutesjspan class="default">imageset++) 5">$im $im $y2$ary2 $x2imagesetnbsp    }
  &nbbspan class="default">imagesets...mageline
, $y2$ary2 imageset;}   $y2$ary2 imagelineimageset$arrang2$x2 imageset$arrang2imageset>; 5">$im   &nbimagesets...lt">$angimageset) 5">$im $im    
 phpimagesetimageline class="keyword">, $x2imagesetault">$y1, imagesetault">$y1$x2imagesetault">$y1, imagesetault">$y1, $im $img
);
?>
<92168
92168a href="/manual/vote-note.php?id=42390&page=function.imageline&vote=down" title="Vote down!" class="usernotes-voted">down 92168 iv> <0iv class="tally" id="142390" title="62% like this..."> 92168 i<>
ruturaj_v at yahoo dot com 9-07-12 01:16v class="d8e" title="2004-05-14 08:48">13 years ago
o (recursivee">dosunction that helps you create arrows...

<?php
e is span class="default">imagesetimageline, ($x1, $y1, $x2, $x2, $x2, $x2, ) {
  istdotsp;
$slope imagelineimagesetimageline$y2 , $x2 ult">$x2 imagesetimageline; $y2 , $x2//echo ($arrang1);

 dxsp;
$ary2 = $y2 , $ang ) {
  istdotsspan class="default">imagesetauss="comment">//echo ($arrang1);

 dysp;
$ary2 = ; $y2 , $ang ) {
  istdotsspan class="default">imagesetauss="cuss="comment">//echo ($arrang1);

 ksp;
$ary2 ) {
 alengthrd">,
//echo ($arrang1);

 x2osp;
$ary2 = $y2 imagesetauss="comment">//echo ($arrang1);

 y2osp;
$ary2 $y2 , //echo ($arrang1);

 x3sp;
$ary2 $ang $x2 imagesetauss="comment">//echo ($arrang1);

 y3sp;
$ary2 $ang $x2 , //echo ($arrang1);

 x4sp;
$ary2 $y2 $ang imagesetauss="comment">//echo ($arrang1);

 y4sp;
$ary2 $y2 $ang , //echo ($arrang1);

 e-note.phspan class="default">imagesetimageline
, (
$x1, $y1imagesetault">$y1, $x2, //echo ($arrang1);

 e-notfilledpolygonspan class="default">imagesetimageline
, $x2, $x2, $x2, $x2, $x2, $x2, $x2, $img);
?>
<74779
74779a href="/manual/vote-note.php?id=42390&page=function.imageline&vote=down" title="Vote down!" class="usernotes-voted">down 74779 page=fun100iv class="tally" id="242390" title="62% like this..."> 74779 p<>
ruturaj_v at yahoo dot com 7-04-27 01:15v class="d10e" title="2004-05-14 08:48">13 years ago
$imge-notpolare.phspan class="default">imagesetimageline, , ($x1, $x1, ) {
 a />,
) {
 c>= ,
$im{uss="comment">//echo ($arrang1);

 x2sp;
$ary2 $slope (,    >, $ang , //echo ($arrang1);

 y2sp;
$ary2 $slope imageseta>$slope    >, *$ang , //echo ($arrang1);

 e-note.phspan class="default">imagesetimageline
, , ($x1, $x1$x2, $x2, $img">$img);
?>
<52464
52464a href="/manual/vote-note.php?id=42390&page=function.imageline&vote=down" title="Vote down!" class="usernotes-voted">down 52464 page=fun100iv class="tally" id="242390" title="62% like this..."> 52464 p<>
ruturaj_v at yahoo dot com 5- 5- 2 11:50v class="d12e" title="2004-05-14 08:48">13 years ago
,ient Rectsp;>< (based on _vprevious e=do)5">$img">$im// C>= $ime= = <( cl, 255);<"s...">$y2,ientRect(e>$arrang$alpha = atsp2(ey2-eyw,ex2-eyw>auss="comment"$>= l_wdt = ewdt*syw($alpha>auss="comment"$>= l_hgt = ewdt*co<($alpha>auss="comment"">);<">= l wdt:".$>= l_wdtauss="comment"">);<"s...">$y2<>= l hgt:".$>= l_hgtauss="comment"">);<"s...">$y2<: ".(bsp;><*yyw/pi()>auss="comment"$plotD = 0auss="comment"$i=0ult">400<">400omment"$dy = e>= l_hgt/$wdtauss="comment"ydxs="$>= l_wdt/$wdtauss="comment"ydrgb= 256/$wdtauss="comment"while(e<++ ult">ewdt>>$arrang// Draw a(,ient effectarrangI-notL />(e= auss="comment"I-notL />(e= auss="c  ?>
<42596
42596a href="/manual/vote-note.php?id=42390&page=function.imageline&vote=down" title="Vote down!" class="usernotes-voted">down 42596 page=fun100iv class="tally" id="242390" title="62% like this..."> 42596 p<>
ruturaj_v at yahoo dot com 4- 5-22 03:41v class="d13e" title="2004-05-14 08:48">13 years ago
,ebp; $y2g);
not p;
);= imagesetimageline= $x2= $y2g);
=
$ar_arrws - $arlt">$x2$arrhead imagesetimageline, $x2$y1);
400
);
g
);
$ar_arrws = 100$ar_arrws 100$ar_arrws = 10);
$ar_arrws = 100$ar_arrws = 100$ar_arrws = 10);
$ar_arrws = de lpe-notult">10);
$ary2 $ult">$y2 = 100$ary1 ) {
 lignesrd">=
10);
$ary2 $ult">$y2 = 100$ary1 ) {
 lignesrd">=
10);
$ary2 $ult">$y2 = 100$ary1 ) {
 lignesrd">=
10$s...lult">$x2= //echo ($arrang1);

 rouge2sp;
$ary2 $lt">$ang = //echo ($arrang1);

 rouge3sp;
$ary2 $ult">$x2 = 1omment">//echo ($arrang1);

 rougesp;
$ary2 imagelineomment">//echo lt">1omment">//echo ($arrang1);

 vert2sp;
$ary2 $lt">$ang = 1omment">//echo ($arrang1);

 vert3sp;
$ary2 $ult">$x2 = 1omment">//echo ($arrang1);

 vertsp;
$ary2 imageline= omment">//echo lt">1omment">//echo ($arrang1);

 bleu2sp;
$ary2 $lt">$ang = 1omment">//echo ($arrang1);

 bleu3sp;
$ary2 $ult">$x2 = 1omment">//echo ($arrang1);

 bleusp;
$ary2 imageline= omment">//echo lt">1omment">//echo ($arrang1);

 nbsp;
$ary1 = 1omment">//echo ($arrang1);

 y2sp;
$ary2 = 1omment">//echo ($arrang1);

 />
$x1 = //echo ($arrang1);

 x2sp;
$ary2 = 2omment">//echo lt">1omment">//echo ($arrang1);

 c>uleur>
$arrhead imagesetimageline, $x2, $x2, $x2= omment">//echo arrws 1omment">//echo ($arrang1);

 I-notL />span class="default">imagesetimageline
, $x2($x1, $y1, $x2, $x2= //echo ($arrang1);

 lignes_c>=
$++auss="c}5">$img">$img10($arrang1);

 I-notJpe>,
, 5);
?>
<41550v
41550a href="/manual/vote-note.php?id=42390&page=function.imageline&vote=down" title="Vote down!" class="usernotes-voted">down 41550vpage=fun100iv class="tally" id="242390" title="62% like this..."> 41550vp<>
ruturaj_v at yahoo dot com 4- 4-14 09:44v class="d13e" title="2004-05-14 08:48">13 years ago
= $img">$im">= ){uss="cuss="comment">//echomment"$imgomment">//echomment"=omment"sub04-(e , 0, -4)n>// remove(fileExtensde>uss="comment">//echomment"$arsomment">//echomment"= ".jpg"uring">omment">//echomment"$q omment">//echomment"$b="derC>= < = 255homment"// 255 = white lt">1omment">//ech>//echo lt">1omment">//echo/* lt">1omment">//ech>//echoap;                       &nbp; &nbsb lt">1omment">//ech>//echo+-------------------------+ lt">1omment">//ech>//echo|p;                       &nb">//echo lt">1omment">//ech>//echo|p;         &nbsIMAGEp;         &nbp; &nbs lt">1omment">//ech>//echo|p;                       &nb">//echo lt">1omment">//ech>//echo+-------------------------+ lt">1omment">//ech>//echocp;                       &nbp; &nbsd>//ech>//echo lt">1omment">//echo*/ult">2omment">//echo lt">1omment">//echo$scr_= omment">//echo$width>//echomment"= e-notsx($scr_omment">//echo$heightomment"= e-notsy($scr_omment">//echop;       &nb">//echo lt">1omment">//ech">//ech">//ech"// 1omment">//ech">//ech">//ech"$abXomment"= 0uring">omment">//echop;   &nbs$abYomment"= 0uring">omment">//echop;   &nbs$abX1 = ewidthuring">omment">//echop;   &nbs$abY1"= 0uring">omment">//echop;   &nbs lt">1omment">//ech">//ech">//ech"// omment">//echop;   &nbs$acXomment"= 0uring">omment">//echop;   &nbs$acYomment"= 0uring">omment">//echop;   &nbs$acX1"= 0uring">omment">//echop;   &nbs$acY1 = eheighturing">omment">//echop;   &nbs lt">1omment">//ech">//ech">//ech"// omment">//echop;   &nbs$bdXomment"= ewidth-1uring">omment">//echop;   &nbs$bdYomment"= 0uring">omment">//echop;   &nbs$bdX1"= ewidth-1uring">omment">//echop;   &nbs$bdY1 = eheighturing">omment">//echop;   &nbs lt">1omment">//ech">//ech">//ech"// omment">//echop;   &nbs$cdXomment"= 0uring">omment">//echop;   &nbs$cdYomment"= eheight-1uring">omment">//echop;   &nbs$cdX1 = ewidthuring">omment">//echop;   &nbs$cdY1 = eheight-1uring">omment">//echop;       &nbs lt">1omment">//ech">//ech>//ech"// DRAW LINESp;   &nbs lt">1omment">//ech">//ech">//ech"e-note.ph($scr_= omment">//echop;   &nbse-note.ph($scr_= omment">//echop;   &nbse-note.ph($scr_= omment">//echop;   &nbse-note.ph($scr_= omment">//echop;   &nbsring">omment">//echop; &nbs// ">= 1omment">//ech">//ech">//ech"e-notjpeg(escr_omment">//echop;   &nbse-notde04-0y(escr_1omment"}ult">2omment">//echo lt">1omment">//echoc>= ?>
<38742v
38742a href="/manual/vote-note.php?id=42390&page=function.imageline&vote=down" title="Vote down!" class="usernotes-voted">down 38742vpage=fun100iv class="tally" id="242390" title="62% like this..."> 38742vp<>
ruturaj_v at yahoo dot com 4- 1-05 12:26v class="d13e" title="2004-05-14 08:48">13 years ago
5that helps you create arrows...

$im$segss="os>$a5= 100imageset= retu        } ord">= $x2= $x2*$x2= 5, = $x2= $x2= $x2= 5">$im">$x2= $x2imageset){uss="comment">//echo ($arrang1);

 t
$ar_arrws ) {
 stepimagesetault">1omment">//echo ($arrang1);

 tempsp;
$ary2 $lt">$ang = 1omment">//echo ($arrang1);

 ret
$ar retu&>auss="comment">//echo ($arrang1);

 $fsp;
$ary2 = = //echo ($arrang1);

 $f/>
$arrhead = , $y2 = = $ang = 1omment">//echo ($arrang1);

 fdd_per_ord">,
= = $x2, = , = , = 1omment">//echo ($arrang1);

 fddd_per_ord">,
= , $x2= , = $x2= = = = 1omment">//echo ($arrang1);

 fdddsp;
$ary2 $ult">$x2 , 1omment">//echo ($arrang1);

 fddsp;
$ary2 $ult">$x2 , 1omment">//echo ($arrang1);

 fddd_per_6sp;
$ary2 $*limageline) {
 3r />omment">//echofor imageline
= $ang= = imagesetao ($arrang1);

 looprd">=
//echo ($arrang1);

  retu_pushrd">,
, omment">//echoomment">//echo ($arrang1);

 $fsp;
$ary2 $x2 $ult">$x2 $ult">$x2 , 1omment">//echoomment">//echo ($arrang1);

 $f/>
$arrhead $ult">$x2 $ult">$x2 , 1omment">//echoomment">//echo ($arrang1);

 fddsp;
$ary2 $ult">$x2 , 1omment">//echoomment">//echo ($arrang1);

 fdd_per_o
$t">$ary2 $ult">$x2 , 1omment">//echo}ult">2omment">//echoretur>$x2, $img">$img$ary2 , g$ary2 imagesetamagelineg,ebsp; $y2grrang2$ary2 = 2grrang2$ary2 = imagesetamagelineimagesetauring">g= $ary2 = imageseta">$ary2 = $ary2 = $ary2 = grrang2$ary2 = imageseta">$ary2 , $x2, $x2, forbr />    &nclass="keyird">= $ang= = $x2= = 1omment">//echo ($arrang1);

 e-note.phspan class="default">imagesetimageline
= imagesetault">$x2, = = = imagesetault">$x2, = = = grrang2imagesetimageline1grrang2imagesetimageline5);
?>
<33122v
33122a href="/manual/vote-note.php?id=42390&page=function.imageline&vote=down" title="Vote down!" class="usernotes-voted">down 33122vpage=fun100iv class="tally" id="242390" title="62% like this..."> 33122vp<>
ruturaj_v at yahoo dot com 3-06-17 05:28v class="d14e" title="2004-05-14 08:48">13 years ago
$img">$iml">not , eyw , eyw , ey2 , ey2 , ec>= ult">1>$arrang$c>= = not , ec>= ault">1omment"ifa( yw == ey2 >ult">1omment"$arrangnot , eyw , eyw , ey2 , ey2 , ec>= bs// Vertical >//echo}ult">2omment"elseult">1omment"$arrangault">1ommentp; &nbs$b = eyw -s$m * eywault">1ommentp; &nbsifa( absa( m ) s...lu1 >ult">1ommentomment"$arrangomment">//echo$endxs="maxa( yw , ey2 auring">omment">//echowhilelis$xss...lu$endxs>ult">1omment">//echo$arrang//echo$y = em * ey +s$buring">omment">//echomment"$y == floor i"$y ) ?"$ya = 1 :"$ya = $y - floor i"$y )uring">omment">//echomment"$yb = ceil i"$y ) - eyuring">omment">//echomment"$tempc>= = not , yword">= not , ey , floor i"$y ) ) )uring">omment">//echomment"$tempc>= = $c>= omment">//echomment"$tempc>= = $c>= omment">//echomment"$tempc>= = $c>= omment">//echomment"ifa( yword">= not , etempc>= = = = not , etempc>= = = omment">//echomment"i-notsetpixela( />not , ey , floor i"$y ) , yword">= not , etempc>= = = omment">//echomment"$tempc>= = not , yword">= not , ey , ceil i"$y ) ) )uring">omment">//echomment"$tempc>= = $c>= 1omment">//echoomment"$tempc>= = $c>= 1omment">//echomment"$tempc>= = $c>= 1omment">//echomment"ifa( yword">= not , etempc>= = = = not , etempc>= = = omment">//echomment"i-notsetpixela( />not , ey , ceil i"$y ) , yword">= not , etempc>= = = omment">//echomment"$y ++ault">1omment">//echo}ult">1ommentomment"}ult">1ommentomment"elseult">1ommentomment"$arrangomment">//echo$endys="maxa( yw , ey2 auring">omment">//echowhilelis$yss...lu$endys>ult">1omment">//echo$arrang//echo$x = ( ey - eb ) /a$muring">omment">//echomment"$y == floor i"$x ) ?"$xa = 1 :"$xa = $x - floor i"$x )uring">omment">//echomment"$yb = ceil i"$x ) - exuring">omment">//echomment"$tempc>= = not , yword">= not , floor i"$x ) ,"$y ) )uring">omment">//echomment"$tempc>= = $c>= omment">//echomment"$tempc>= = $c>= omment">//echomment"$tempc>= = $c>= omment">//echomment"ifa( yword">= not , etempc>= = = = not , etempc>= = = omment">//echomment"i-notsetpixela( />not , floor i"$x ) ,"$y , yword">= not , etempc>= = = omment">//echomment"$tempc>= = not , yword">= not , ceil i"$x ) ,"$y ) )uring">omment">//echomment"$tempc>= = $c>= 1omment">//echomment"$tempc>= = $c>= 1omment">//echomment"$tempc>= = $c>= 1omment">//echomment"ifa( yword">= not , etempc>= = = = not , etempc>= = = omment">//echomment"i-notsetpixela( />not , ceil i"$x ) ,"$y , yword">= not , etempc>= = = omment">//echomment"$y ++ault">1omment">//echo}ult">1ommentomment"}ult">1omment"}ult">1 }5">$img">$imEDITOR: Myvprevious id=" contained bugs. Please usass="t one instead.an>?>
<119610v
119610a href="/manual/vote-note.php?id=42390&page=function.imageline&vote=down" title="Vote down!" class="usernotes-voted">down 119610vpage=fun100iv class="tally" id="142390" title="62% like this..."> 119610vp<>
ruturaj_v at yahoo dot com16-07-15 01:40v class="d1e" tile="2004-05-14 08:48">13 years ago
$im">= <>>$arrangewidth"= e-notsx($omment">//echo$height"= e-notsy($omment">//echoI-notL />(e= omment">//echoI-notL />(e= omment">//echoI-notL />(e= omment">//echoI-notL />(e= }5n>?>
<121035v
121035a href="/manual/vote-note.php?id=42390&page=function.imageline&vote=down" title="Vote down!" class="usernotes-voted">down 121035vpage=funno classally" id="042390" title="62% like this..."> 121035vp<>
ruturaj_v at yahoo dot com17- 4-29 11:08v class="d4 monthtle="2004-05-14 08:48">13 years ago
on _vGD"$imgit; .s lt">1Heren>
$im$w=5bs//set your(e.phas="cknessuring">i-notsets="ckness(ei-notl />(e= i-notsets="ckness(ei-notfilledellipsss( />g , ey2 , ey2 , ew ,$w, ec>= ?>
<80816
80816a href="/manual/vote-note.php?id=42390&page=function.imageline&vote=down" title="Vote down!" class="usernotes-voted">down 80816 page=fun50iv class="tally" id="042390" title="62% like this..."> 80816 p<>
ruturaj_v at yahoo dot com 8-02-01 08:10v class="d9e" title="2004-05-14 08:48">13 years ago
http://en.wikipedia.org/wiki/Lissajous_curve"brele>http://en.wikipedia.org/wiki/Lissajous_curvelass):5">$imx = a1 * cos(t/T1auring">ys="a2 * si<(t/T2efault">5">$imYou= !ault">5that helps you create arrows...

,ebsp; $y2g);

$x1 = 2grrang2$t">$ary2 = 10lt">2grrang2);= = imagesetimageline= $ary2 *1omment">//echo>//echoor diebr />      &nbsCane=d Initialize newvGD"/>not bspeamfault">$y2grrang2$ary2 = imagesetimagelineimageseta">$ary2 $y1);
400
); 24rd">, grrang2$ary2 = imagesetimagelineimageseta">$ary2 , $ary2 = $ary2 , ging">grrang2grrang2$ar retu&>auss="cfor imageline= $ang= $x2= = = $ang= = //echo ($arrang1);
ult">1omment">//echo ($arrang1);

 xsp;
$ary2 = = );
span>1omment">//echo ($arrang1);

 ysp;
$ary2 = = );
=
1omment">//echo lt">1omment">//echo//move(t;1omment">//echo ($arrang1);

 poindsrd">,
= 1omment">//echo ($arrang1);

 poindsrd">,
= $x2imageset;>//echo ($arrang1);
1span class="default">imageset}5">$img">$img
grrang2$ararrang2, );, 1g">$imggrrang2$ararrang2$y2grrang2imagesetimagelineimageseta">$ary2 , $x2400);>);
400<>//echo ($arrang1);

 "#423r;
400
);ytars_c>= , ging">grrang21 *r re 10 poinds, we needeto draw 9 e.phs:o lt">1 *r1) poind 0eto 1;o lt">1 *r2) poind 1eto 2; lt">1 *r... lt">1 *r... lt">1 *r9) poind 8eto 9;o lt">1 */ult">1span class="default">imagesetfor imageline= $ang= $x2= $x2= $x2= 1{uss="comment">//echo ($arrang1);

 i-notL />span class="default">imagesetimageline
imageseta">$ary2 , );, = $ary2 , );= , = $ary2 , );, , = $ary2 , );, , = $ary2 , //echo lt">1}5">$img">$imggrrang2imagesetimagelineimagesetstring">grrang2imagesetimagelineimagesetstring">grrang2?>
<80797
80797a href="/manual/vote-note.php?id=42390&page=function.imageline&vote=down" title="Vote down!" class="usernotes-voted">down 80797 page=fun50iv class="tally" id="042390" title="62% like this..."> 80797 p<>
ruturaj_v at yahoo dot com 8-01-31 01:57v class="d9e" title="2004-05-14 08:48">13 years ago
= !ault">5that helps you create arrows...

,ebsp; $y2gageline);= = imagesetimageline= $ary2 *1omment">//echo>//echoor diebr />      &nbsCane=d Initialize newvGD"/>not bspeamfault">$y2grrang2$ary2 = imagesetimagelineimageseta">$ary2 $y1);
400
); 24rd">, grrang2$ary2 = imagesetimagelineimageseta">$ary2 , $ary2 = $ary2 , ging">grrang2grray2 $ar retu&>auss="cfor imageline= $ang= $x2= = = $ang= = //echo ($arrang1);
ult">1omment">//echo ($arrang1);

 xsp;
$ary2 = 1omment">//echo>$ary2 $ary2 = );*);
);
400aur($arrang1);
1omment">//echo lt">1omment">//echo//append(a poind't x-value and(y-valueult">1omment">//echo ($arrang1);

 poindsrd">,
1omment">//echo ($arrang1);

 poindsrd">,
= $x2//echo ($arrang1);
1span class="default">imageset}5">$img">$img
grrang2$ararrang2, );, 1g">$imggrrang2$ararrang2$y2grrang2imagesetimagelineimageseta">$ary2 , $x2400);>);
400<>//echo ($arrang1);

 "#423r;
400, ging">grrang21 *r re 10 poinds, we needeto draw 9 e.phs:o lt">1 *r1) poind 0eto 1;o lt">1 *r2) poind 1eto 2; lt">1 *r... lt">1 *r... lt">1 *r9) poind 8eto 9;o lt">1 */ult">1span class="default">imagesetfor imageline= $ang= $x2= $x2= $x2= 1{uss="comment">//echo ($arrang1);

 i-notL />span class="default">imagesetimageline
imageseta">$ary2 , );, = $ary2 , );= );, = $ary2 , );, , = $ary2 , );, , = $ary2 , //echo lt">1}5">$img">$imggrrang2imagesetimagelineimagesetstring">grrang2imagesetimagelineimagesetstring">grrang2?>
<74856
74856a href="/manual/vote-note.php?id=42390&page=function.imageline&vote=down" title="Vote down!" class="usernotes-voted">down 74856 page=fun50iv class="tally" id="042390" title="62% like this..."> 74856 p<>
ruturaj_v at yahoo dot com 7- 4-30 05:45v class="d10e" title="2004-05-14 08:48">13 years ago
1bool"/>notgrid (bresource" />not, ind ewidth, ind eHeight, ind esizt, mixedeec>= ult">15that helps you create arrows...

,ebspan class="default">imagesetimageline$y2gageline= $ang= gageline= $ang= ging">gageline$ararrang2imagesetimageline= $ary2 = g);
$ararrang2= imagesetimageline= $ary2 $y1);
400
); ">);
400string">grrang2
imagesetimageline= $ary2 = $ary2 = $ary2 = g);
$ararrang2= imagesetimageline= $ary2 400); 4>);
400
); 49rd">= g);400imageline= $ary2 = $ary2 = grrang2= grd">= $ary2 = $ary2 = $ary2 = $ary2 400string">grrang2g);notPNGrd">= grd">= grrang2imagesetimageline= g= notspan class="default">imageseta">$ary2 imageseta">$ary2 = $ary2 , $ary2 , 1{uss="comment">//echoforbr />    &nclass="keyiwspan class="default">imagesetlt">$ang= $x2imagesets...magelineimageset/n>);
,
$x2imageset++){grrang2imagesetimagelineimageseta">$ary2 imageset$arrang2, $ary2 = $ary2 imageset$arrang2, $ary2 imageseta">$ary2 , //echoforbr />    &nclass="keyihrd">= $ang= $x2= = );
,
$x2= imagesetimagelineimageseta">$ary2 = $ary2 = , $ary2 imageseta">$ary2 = , $ary2 , grrang2?>
<56565
56565a href="/manual/vote-note.php?id=42390&page=function.imageline&vote=down" title="Vote down!" class="usernotes-voted">down 56565 page=fun50iv class="tally" id="042390" title="62% like this..."> 56565 p<>
ruturaj_v at yahoo dot com 5-09-07 10:39v class="d12e" title="2004-05-14 08:48">13 years ago
15that helps you create arrows...1span class="default">imagesetf>400imageline= imagesetaarrang2imagesetaarrang2, , 1{uss="comment">//echo ($arrang1);

 $ang23r;
400=imageline
, $-o ($arrang1);

 $end_yspan class="default">imageset),imageline
$-o ($arrang1);

 $start_xspan>15that omment">//echo ($arrang1);

 $dist_xspan>$ang, 400sstring">omment">//echo ($arrang1);

 $dist_yspan class="default">imagesetlt">$ang
, 400sstring">omment">//echo lt">1omment">//echo ($arrang1);

 p1xspan>$ang, $+o ($arrang1);

 $dist_xspan>omment">//echo ($arrang1);

 $p1yspan class="default">imagesetlt">$ang
, $+o ($arrang1);

 $dist_yspan class="default">imageset)string">omment">//echo ($arrang1);

 $p2xspan>$ang, $+o ($arrang1);

 $dist_xspan>omment">//echo ($arrang1);

 $p2yspan class="default">imagesetlt">$ang
, $+o ($arrang1);

 $dist_yspan class="default">imageset)string">omment">//echo ($arrang1);

 $p3xspan>$ang, $-o ($arrang1);

 $dist_xspan>omment">//echo ($arrang1);

 $p3yspan class="default">imagesetlt">$ang
, $-o ($arrang1);

 $dist_yspan class="default">imageset)string">omment">//echo ($arrang1);

 $p4xspan>$ang, $-o ($arrang1);

 $dist_xspan>omment">//echo ($arrang1);

 $p4yspan class="default">imagesetlt">$ang
, $-o ($arrang1);

 $dist_yspan class="default">imageset)string">omment">//echo ss="comment">//echo ($arrang1);

 $aretuspan class="default">imagesetl retu&>$ary2
= imagesetamagelineimagesetamagelineimagesetamagelineimageset)tring">omment">//echo ($arrang1);

 i-notfilledpolygon
$(">$ary2 = $ary2 imageset, imagelineimageset)/n>);, $ary2 $auring">}5ing">grrang2grrang2,ebsp; $y2gageline$ararrang2    &nrd">);= $ary2 = not bspeam fault">$y2gageline$ary2 = $ary2 $y1);
400
); ">);
400string">grrang2
$ary2 = $ary2 , $ary2 , $ary2 , grrang2400imageline= $ary2 = $ary2 = $ary2 = $ary2 = = = grrang2400imageline= $ary2 = $ary2 = $ary2 = $ary2 = = = //echo ss="cgrrang2400imageline= $ary2 = $ary2 = $ary2 = $ary2 = = = grrang2400imageline= imagesetimageline= g?>
<49429
49429a href="/manual/vote-note.php?id=42390&page=function.imageline&vote=down" title="Vote down!" class="usernotes-voted">down 49429 page=fun50iv class="tally" id="042390" title="62% like this..."> 49429 p<>
ruturaj_v at yahoo dot com 5-01-27 07:50v class="d12e" title="2004-05-14 08:48">13 years ago
s,3etc.>ult">15that helps you create arrows...

15that // User-def/spd valuesring">gageline$ararrang2$uomment">//echo>//echo>//echo>//echo>//echo>//echo>//echo>//echo>//echogrrang215ageline$ararrang2, //echo>//echo>//echo>//echo>//echo>//echo>//echo>//echo>//echogrrang215ageline$ararrang2= //echo>//echo>//echo>//echo>//echo>//echo>//echo>//echo>//echo>//echo>//echogrrang2gageline$ary2 = $ary2 = $ary2 = //echo>//echo>//echogrrang2grray2 $ary2 $y1);
400
); ">);
400strrrang2
gthat //Calcul gageline$ararrang2= 400);eminTilesrd">= //echo>//echo>//echo>//echo>//echogrrang2gageline$ararrang2= = $x2= 15ageline$ararrang2$$arrang2= = //echo>//echo>//echo>//echo>//echo>//echo>//echo>//echo>//echo>//echo>//echogrrang215ageline$ararrang2$$arrang2= = //echo>//echo>//echo>//echo>//echo>//echo>//echo>//echo>//echo>//echo>//echogrrang215ageline$ararrang2$$arrang2= );= = 15ageline$ararrang2$$imageline$+o ($arrang1);

 $ySide
$) +o ($arrang1);

 $ySide
$uomment">//echo rrang2of t;15that // ">= not and(aspan>= 15ageline= 400);eboa= grrang2$ararrang2= imagesetimagelineimageseta">$ary2 = );= $ary2 = );= $ary2 = );= grrang2$ararrang2= imagesetimagelineimageseta">$ary2 = );= $ary2 = );= $ary2 = );= ging">grrang215ageline$ararrang2= $as = 1{uss="comment">//echofor imageline$ararrang2= $ary2 $s... = = $x2= 1omment">//echo{uss="comment">//echoomment">//echo ($arrang1);

 $x1>
$ararrang2$$arrang2$+o ($arrang1);

 $ird">=
= , 1omment">//echoomment">//echo ($arrang1);

 $y1>
$ararrang2= );, 1omment">//echoomment">//echo ($arrang1);

 $y1Dif>
$arimageline= );, $$imageline= $)uring">ging">omment">//echoomment">//echo ($arrang1);

 $x2>
$ararrang2$+o ($arrang1);

 $xSiderd">=
1omment">//echoomment">//echo ($arrang1);

 $y2>
$ararrang2= 1omment">//echoomment">//echo ($arrang1);

 $y2Dif>
$ar ($arrang1);

 $ySide
$uring">ging">omment">//echoomment">//echo ($arrang1);

 $x3>
$ararrang2$+o ($arrang1);

 $xSiderd">=
1ging">omment">//echoomment">//echoif>imageline$s... = 1omment">//echo>//echo>//echo{uss="comment">//echoomment">//echoomment">//echo ($arrang1);

 e-note.phspan class="default">imagesetimageline
imageseta">$ary2 imageseta">$ary2 $-o ($arrang1);

 $y1Difspan class="default">imageseta">$ary2
, $ary2 $-o ($arrang1);

 $y1Dif>
$-o ($arrang1);

 $y2Difspan class="default">imageseta">$ary2
= omment">//echoomment">//echoomment">//echo ($arrang1);

 e-note.phspan class="default">imagesetimageline
imageseta>//echo ($arrang1);

 $x1span class="default">imageseta">$ary2
$+o ($arrang1);

 $y1Difspan class="default">imageseta">$ary2
, $ary2 $+o ($arrang1);

 $y1Dif>
$+o ($arrang1);

 $y2Difspan class="default">imageseta">$ary2
= omment">//echoomment">//echoomment">//echo ($arrang1);

 e-note.phspan class="default">imagesetimageline
imageseta">$ary2 , $ary2 $-o ($arrang1);

 $y1Dif>
$-o ($arrang1);

 $y2Difspan class="default">imageseta">$ary2
, $x2$-o ($arrang1);

 $y1Difspan class="default">imageseta">$ary2
= omment">//echoomment">//echoomment">//echo ($arrang1);

 e-note.phspan class="default">imagesetimageline
imageseta">$ary2 , $ary2 $+o ($arrang1);

 $y1Dif>
$+o ($arrang1);

 $y2Difspan class="default">imageseta">$ary2
, $x2$+o ($arrang1);

 $y1Difspan class="default">imageseta">$ary2
= omment">//echoomment">//echo}uss="comment">//echoomment">//echoomment">//echoomment">//echo ing">omment">//echoomment">//echo ($arrang1);

 e-note.phspan class="default">imagesetimageline
imageseta">$ary2 imageseta">$ary2 $-o ($arrang1);

 $y1Difspan class="default">imageseta">$ary2
imageseta">$ary2 $-o ($arrang1);

 $y1Dif>
$+o ($arrang1);

 $siderd">=
$ary2 = //echoomment">//echoomment">//echo ing">omment">//echoomment">//echo ($arrang1);

 e-note.phspan class="default">imagesetimageline
imageseta">$ary2 $x2$+o ($arrang1);

 $y1Difspan class="default">imageseta">$ary2
$x2$+o ($arrang1);

 $y1Dif>
$-o ($arrang1);

 $siderd">=
$ary2 = //echoomment">//echoomment">//echo ing">omment">//echo}uss="comment">//echo>$ary2 $++uring">}5ing">ging">grrang2grrang2,ebspan class="default">imagesetimageline$y2
gagelineimagesetimagelineimagesetstring">grrang2imagesetimagelineimagesetstring">grrang2?>
<36236
36236a href="/manual/vote-note.php?id=42390&page=function.imageline&vote=down" title="Vote down!" class="usernotes-voted">down 36236 page=fun50iv class="tally" id="042390" title="62% like this..."> 36236 p<>
ruturaj_v at yahoo dot com 3-10-01 09:33v class="d13e" title="2004-05-14 08:48">13 years ago
# yip, it ageks - e=d very good - but faster ring"># (below 3 sec)ss=423ot;# i saw ; ring"># t;# _t t;of t;# e=dhi ring"># ;# (log42g _t delthreen.it com) pos# on ss=.net and(en=42ced/optimiz/d by myself :) ring"> ring">f>not, ex1, ey1, ex2, ey2, er,$g,$b) { ring"> ring">$fontfi2390arial.ttf"; # t;$04-="" ; # t;= no>$aryo2 x1, ey1, ex2, ind eHe= ">$ary2 ring">f>( />not,;x1, ey1, ex2, ">omrarr==f>yc;f>yc =f>tmp;x1, ey1 $tmp =f><2;f><2 =f>y2;f>y2 =f>tmp;x1, ey1 $swapx =f cla;x1, ey1 }x1, ey1, ex2, im =f(float)((f>y2 -f>yc ) / (f><2 -f>yc -f>m*># iorigispanlo-nlw_t tre. r"keynsa bl_lo-nec) ring" <56565
spe. rupwn# "> keenl aand(onpernoteliiif_cdow's. s (~7 sec) rin">om!$swapx, ex1, ey1 efaul$x =f # tx;f>< <++, e s (~7 s">omme">ommen$y =f(/sp)(>m*>< + ot,;">ommens (~7 s">omme">ommenring"rin2004> ring">f>ind ewtgrixoftL, s (~7 s">omme">ommen$nd eHofty2, er,$, # t);x1, ey1 }x1, ey1} else ex1, ey1 efaul$x =f # tx;f>< <++, e s (~7 s">omme">ommen$y =f(/sp)(>m*>< + ot,;">ommens (~7 s">omme">ommenring"rin2004> ring">f>ind ewtgriygrixofs (~7 s">omme">ommen$nd eHofty2, er,$, # t);x1, ey1choommenx1, ey1}s (~7 sec) rin}n>?>
8010 56565a href="/manual/vote-note.php?id=42390&page=function.imageline&vote=up" title="8010 56565a href="/manual/vote-note.php?id=42390&page=function.imageline&vote=down" title="Vote down!" class8010down 36236 p-2ge=fun50iv class="tally" id="042398010 36236 p<> Anonymous"#42390" clameid _t gmxa.it atrduser">rutur8010
5-09-07 10:39v class="d12e" title="2004-05-14 08:4801013 years ago
565sgin. raengtt tspan claformadlassdec t;<# _pplybut,aph n-gttegtopscdobut,fact classatreratbut,annring".pan class="eClre.should t;f aken "> ensurownof tsigneeid sa erro 5- fapx8ng"> rd(onqes-ityl and(onring". Ffau/span>< :pan class="efault">imagesetstring">15that helps $$arrang1);

 $p4xspan>$+o arrang1);

 $p4xspan>$ary2 imagesetstring">grrarrang1);

 e-note.phspan class="default">imagesetimageline
= = = = = imagesetstring">grrarrang1);

 e-note.phspan class="default">imagesetimageline
= = = = = imagesetstring">grranan class="defan cling">irstnly r ?>
<56565
2184 56565a href="/manual/vote-note.php?id=42390&page=function.imageline&vote=up" title="2184 56565a href="/manual/vote-note.php?id=42390&page=function.imageline&vote=down" title="Vote down!" class2184down 36236 p-1ge=fun50iv class="tally" id="042392184 36236 p<> ajt>odiLog4236236 ixshop2390" claevilover= rutu52184
5-09-07 10:39v class="d12e" title="2004-05-14 08:4218413 years ago
imagesetstring">15that helps fault">$++uring">}5ing">ging">grAn easy tian clid="HshowiLoghowi-no d sfu u$arring()az/d by my"> ht>of tgrodiginsThe s="ire heigng2$ar 255x/spaforeground, background c>= 15ageline$ararrang2$ary2 $y1= g$a$ary2 imagesetiplotDeline$s...256ss="keywospan class="keyword"grd">= $++uring">}5ing">ging">grDdiv clly r86n.mov ii>.php?r86n.makeii>.l ge rd(ongrodiginring"> t">//echo ing">omment">//echo}uss="comment">//ech">$arringg1);

 e-note.phspan class="default">imagesetimageline
$a$ary2 = $y1);
400<"plotDss="keywospan class="keyword">);
400<">$ary2
= );
400<"plotDss="keywospan class="keyword">);
400<"plotDss="keywospan class="keyword"xspan>omment">//echo lotDss="keywospan class="keyword"womment">//echHgrrang2,ebspan class="default">imagesetimageline$y2
$arPineimagesetimageline= $arng2imagesetimageline= imagesetstring">grrang2?>
<56565
61301 56565a href="/manual/vote-note.php?id=42390&page=function.imageline&vote=up" title=61301 56565a href="/manual/vote-note.php?id=42390&page=function.imageline&vote=down" title="Vote down!" clas61301down 36236 p-1ge=fun50iv class="tally" id="042361301 36236 p<> fatpratmatt href="#42390" claevilover= rutu61301 5-09-07 10:39v class="d12e" title="2004-05-14 08:6130113 years ago
fapxcros clasasimpleeid= imagesetstring">15that helps fault">$++uring">}5ing">ging">gr">$ar Cros cby Matt Evans"ire heigima -dult">1resource"ire heigix -dxsnly "ire heigind eur -drrannd eur and(oncros "ire hhelps fault">$++uring">}5iass="keimagesetf>"grrangoimagesetimass="keywospan class="keyword">);
400<"geline
$+o eline$+oind line$aass="keywospan class="keyword">);
400<"nd eureline
1ommenass="default">imagesetstring">grrarrang1);

 e-note.phspan class="default">imagesetimass="keywospan class="keyword">);
400<"geline
= = );$+o eline= = );$+ogeline= = );$+o eline= = );$+ond eurelineimagesetstring">grrarrang1);

 e-note.phspan class="default">imagesetiman>);$+ogeline= = );$+o eline= );
400<"geline
= = );$+o eline= $+ond eureline$++uring">}5ing">ging">grrang2
imagesetstring">grrangoimagesetimass="keywospan class="keyword">);
400<5$ary2
= = $+ongoimagesetstring">grrang2?>
<36236
667 36236a href="/manual/vote-note.php?id=42390&page=function.imageline&vote=up" title="V667 36236a href="/manual/vote-note.php?id=42390&page=function.imageline&vote=down" title="Vote down!" class=667down 36236 p-1ge=fun50iv class="tally" id="0423s=667 36236 p<>
rutura667 3-10-01 09:33v class="d13e" title="2004-05-14 08:4866713 years ago
# e=dhi# (log42g _t delthreen.it com) pos# on ss=.net and(e pan class="eng"># elre.sxt" charras i made: by doob1. charradao$e/>claspan cla90">s (no index_varm4239) by doob2. charradargb 004ra by my"> logical.shift by doob3. reducbut,fspan clacdow'span class="ez/d by myselfQSring"> ring">>not, ehelps $icr=$r;helps $icg=$g;helps $icb=$b;1, ey1 $/spae= ">$ary2 ring">$icr>$icg>$icbgspan cl ">omryc ==f>y2) 390"> 565s> ring">>omrac ==f>x2) {t">//echoomment">//">ommenring" 565s> ring">>y2 -f>yc) / (><2 -f>yc -f>m *f>omabs ($m) 1ommena, ey1 $x =f/div(aw1otx2)span cl $endx =f/axv(aw1otx2)+c;pan class="e whr,$ul$x m *f>< + otspan cl $y ==fflofaul$y) ? $ya =f1 : $ya =fiy -dflofaul$y)span cl $yb =fceilul$y) -f>yspan cl 1, ey1 $trgb = ">$ary2 ring">><,flofal$y))span cl $tcr =f(>trgb grragrra 16) 6a h 0xFFspan cl $tcg =f(>trgb grragrra 8) 6a h 0xFFspan cl $tcb =f>trgb g6a h 0xFFspan cl a90">set>of t > ring">><,flofaul$y),rarrang2 ring">($tcr * $ya + oicr * $yb),pan cl($tcg * $ya + oicg * $yb),pan cl($tcb * $ya + oicb * $yb))grd">= $trgb = ">$ary2 ring">><,ceill$y))span cl $tcr =f(>trgb grragrra 16) 6a h 0xFFspan cl $tcg =f(>trgb grragrra 8) 6a h 0xFFspan cl $tcb =f>trgb g6a h 0xFFspan cl a90">set>of t > ring">><,ceilul$y),rarrang2 ring">($tcr * $yb + oicr * $ya),pan cl($tcg * $yb + oicg * $ya), pan cl($tcb * $yb + oicb * $ya))grd">= $< +< } # whr,$_x_endspan>< } # if_endspan>< else e # else_abs_endspan>= $trgb = ">$ary2 ring">flofal$x),$y)span cl $tcr =f(>trgb grragrra 16) 6a h 0xFFspan cl $tcg =f(>trgb grragrra 8) 6a h 0xFFspan cl $tcb =f>trgb g6a h 0xFFspan cl a90">set>of t > ring">flofaul$x),$y,rarrang2 ring">($tcr * $xa + oicr * $xb),pan cl($tcg * $xa + oicg * $xb),pan cl($tcb * $xa + oicb * $xb))grd">= $trgb = ">$ary2 ring">ceill$x),$y)span cl $tcr =f(>trgb grragrra 16) 6a h 0xFFspan cl $tcg =f(>trgb grragrra 8) 6a h 0xFFspan cl $tcb =f>trgb g6a h 0xFFspan cl a90">set>of t > ring">ceilul$x),$y,rarrang2 ring"> ($tcr * $xb + oicr * $xa),pan cl($tcg * $xb + oicg * $xa),pan cl($tcb * $xb + oicb * $xa))grd">= $y +< }# whr,$_y_endspan>< }# else_abs_endspan>< }# else_y=y_x=x_end pan cl}# selfOSring_ends>?>
<36236 98192 36236a href="/manual/vote-note.php?id=42390&page=function.imageline&vote=up" title=98192 36236a href="/manual/vote-note.php?id=42390&page=function.imageline&vote=down" title="Vote down!" clas98192< down 36236 p-2ge=fun50iv class="tally" id="042398192< le="62% like this..."> 36236 p<> dowennreenhot) posee_couturier _t graffitin.it netrduser">rutu98192
3-10-01 09:33v class="d13e" title="2004-05-14 08:9819213 years ago
d , ">odullness I-10reine- remov i:))g pan class="efault">imagesetstring">15that helps fault">$++uring">}5ing">ging">gz/d by myself rin(resource ring">/spa$x0>/spa$y0>/spa$w1o/spa$y1o/spa$ly ine$++uring">}5iass="keimagesetf>self rinspan>imagesetimageline400<"g$ary2 = = = $+ond ereline= $+orrang1);

 $y2Dif>
$a$ary2 $-orodiue$+oddF_$arrang1);

 $p4x
$a$$+oddF_yrang1);

 $y2Dif><2rd">=
$-orodiue$+o$arrang1);

 $p4x
$a$ary2 1omment">//echoomment">//echo rang1);

 $y2Dif>
$aorodiueomment">//echoomment">//echo ($arrang1);

 e-note.phspan class="default">imagesetimageline
400<"g$ary2 = $x2$+orodiue$+o>$ary2 $x2$+orodiue$+ond erelineomment">//echoomment">//echo ($arrang1);

 e-note.phspan class="default">imagesetimageline
400<"g$ary2 = $x2$-orodiue$+o>$ary2 $x2$-orodiue$+ond erelineomment">//echoomment">//echo ($arrang1);

 e-note.phspan class="default">imagesetimageline
400<"g$">$x2$+orodiue= = $x2$+orodiue= = omment">//echoomment">//echo ($arrang1);

 e-note.phspan class="default">imagesetimageline
400<"g$">$x2$-orodiue= = $x2$-orodiue= = /span>imageseti$arrang1);

 $p4
$s... eline=
imagesetirrang1);

 $y2Difgrrax
$a$ary2 = 1omment">//ecan>$s... eline= $+oddF_yrang1);

 $y2Dif+x
$a/n>);, imagesetirrang1);

 $y2Dif+x
$aoddF_yn>);, //echo ing">omment">//echo}uss="comment">//echogelineomment">//echoomment">//echoddF_$arrang1);

 $p4+x
$a/n>);, imagesetirrang1);

 $y2Dif+x
$aoddF_$arrang1);

 $p4;/span>omment">//echoomment">//echo ($arrang1);

 e-note.phspan class="default">imagesetimageline
400<"g$">$x2$+o ary2 = $x2$+o eline= $x2$+o ary2 = $+o eline= omment">//echoomment">//echo ($arrang1);

 e-note.phspan class="default">imagesetimageline
400<"g$">$x2$-o ary2 = $x2$+o eline= $x2$-o ary2 = $x2$+o eline= omment">//echoomment">//echo ($arrang1);

 e-note.phspan class="default">imagesetimageline
400<"g$">$x2$+o ary2 = $x2$-o eline= $x2$+o ary2 = $x2$-o eline= omment">//echoomment">//echo ($arrang1);

 e-note.phspan class="default">imagesetimageline
400<"g$">$x2$-o ary2 = $x2$-o eline= $x2$-o ary2 = $x2$-o eline= omment">//echoomment">//echo ($arrang1);

 e-note.phspan class="default">imagesetimageline
400<"g$">$x2$+o eline$+oy$">$x2$+o ary2 = $x2$+o eline$+oy$">$x2$+o ary2 = omment">//echoomment">//echo ($arrang1);

 e-note.phspan class="default">imagesetimageline
400<"g$">$x2$-o eline$+oy$">$x2$+o ary2 = $x2$-o eline$+oy$">$x2$+o ary2 = omment">//echoomment">//echo ($arrang1);

 e-note.phspan class="default">imagesetimageline
400<"g$">$x2$+o eline$+oy$">$x2$-o ary2 = $x2$+o eline$+oy$">$x2$-o ary2 = omment">//echoomment">//echo ($arrang1);

 e-note.phspan class="default">imagesetimageline
400<"g$">$x2$-o eline$+oy$">$x2$-o ary2 = $x2$-o eline$+oy$">$x2$-o ary2 = /span>= $x2imagese'imagelineimagesetimageline$a>grrang2cland erelineimageset6>$ary2 = /pan class="default">imagesetispaeline$a>grrang2
 e-note.phspan class="default">imagesetimageline
= = rd">= );/pan class="default"ng">ging">gu u/pan class="default">imagesetr agekCirc,$g1);

 e-note.phspan class="default">imagesetimageline
= = = = = = /pan class="default">imageset>gagelineimagesetimageline= imagesetstring">grrang2imagesetimageline= imagesetstring">grrang2?>
<36236 9345 36236a href="/manual/vote-note.php?id=42390&page=function.imageline&vote=up" title=9345 36236a href="/manual/vote-note.php?id=42390&page=function.imageline&vote=down" title="Vote down!" clas9345<
down 36236 p-4ge=fun50iv class="tally" id="04239345< default"like this..."> 36236 p<> darrenreena> 4hostbut,390" claevilover= rutu9345 3-10-01 09:33v class="d13e" title="2004-05-14 08:934513 years ago
$panfbut,as="#4ph/a> (Youpolnt ne. rany direct cysen=42ced/optimifault">imagesetstring">15that fs (~7 sHgrrang2,ebspan class="default">imagesetimageline/pan class="default">imagesetipicineimageset36$ary2 = imagesetipicHeimageset2>$ary2 imagesetipiclineimagesetrarrang2imagesetipicine= = gerd">= imageseticWhi/san>imagesetrarran2 = rd">= rd">= imagesetrarraFilledRectang,$g1);

 e-note.phspan class="default">imagesetipicline
= = = gerd">= = gerd">= = imageseticRedan>imagesetrarran2 = rd">= = imageseticBlusan>imagesetrarran2 = = = imageset$curXan>imageset$ary2 imageseticurYan>imagesetopicHeimageset$ary2 = gsr />imagesetinewXan>imageset$curXan>= imagesetinewYan>= );imagesetdeg2radan>= );imagesetrarra rinspan>imagesetipicline= = = = = imageset$curXan>imageset$newXan>imageseticurYan>imagesetonewYan>imageset$curXan>imageset$ary2 imageseticurYan>imagesetopicHe= );imageset$ary2 = gsr />imagesetinewXan>imageset$curXan>= imagesetinewYan>= );imagesetdeg2radan>= );imagesetrarra rinspan>imagesetipicline= = = = = imageset$curXan>imageset$newXan>imageseticurYan>imagesetonewYan>imageset$cBlackan>imagesetrarran2 = = = imagesetrarra rinspan>imagesetipicline= = = = ggrd">= imagesetrarra rinspan>imagesetipicline= = gerd">= );= ged">= gerd">= );= imagesetrarraPNGspan>imagesetipiclineimagesetrarrang2imagesetipiclineimageset>grrang2 sectv id="Vd42390"> 36236a hredirect=http://fr2.at chiprnotes-vfa/ id="Vd42390"> 362.at etlmagesrc='/a90">s/age=fuadd@2x.nbs' alt='add a age=' wne add a age=n> dot >e=fun5