Class: 3DBarGraph (0.1)

Class to create 3D bar graphs.
Credits to: Jeph

Variables

array 3DBarGraph::bar_bgcolor
array 3DBarGraph::bar_bordercolor
int 3DBarGraph::bar_height
int 3DBarGraph::bar_padding
int 3DBarGraph::bar_textfont
int 3DBarGraph::bar_width

Methods

3DBarGraph::DrawGraph ( $file )
3DBarGraph::SetBarBackgroundColor ( $red , $green , $blue )
3DBarGraph::SetBarBorderColor ( $red , $green , $blue )
3DBarGraph::SetBarDimensions ( $width , $height )
3DBarGraph::SetBarFont ( $font )
3DBarGraph::SetBarPadding ( $padding )

3DBarGraph::bar_bgcolor ^ Top | ^ Variables | ^ Methods
Bar background color

  Type:
        Array(int, int, int)

  Default:
        Array(69, 129, 194)


3DBarGraph::bar_bordercolor ^ Top | ^ Variables | ^ Methods
Bar border color

  Type:
        Array(int, int, int)

  Default:
        Array(39, 78, 120)


3DBarGraph::bar_height ^ Top | ^ Variables | ^ Methods
Bar height

  Type:
        int

  Default:
        8


3DBarGraph::bar_padding ^ Top | ^ Variables | ^ Methods
Bar padding (distance to borders)

  Type:
        int

  Default:
        5


3DBarGraph::bar_textfont ^ Top | ^ Variables | ^ Methods
Bar font (x text)

  Type:
        int

  Default:
        2


3DBarGraph::bar_width ^ Top | ^ Variables | ^ Methods
Bar width

  Type:
        int

  Default:
        32


3DBarGraph::DrawGraph() ^ Top | ^ Variables | ^ Methods
Draw graph
If no file given, output will be stdout

  Arguments:
        ( int ) $file

  Default:
       $file = ""


3DBarGraph::SetBarBackgroundColor() ^ Top | ^ Variables | ^ Methods
Set bar background color (RGB)

  Arguments:
        ( int ) $red
        ( int ) $green
        ( int ) $blue


3DBarGraph::SetBarBorderColor() ^ Top | ^ Variables | ^ Methods
Set bar border color (RGB)

  Arguments:
        ( int ) $red
        ( int ) $green
        ( int ) $blue


3DBarGraph::SetBarDimensions() ^ Top | ^ Variables | ^ Methods
Set bar dimensions (width and height)

  Arguments:
        ( int ) $width
        ( int ) $height


3DBarGraph::SetBarFont() ^ Top | ^ Variables | ^ Methods
Set bar text font (1 to 5 are loaded by default on GD2, if you want others, you have to load them)
You can use these strings instead of int:
  1=x-small
  2=small
  3=normal
  4=large
  5=x-large

  Arguments:
        ( string | int ) $font


3DBarGraph::SetBarPadding() ^ Top | ^ Variables | ^ Methods
Set bar padding (see bar_padding)

  Arguments:
        ( int ) $padding