![]() |
Language Reference » Drawing functions » drawAntialiasPixel
|
|
Latest updates
Toolbox
Google AdSense
|
drawAntialiasPixel - Drawing alpha pixels This function allows you to draw aliased alpha pixels on your pictures. It is possible to tune the rendering by playing with the $Format array. To learn more about this please read the Format array guide. Pixels like all simple drawing functions are supporting anti-alias and shadows. drawAntialiasPixel is a core function of pChart. A lot of internal drawing methods are based on it as the whole antialiasing processing is done trough it. Antialias can only be done on a pixel unit. To learn more on antialiasing, read this article. Calling this function
drawAntialiasPixel($X,$Y,$Format="");Where : X,Y are the coordinate of the pixel.
Format is an array containing the drawing parameters of the pixel. Customisation array - Tune up your pixel! It is possible to customize the pixel rendering by playing with this array. Providing a detailled configuration is not mandatory, by default the pixel will be drawn black with no transparency. The pixel color can be set with R, G, B.
The alpha transparency factor can be set with Alpha. Sample script ![]() for($X=0;$X<=160;$X++) { for($Y=0;$Y<=160;$Y++) { /* Play with the color / transparency factor */ $PixelSettings = array("R"=>128,"G"=>255-$Y,"B"=>$X,"Alpha"=>cos(deg2rad($X*2))*50+50); /* Draw with antialiasing (adding +.4 to the pixel X position) */ $myPicture->drawAntialiasPixel($X*2+20.4,$Y+45,$PixelSettings); /* Draw continuous pixels */ $myPicture->drawAntialiasPixel($X+400,$Y+45,$PixelSettings); } } This will draw two areas with a computed gradient of color/alpha.
© Copyrights
Components used on this web site : Famfamfam icons has been made by Mark James, Rounded corners lite has been coded by Cameron Cooke and Tim Hutchison, SyntaxHighlighter has
been written by Alex Gorbatchev. pChart and this web site have been created by Jean-Damien POGOLOTTI. This documentation contains 185 pages and 56 comments. 413 users have registered.
This page has been rendered in 0,01 seconds. Wiki revision 1.37.
|