Login Register Wishes Forum About
Language Reference » Drawing functions » drawAntialiasPixel
Help topics
Latest updates
4699d  replaceImageMapTitle
4699d  replaceImageMapValues
4699d  createFunctionSerie
4699d  setAbsicssaPosition
4699d  negateValues
  Download as PDF
  Print this page
  Share this page
  Create an account
  Feed the updates!
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
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

     /* 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) */

     /* Draw continuous pixels */

This will draw two areas with a computed gradient of color/alpha.
Last updated on 12/09/2010 
by Jean-Damien 
Linked resources
  There is no linked topic yet.
Community comments
  No comments have been posted yet.
© 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. 415 users have registered. This page has been rendered in 0,01 seconds. Wiki revision 1.37.