PEAR::HTML::Progress example: Ellipse
Author: Laurent Laville
Description: Display a square as progress meter

examples

# Square

$Date: 2005/07/25 11:19:41 $

- Introduction
- Render options
- PHP source syntax highlight
- Play demo

## Introduction

This example requires :

- PEAR::HTML_Progress 1.2.2 or better (see source at line 17).

This example will run a polygonal (square 3x3) ProgressBar.

Cell coordinates are pre-computed (line 31) but free x-y-grid coordinates are also possible. Percent text info is centered on a white background area of 30 pixels width, at top side of polygonal shape.

Lines 34 thru 56 allows to rotate cell coordinates list and start at different origin.

[Top]

## Render options

Here are options to build this progress bar string (percent text info):

    valign = top
    align  = center
    height = 30

HTML_Progress_UI::setStringAttributes()
Here are options to build the progress bar cells :

    width  = 20
    height = 20

HTML_Progress_UI::setCellAttributes()

[Top]

## Output

### Screenshot

[Top]

## PHP source syntax highlight

Open source listing in a new window.

[Top]

## Play demo

Run the script below to build a square 3x3 beginning at :

- top left corner (default)
- top right corner
- bottom right corner
- bottom left corner

[Top]