Contents
Login Register Wishes Forum About
Language Reference » Format Array
Help topics
Latest updates
4704d  replaceImageMapTitle
4704d  replaceImageMapValues
4704d  createFunctionSerie
4705d  setAbsicssaPosition
4705d  negateValues
Toolbox
  Download as PDF
  Print this page
  Share this page
  Create an account
  Feed the updates!
Google AdSense
Format Array

Almost all drawing fonctions can be tunned by manually feeding rendering parameters like color, transparency,.. This parameters are given to the function within a 2 dimensionnal array.

Feeding the array

Arrays are easy to use in PHP. In this descriptive array, we have to provide a couple of values : the name of the parameters will be used as a key and the value will be provided rawly :
 $myArray = array("Alpha"=>50);

..this will associate the value 50 with the parameter Alpha. Basically, drawing function will at least require a color that will be composed of 3 values R,G,B :
 $myArray = array("R"=>191,"G"=>215,"B"=>59);

You can also use a less compact method to fill the array :
 $myArray["R"]=191;
 $myArray["G"]=215;
 $myArray["B"]=59;

Options may change

When calling a drawing function refer to its documentation. The drawFilledCircle for example have many parameters that can be tuned :

The fill color can be set with R, G, B.
The border color can be set with BorderR, BorderG, BorderB.
You can use the Surrounding option to define the border color. This value will be added to the R,G,B factors to define the border color.
The alpha transparency factor can be set with Alpha

This may lead in a long configuration array :
 $myOptions=array("R"=>191,"G"=>215,"B"=>59,"BorderR"=>211,"BorderG"=>235,"BorderB"=>79,"Alpha"=>80);
Last updated on 12/06/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.