★ wanayoo — archive 1999 http://php.net/manual/cs/function.imagedashedline.phpNouvelle recherche | Portail wanayoo
PHP Thursday, March 29, 2001  
downloads | documentation | faq | support | reporting bugs | links 

search for in the  

lookup:
PHP ManuálPHP Manuál
GraphicsGraphics
 GetImageSizeGetImageSize
 ImageArcImageArc
 ImageCharImageChar
 ImageCharUpImageCharUp
 ImageColorAllocateImageColorAllocate
 ImageColorDeAllocateImageColorDeAllocate
 ImageColorAtImageColorAt
 ImageColorClosestImageColorClosest
 ImageColorExactImageColorExact
 ImageColorResolveImageColorResolve
 ImageGammaCorrectImageGammaCorrect
 ImageColorSetImageColorSet
 ImageColorsForIndexImageColorsForIndex
 ImageColorsTotalImageColorsTotal
 ImageColorTransparentImageColorTransparent
 ImageCopyImageCopy
 ImageCopyResizedImageCopyResized
 ImageCreateImageCreate
 ImageCreateFromGIFImageCreateFromGIF
 ImageCreateFromJPEGImageCreateFromJPEG
 ImageCreateFromPNGImageCreateFromPNG
 ImageCreateFromWBMPImageCreateFromWBMP
 ImageCreateFromStringImageCreateFromString
 ImageDashedLineImageDashedLine
 ImageDestroyImageDestroy
 ImageFillImageFill
 ImageFilledPolygonImageFilledPolygon
 ImageFilledRectangleImageFilledRectangle
 ImageFillToBorderImageFillToBorder
 ImageFontHeightImageFontHeight
 ImageFontWidthImageFontWidth
 ImageGIFImageGIF
 ImagePNGImagePNG
 ImageJPEGImageJPEG
 ImageWBMPImageWBMP
 ImageInterlaceImageInterlace
 ImageLineImageLine
 ImageLoadFontImageLoadFont
 ImagePolygonImagePolygon
 ImagePSBBoxImagePSBBox
 ImagePSEncodeFontImagePSEncodeFont
 ImagePSFreeFontImagePSFreeFont
 ImagePSLoadFontImagePSLoadFont
 ImagePsExtendFontImagePsExtendFont
 ImagePsSlantFontImagePsSlantFont
 ImagePSTextImagePSText
 ImageRectangleImageRectangle
 ImageSetPixelImageSetPixel
 ImageStringImageString
 ImageStringUpImageStringUp
 ImageSXImageSX
 ImageSYImageSY
 ImageTTFBBoxImageTTFBBox
 ImageTTFTextImageTTFText
 ImageTypesImageTypes
 read_exif_dataread_exif_data

previousImageCreateFromString
ImageDestroynext

Last updated: Sat, 17 Mar 2001
view this page in English | Brazilian Portuguese | Czech | Dutch | French | German | Hungarian | Italian | Japanese | Korean | Spanish | Plain HTML

ImageDashedLine

(PHP 3, PHP 4 )

ImageDashedLine -- Draw a dashed line

Description

int imagedashedline (int im, int x1, int y1, int x2, int y2, int col)

ImageDashedLine() draws a dashed line from x1, y1 to x2, y2 (top left is 0, 0) in image im of color col.

See also ImageLine().

User Contributed Notes: ImageDashedLine
twan@ecreation.nl
22-Mar-2001 01:14
If you want to create dotted lines instead of dashed, use these functions:

function horizontalDottedLine($im, $x1, $x2, $y)
{
$color= ImageColorAllocate($im, 0, 0, 0);
$x_cur = $x1;

while ($x_cur <= $x2)
{
ImageSetPixel($im, $x_cur, $y, $color);
$x_cur += 2;
}
return $im;
}


function verticalDottedLine($im, $y1, $y2, $x)
{
$color= ImageColorAllocate($im, 0, 0, 0);
$y_cur = $y1;

while ($y_cur <= $y2)
{
ImageSetPixel($im, $x, $y_cur, $color);
$y_cur += 2;
}
return $im;
}

These functions both return an image identifier, so use it as follows:

$im = imageDottedLine($im, 1, 100, 50);

previousImageCreateFromString
ImageDestroynext

Last updated: Sat, 17 Mar 2001
add note | about notes

show source | credits | stats | mirror sites:  

Copyright © 1998-2001 The PHP Group
All rights reserved.
This mirror generously provided by: chek.com
Last updated: Thu Mar 29 12:50:08 2001 EST