cvs: pear /HTML_Progress/examples/newshape circleback.html circleback.php circleplain.html circleplain.php ellipse.html ellipse.php rectangle.html
rectangle.php rectangleback.html rectangleback.php square.html square.php squareback.html squareback.php
| From: | Laurent Laville | Date: | Tue, 29 Jun 2004 20:48:53 +0000 |
| Subject: | cvs: pear /HTML_Progress/examples/newshape circleback.html circleback.php circleplain.html circleplain.php ellipse.html ellipse.php rectangle.html rectangle.php rectangleback.html rectangleback.php square.html square.php squareback.html squareback.php |
||
| Groups: | php.pear.cvs | ||
| Request: | Send a blank email to pear-cvs+get-21276@lists.php.net to get a copy of this message | ||
farell Tue Jun 29 16:48:53 2004 EDT
Added files:
/pear/HTML_Progress/examples/newshape circleback.html
circleback.php
circleplain.html
circleplain.php ellipse.html
ellipse.php rectangle.html
rectangle.php
rectangleback.html
rectangleback.php square.html
square.php squareback.html
squareback.php
Log:
HTML_Progress examples reorganized by category
http://cvs.php.net/co.php/pear/HTML_Progress/examples/newshape/circleback.html?r=1.1&p=1 Index: pear/HTML_Progress/examples/newshape/circleback.html +++ pear/HTML_Progress/examples/newshape/circleback.html <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta name="robots" content="index,nofollow" > <meta name="keywords" content"="HTML_Progress, circle, progress meter" /> <meta name="description" content="Display a plain circle 360 degree reverse as progress meter" /> <meta name="author" content="Laurent Laville" /> <title>PEAR::HTML::Progress example: Circle back</title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <link rel="stylesheet" href="../examples.css" /> </head> <body> <a name="top"> <p><a href="../index.html"><img src="../images/home.gif" alt="Examples TOC"/>examples</a></p> <h1><span class="chapter">Circle Back</span></h1> <p align="right">$Date: 2004/06/29 20:48:52 $</p> <div class="toc"> Table of contents </div> <ul> <li><a href="#intro">Introduction<a> <li><a href="#render">Render options<a> <li><a href="#source">PHP source syntax highlight<a> <li><a href="#run">Play demo<a> </ul> <a name="intro"> <h2><img src="../images/info.gif"/> Introduction</h2> <p>This example requires : <ul> <li>PEAR::HTML_Progress 1.2.0RC3 or better (see source at line 11).</li> </ul> </p> <hr/> <p><b>This example will display a plain circle 360 degree as new shape of progress meter.</b></p> <p>This example will run a circle (size:100x100) filled in reverse way.</p> <p>There are 10 cells with : <ul> <li>active-color = #FF0000 (red) <li>inactive-color = #000080 (navy) <li>spacing = 0 </ul> Percent text info is right aligned on a 100 pixels width area, at right side of circle.</p> <p>A cache system is used on lines 29 thru 37, to avoid built pictures a second times.</p> <p>[<a href="#top">Top</a>]</p> <a name="render"> <h2><img src="../images/config.gif"/> Render options </h2> Here are options to build this progress bar string (percent text info): <pre> font-size = 20 width = 100 </pre> <div class="fig">HTML_Progress_UI::setStringAttributes()</div> Here are options to build the progress bar cells : <pre> width = 100 height = 100 spacing = 0 inactive-color = navy active-color = red </pre> <div class="fig">HTML_Progress_UI::setCellAttributes()</div> <p>[<a href="#top">Top</a>]</p> <a name="output"> <h2><img src="../images/image.gif"/> Output</h2> <h3>Screenshots </h3> <p> <img src="../screenshots/cb010.png"/> <img src="../screenshots/cb060.png"/> <img src="../screenshots/cb100.png"/> </p> <p>[<a href="#top">Top</a>]</p> <a name="source"> <h2><img src="../images/source.gif"/> PHP source syntax highlight</h2> <a target="_blank" href="../highlighter.php?file=newshape/circleback.php">Open</a> source listing in a new window. <p>[<a href="#top">Top</a>]</p> <a name="run"> <h2><img src="../images/run.gif"/> Play demo</h2> <p><a href="circleback.php">Run</a> the script.</p> <p>[<a href="#top">Top</a>]</p> </body> </html> http://cvs.php.net/co.php/pear/HTML_Progress/examples/newshape/circleback.php?r=1.1&p=1 Index: pear/HTML_Progress/examples/newshape/circleback.php +++ pear/HTML_Progress/examples/newshape/circleback.php <?php @include '../include_path.php'; /** * Custom Circle Reverse Progress example. * * @version $Id: circleback.php,v 1.1 2004/06/29 20:48:52 farell Exp $ * @author Laurent Laville <pear@laurent-laville.org> * @package HTML_Progress */ require_once 'HTML/Progress.php'; $bar = new HTML_Progress(HTML_PROGRESS_CIRCLE); $bar->setAnimSpeed(100); $bar->setIncrement(10); $ui =& $bar->getUI(); $ui->setfillway('reverse'); $ui->setStringAttributes('font-size=20 width=100'); $ui->setCellAttributes(array( 'width' => 100, 'height' => 100, 'spacing' => 0, 'inactive-color' => 'navy', 'active-color' => 'red' ) ); if (file_exists('../temp/cb0.png')) { // uses cached files rather than create it again and again foreach (range(0,10) as $index) { $ui->setCellAttributes(array('background-image' => '../temp/cb'.$index.'.png'),$index); } } else { // creates circle segments pictures only once $ui->drawCircleSegments('../temp', 'cb%s.png'); } ?> <html> <head> <title>Custom Circle Reverse ProgressBar example</title> <style type="text/css"> <!-- <?php echo $bar->getStyle(); ?> body { background-color: #FFFFFF; color: #000000; font-family: Verdana, Arial; } a:visited, a:active, a:link { color: navy; } // --> </style> <script type="text/javascript"> <!-- <?php echo $ui->getScript(); ?> //--> </script> </head> <body> <h1><?php echo basename(__FILE__); ?></h1> <?php echo $bar->toHtml(); $bar->run(); ?> <p><< <a href="../index.html">Back examples TOC</a></p> </body> </html> http://cvs.php.net/co.php/pear/HTML_Progress/examples/newshape/circleplain.html?r=1.1&p=1 Index: pear/HTML_Progress/examples/newshape/circleplain.html +++ pear/HTML_Progress/examples/newshape/circleplain.html <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta name="robots" content="index,nofollow" > <meta name="keywords" content"="HTML_Progress, circle, progress meter" /> <meta name="description" content="Display a plain circle 360 degree as progress meter" /> <meta name="author" content="Laurent Laville" /> <title>PEAR::HTML::Progress example: Plain circle 360</title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <link rel="stylesheet" href="../examples.css" /> </head> <body> <a name="top"> <p><a href="../index.html"><img src="../images/home.gif" alt="Examples TOC"/>examples</a></p> <h1><span class="chapter">Circle Plain</span></h1> <p align="right">$Date: 2004/06/29 20:48:52 $</p> <div class="toc"> Table of contents </div> <ul> <li><a href="#intro">Introduction<a> <li><a href="#render">Render options<a> <li><a href="#source">PHP source syntax highlight<a> <li><a href="#run">Play demo<a> </ul> <a name="intro"> <h2><img src="../images/info.gif"/> Introduction</h2> <p>This example requires : <ul> <li>PEAR::HTML_Progress 1.2.0RC3 or better (see source at line 11).</li> </ul> </p> <hr/> <p><b>This example will display a plain circle 360 degree as new shape of progress meter.</b></p> <p>Default circle (size:50x50) filled in natural way.</p> <p>There are 10 cells with default colors : <ul> <li>active-color = #006600 <li>inactive-color = #CCCCCC <li>spacing = 0 </ul> Percent text info is right aligned on a #EEEEEE background color area of 50 pixels width, at right side of circle.</p> <p>A cache system is used on lines 21 thru 29, to avoid built pictures a second times.</p> <p>[<a href="#top">Top</a>]</p> <a name="render"> <h2><img src="../images/config.gif"/> Render options </h2> <pre> background-color = #EEEEEE </pre> <div class="fig">HTML_Progress_UI::setStringAttributes()</div> <pre> background-color = #EEEEEE spacing = 0 width = 50 height = 50 </pre> <div class="fig">HTML_Progress_UI::setCellAttributes()</div> <p>[<a href="#top">Top</a>]</p> <a name="output"> <h2><img src="../images/image.gif"/> Output</h2> <h3>Screenshots </h3> <p> <img src="../screenshots/circle000.png"/> <img src="../screenshots/circle040.png"/> <img src="../screenshots/circle080.png"/> <img src="../screenshots/circle100.png"/> </p> <p>[<a href="#top">Top</a>]</p> <a name="source"> <h2><img src="../images/source.gif"/> PHP source syntax highlight</h2> <a target="_blank" href="../highlighter.php?file=newshape/circleplain.php">Open</a> source listing in a new window. <p>[<a href="#top">Top</a>]</p> <a name="run"> <h2><img src="../images/run.gif"/> Play demo</h2> <p><a href="circleplain.php">Run</a> the script.</p> <p>[<a href="#top">Top</a>]</p> </body> </html> http://cvs.php.net/co.php/pear/HTML_Progress/examples/newshape/circleplain.php?r=1.1&p=1 Index: pear/HTML_Progress/examples/newshape/circleplain.php +++ pear/HTML_Progress/examples/newshape/circleplain.php <?php @include '../include_path.php'; /** * plain Circle Progress example. * * @version $Id: circleplain.php,v 1.1 2004/06/29 20:48:52 farell Exp $ * @author Laurent Laville <pear@laurent-laville.org> * @package HTML_Progress */ require_once 'HTML/Progress.php'; $bar = new HTML_Progress(HTML_PROGRESS_CIRCLE); $bar->setAnimSpeed(100); $bar->setIncrement(10); $ui =& $bar->getUI(); $ui->setStringAttributes('background-color=#eeeeee'); $ui->setCellAttributes('width=50 height=50 spacing=0 background-color=#eeeeee'); if (file_exists('../temp/c0.png')) { // uses cached files rather than create it again and again foreach (range(0,10) as $index) { $ui->setCellAttributes(array('background-image' => '../temp/c'.$index.'.png'),$index); } } else { // creates circle segments pictures only once $ui->drawCircleSegments('../temp', 'c%s.png'); } ?> <html> <head> <title>Basic Circle ProgressBar example</title> <style type="text/css"> <!-- <?php echo $bar->getStyle(); ?> body { background-color: #EEEEEE; color: #000000; font-family: Verdana, Arial; } a:visited, a:active, a:link { color: navy; } // --> </style> <script type="text/javascript"> <!-- <?php echo $ui->getScript(); ?> //--> </script> </head> <body> <h1><?php echo basename(__FILE__); ?></h1> <?php echo $bar->toHtml(); $bar->run(); ?> <p><< <a href="../index.html">Back examples TOC</a></p> </body> </html> http://cvs.php.net/co.php/pear/HTML_Progress/examples/newshape/ellipse.html?r=1.1&p=1 Index: pear/HTML_Progress/examples/newshape/ellipse.html +++ pear/HTML_Progress/examples/newshape/ellipse.html <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta name="robots" content="index,nofollow" > <meta name="keywords" content"="HTML_Progress, ellipse, progress meter" /> <meta name="description" content="Display a ellipse as progress meter" /> <meta name="author" content="Laurent Laville" /> <title>PEAR::HTML::Progress example: Ellipse</title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <link rel="stylesheet" href="../examples.css" /> </head> <body> <a name="top"> <p><a href="../index.html"><img src="../images/home.gif" alt="Examples TOC"/>examples</a></p> <h1><span class="chapter">Ellipse</span></h1> <p align="right">$Date: 2004/06/29 20:48:52 $</p> <div class="toc"> Table of contents </div> <ul> <li><a href="#intro">Introduction<a> <li><a href="#render">Render options<a> <li><a href="#source">PHP source syntax highlight<a> <li><a href="#run">Play demo<a> </ul> <a name="intro"> <h2><img src="../images/info.gif"/> Introduction</h2> <p>This example requires : <ul> <li>PEAR::HTML_Progress 1.2.0RC3 or better (see source at line 11).</li> </ul> </p> <hr/> <p><b>This example will run a ellipse (size:200x100) filled in natural way.</b></p> <p>Percent text info is right aligned on a 100 pixels width area, at right side of progress shape.</p> <p>A cache system is used on lines 29 thru 37, to avoid built pictures a second times.</p> <p>[<a href="#top">Top</a>]</p> <a name="render"> <h2><img src="../images/config.gif"/> Render options </h2> Here are options to build this progress bar string (percent text info): <pre> font-size = 20 width = 100 </pre> <div class="fig">HTML_Progress_UI::setStringAttributes()</div> Here are options to build the progress bar cells : <pre> width = 200 height = 100 spacing = 0 inactive-color = red active-color = navy </pre> <div class="fig">HTML_Progress_UI::setCellAttributes()</div> <p>[<a href="#top">Top</a>]</p> <a name="output"> <h2><img src="../images/image.gif"/> Output</h2> <h3>Screenshots </h3> <p> <img src="../screenshots/e000.png"/> <img src="../screenshots/e040.png"/> <br/> <img src="../screenshots/e080.png"/> <img src="../screenshots/e100.png"/> </p> <p>[<a href="#top">Top</a>]</p> <a name="source"> <h2><img src="../images/source.gif"/> PHP source syntax highlight</h2> <a target="_blank" href="../highlighter.php?file=newshape/ellipse.php">Open</a> source listing in a new window. <p>[<a href="#top">Top</a>]</p> <a name="run"> <h2><img src="../images/run.gif"/> Play demo</h2> <p><a href="ellipse.php">Run</a> the script.</p> <p>[<a href="#top">Top</a>]</p> </body> </html> http://cvs.php.net/co.php/pear/HTML_Progress/examples/newshape/ellipse.php?r=1.1&p=1 Index: pear/HTML_Progress/examples/newshape/ellipse.php +++ pear/HTML_Progress/examples/newshape/ellipse.php <?php @include '../include_path.php'; /** * Ellipse Progress meter example. * * @version $Id: ellipse.php,v 1.1 2004/06/29 20:48:52 farell Exp $ * @author Laurent Laville <pear@laurent-laville.org> * @package HTML_Progress */ require_once 'HTML/Progress.php'; $bar = new HTML_Progress(); $bar->setAnimSpeed(100); $bar->setIncrement(10); $ui =& $bar->getUI(); $ui->setOrientation(HTML_PROGRESS_CIRCLE); $ui->setStringAttributes('font-size=20 width=100'); $ui->setCellAttributes(array( 'width' => 200, 'height' => 100, 'spacing' => 0, 'inactive-color' => 'red', 'active-color' => 'navy' ) ); if (file_exists('../temp/e0.png')) { // uses cached files rather than create it again and again foreach (range(0,10) as $index) { $ui->setCellAttributes(array('background-image' => '../temp/e'.$index.'.png'),$index); } } else { // creates circle segments pictures only once $ui->drawCircleSegments('../temp', 'e%s.png'); } ?> <html> <head> <title>Ellipse ProgressBar example</title> <style type="text/css"> <!-- <?php echo $bar->getStyle(); ?> body { background-color: #FFFFFF; color: #000000; font-family: Verdana, Arial; } a:visited, a:active, a:link { color: navy; } // --> </style> <script type="text/javascript"> <!-- <?php echo $ui->getScript(); ?> //--> </script> </head> <body> <h1><?php echo basename(__FILE__); ?></h1> <?php echo $bar->toHtml(); $bar->run(); ?> <p><< <a href="../index.html">Back examples TOC</a></p> </body> </html> http://cvs.php.net/co.php/pear/HTML_Progress/examples/newshape/rectangle.html?r=1.1&p=1 Index: pear/HTML_Progress/examples/newshape/rectangle.html +++ pear/HTML_Progress/examples/newshape/rectangle.html <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta name="robots" content="index,nofollow" > <meta name="keywords" content"="HTML_Progress, rectangle, progress meter" /> <meta name="description" content="Display a rectangle as progress meter" /> <meta name="author" content="Laurent Laville" /> <title>PEAR::HTML::Progress example: Rectangle</title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <link rel="stylesheet" href="../examples.css" /> </head> <body> <a name="top"> <p><a href="../index.html"><img src="../images/home.gif" alt="Examples TOC"/>examples</a></p> <h1><span class="chapter">Rectangle</span></h1> <p align="right">$Date: 2004/06/29 20:48:52 $</p> <div class="toc"> Table of contents </div> <ul> <li><a href="#intro">Introduction<a> <li><a href="#render">Render options<a> <li><a href="#source">PHP source syntax highlight<a> <li><a href="#run">Play demo<a> </ul> <a name="intro"> <h2><img src="../images/info.gif"/> Introduction</h2> <p>This example requires : <ul> <li>PEAR::HTML_Progress 1.2.0RC3 or better (see source at line 11).</li> </ul> </p> <hr/> <p><b>This example will run a polygonal (rectangle 6x4) ProgressBar filled in natural way.</b></p> <p>Cell coordinates are pre-computed (line 27) but free x-y-grid coordinates are also possible. Percent text info is centered on a white background area of 90 pixels width, at bottom side of polygonal shape.</p> <p>[<a href="#top">Top</a>]</p> <a name="render"> <h2><img src="../images/config.gif"/> Render options </h2> Here are options to build this progress bar string (percent text info): <pre> valign = bottom align = center width = 90 height = 30 </pre> <div class="fig">HTML_Progress_UI::setStringAttributes()</div> Here are options to build the progress bar cells : <pre> active-color = red inactive-color = orange width = 15 height = 15 </pre> <div class="fig">HTML_Progress_UI::setCellAttributes()</div> <p>[<a href="#top">Top</a>]</p> <a name="output"> <h2><img src="../images/image.gif"/> Output</h2> <h3>Screenshot </h3> <p><img src="../screenshots/rect64.png"/></p> <p>[<a href="#top">Top</a>]</p> <a name="source"> <h2><img src="../images/source.gif"/> PHP source syntax highlight</h2> <a target="_blank" href="../highlighter.php?file=newshape/rectangle.php">Open</a> source listing in a new window. <p>[<a href="#top">Top</a>]</p> <a name="run"> <h2><img src="../images/run.gif"/> Play demo</h2> <p><a href="rectangle.php">Run</a> the script.</p> </body> </html> http://cvs.php.net/co.php/pear/HTML_Progress/examples/newshape/rectangle.php?r=1.1&p=1 Index: pear/HTML_Progress/examples/newshape/rectangle.php +++ pear/HTML_Progress/examples/newshape/rectangle.php <?php @include '../include_path.php'; /** * Basic Rectangle Progress example. * * @version $Id: rectangle.php,v 1.1 2004/06/29 20:48:52 farell Exp $ * @author Laurent Laville <pear@laurent-laville.org> * @package HTML_Progress */ require_once 'HTML/Progress.php'; $bar = new HTML_Progress(); $bar->setAnimSpeed(100); $bar->setIncrement(10); $ui =& $bar->getUI(); $ui->setStringAttributes('valign=bottom align=center width=90 height=30'); $ui->setOrientation(HTML_PROGRESS_POLYGONAL); $ui->setCellAttributes(array( 'width' => 15, 'height' => 15, 'active-color' => 'red', 'inactive-color' => 'orange', ) ); $ui->setCellCoordinates(6,4); // Rectangle 6x4 ?> <html> <head> <title>Basic Rectangle ProgressBar example</title> <style type="text/css"> <!-- <?php echo $bar->getStyle(); ?> body { background-color: #FFFFFF; color: #000000; font-family: Verdana, Arial; } a:visited, a:active, a:link { color: navy; } // --> </style> <script type="text/javascript"> <!-- <?php echo $ui->getScript(); ?> //--> </script> </head> <body> <h1><?php echo basename(__FILE__); ?></h1> <?php echo $bar->toHtml(); $bar->run(); ?> <p><< <a href="../index.html">Back examples TOC</a></p> </body> </html> http://cvs.php.net/co.php/pear/HTML_Progress/examples/newshape/rectangleback.html?r=1.1&p=1 Index: pear/HTML_Progress/examples/newshape/rectangleback.html +++ pear/HTML_Progress/examples/newshape/rectangleback.html <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta name="robots" content="index,nofollow" > <meta name="keywords" content"="HTML_Progress, rectangle, progress meter" /> <meta name="description" content="Display a rectangle filled in reverse order as progress meter" /> <meta name="author" content="Laurent Laville" /> <title>PEAR::HTML::Progress example: Rectangle Back</title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <link rel="stylesheet" href="../examples.css" /> </head> <body> <a name="top"> <p><a href="../index.html"><img src="../images/home.gif" alt="Examples TOC"/>examples</a></p> <h1><span class="chapter">Rectangle Back</span></h1> <p align="right">$Date: 2004/06/29 20:48:52 $</p> <div class="toc"> Table of contents </div> <ul> <li><a href="#intro">Introduction<a> <li><a href="#render">Render options<a> <li><a href="#source">PHP source syntax highlight<a> <li><a href="#run">Play demo<a> </ul> <a name="intro"> <h2><img src="../images/info.gif"/> Introduction</h2> <p>This example requires : <ul> <li>PEAR::HTML_Progress 1.2.0RC3 or better (see source at line 11).</li> </ul> </p> <hr/> <p><b>This example will run a polygonal (rectangle 15x3) ProgressBar filled in reverse way.</b></p> <p>Cell coordinates are pre-computed (line 27) but free x-y-grid coordinates are also possible. Percent text info is right aligned on a white background area of 50 pixels width, at right side of polygonal shape (default).</p> <p>[<a href="#top">Top</a>]</p> <a name="render"> <h2><img src="../images/config.gif"/> Render options </h2> Here are options to build the progress bar cells : <pre> active-color = red inactive-color = orange width = 10 height = 10 </pre> <div class="fig">HTML_Progress_UI::setCellAttributes()</div> <p>[<a href="#top">Top</a>]</p> <a name="output"> <h2><img src="../images/image.gif"/> Output</h2> <h3>Screenshot </h3> <p><img src="../screenshots/rect153.png"/></p> <p>[<a href="#top">Top</a>]</p> <a name="source"> <h2><img src="../images/source.gif"/> PHP source syntax highlight</h2> <a target="_blank" href="../highlighter.php?file=newshape/rectangleback.php">Open</a> source listing in a new window. <p>[<a href="#top">Top</a>]</p> <a name="run"> <h2><img src="../images/run.gif"/> Play demo</h2> <p><a href="rectangleback.php">Run</a> the script.</p> </body> </html> http://cvs.php.net/co.php/pear/HTML_Progress/examples/newshape/rectangleback.php?r=1.1&p=1 Index: pear/HTML_Progress/examples/newshape/rectangleback.php +++ pear/HTML_Progress/examples/newshape/rectangleback.php <?php @include '../include_path.php'; /** * Reverse Rectangle Progress example. * * @version $Id: rectangleback.php,v 1.1 2004/06/29 20:48:52 farell Exp $ * @author Laurent Laville <pear@laurent-laville.org> * @package HTML_Progress */ require_once 'HTML/Progress.php'; $bar = new HTML_Progress(); $bar->setAnimSpeed(100); $bar->setIncrement(10); $ui =& $bar->getUI(); $ui->setFillWay('reverse'); $ui->setOrientation(HTML_PROGRESS_POLYGONAL); $ui->setCellAttributes(array( 'width' => 10, 'height' => 10, 'active-color' => 'red', 'inactive-color' => 'orange', ) ); $ui->setCellCoordinates(15,3); // Rectangle 15x3 ?> <html> <head> <title>Reverse Rectangle ProgressBar example</title> <style type="text/css"> <!-- <?php echo $bar->getStyle(); ?> body { background-color: #FFFFFF; color: #000000; font-family: Verdana, Arial; } a:visited, a:active, a:link { color: navy; } // --> </style> <script type="text/javascript"> <!-- <?php echo $ui->getScript(); ?> //--> </script> </head> <body> <h1><?php echo basename(__FILE__); ?></h1> <?php echo $bar->toHtml(); $bar->run(); ?> <p><< <a href="../index.html">Back examples TOC</a></p> </body> </html> http://cvs.php.net/co.php/pear/HTML_Progress/examples/newshape/square.html?r=1.1&p=1 Index: pear/HTML_Progress/examples/newshape/square.html +++ pear/HTML_Progress/examples/newshape/square.html <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta name="robots" content="index,nofollow" > <meta name="keywords" content"="HTML_Progress, square, progress meter" /> <meta name="description" content="Display a square as progress meter" /> <meta name="author" content="Laurent Laville" /> <title>PEAR::HTML::Progress example: Ellipse</title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <link rel="stylesheet" href="../examples.css" /> </head> <body> <a name="top"> <p><a href="../index.html"><img src="../images/home.gif" alt="Examples TOC"/>examples</a></p> <h1><span class="chapter">Square </span></h1> <p align="right">$Date: 2004/06/29 20:48:52 $</p> <div class="toc"> Table of contents </div> <ul> <li><a href="#intro">Introduction<a> <li><a href="#render">Render options<a> <li><a href="#source">PHP source syntax highlight<a> <li><a href="#run">Play demo<a> </ul> <a name="intro"> <h2><img src="../images/info.gif"/> Introduction</h2> <p>This example requires : <ul> <li>PEAR::HTML_Progress 1.2.0RC3 or better (see source at line 17).</li> </ul> </p> <hr/> <p><b>This example will run a polygonal (square 3x3) ProgressBar.</b></p> <p>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.</p> <p>Lines 34 thru 56 allows to rotate cell coordinates list and start at different origin.</p> <p>[<a href="#top">Top</a>]</p> <a name="render"> <h2><img src="../images/config.gif"/> Render options </h2> Here are options to build this progress bar string (percent text info): <pre> valign = top align = center height = 30 </pre> <div class="fig">HTML_Progress_UI::setStringAttributes()</div> Here are options to build the progress bar cells : <pre> width = 20 height = 20 </pre> <div class="fig">HTML_Progress_UI::setCellAttributes()</div> <p>[<a href="#top">Top</a>]</p> <a name="output"> <h2><img src="../images/image.gif"/> Output</h2> <h3>Screenshot </h3> <p><img src="../screenshots/square.png"/></p> <p>[<a href="#top">Top</a>]</p> <a name="source"> <h2><img src="../images/source.gif"/> PHP source syntax highlight</h2> <a target="_blank" href="../highlighter.php?file=newshape/square.php">Open</a> source listing in a new window. <p>[<a href="#top">Top</a>]</p> <a name="run"> <h2><img src="../images/run.gif"/> Play demo</h2> <p>Run the script below to build a square 3x3 beginning at : <ul> <li><a href="square.php?start=topleft">top left corner</a> (default) <li><a href="square.php?start=topright">top right corner</a> <li><a href="square.php?start=bottomright">bottom right corner</a> <li><a href="square.php?start=bottomleft">bottom left corner</a> </ul> </p> <p>[<a href="#top">Top</a>]</p> </body> </html> http://cvs.php.net/co.php/pear/HTML_Progress/examples/newshape/square.php?r=1.1&p=1 Index: pear/HTML_Progress/examples/newshape/square.php +++ pear/HTML_Progress/examples/newshape/square.php <?php @include '../include_path.php'; /** * Basic Square Progress example. * * <b>start</b> parameter could be equal to: * - 'topleft' = beginning at top left corner (default) * - 'topright' = beginning at top right corner * - 'bottomright' = beginning at bottom right corner * - 'bottomleft' = beginning at bottom left corner * * @version $Id: square.php,v 1.1 2004/06/29 20:48:52 farell Exp $ * @author Laurent Laville <pear@laurent-laville.org> * @package HTML_Progress */ require_once 'HTML/Progress.php'; $s = isset($_GET['start']) ? $_GET['start'] : 'topleft'; $bar = new HTML_Progress(); $bar->setAnimSpeed(100); $bar->setIncrement(10); $ui =& $bar->getUI(); $ui->setStringAttributes('valign=top align=center height=30'); $ui->setOrientation(HTML_PROGRESS_POLYGONAL); $ui->setCellAttributes('width=20 height=20'); $w = 3; $h = 3; $ui->setCellCoordinates($w,$h); // square 3x3 $coord = $ui->getCellCoordinates(); switch (strtolower($s)) { case 'topright': for ($i=1; $i<$w; $i++) { $shift = array_shift($coord); array_push($coord, $shift); } break; case 'bottomright': for ($i=1; $i<($w+$h-1); $i++) { $shift = array_shift($coord); array_push($coord, $shift); } break; case 'bottomleft': for ($i=1; $i<$w; $i++) { $pop = array_pop($coord); array_unshift($coord, $pop); } break; case 'topleft': default: break; } $ui->setCellCoordinates($w, $h, $coord); ?> <html> <head> <title>Basic Square ProgressBar example</title> <style type="text/css"> <!-- <?php echo $bar->getStyle(); ?> body { background-color: #FFFFFF; color: #000000; font-family: Verdana, Arial; } a:visited, a:active, a:link { color: navy; } // --> </style> <script type="text/javascript"> <!-- <?php echo $ui->getScript(); ?> //--> </script> </head> <body> <h1><?php echo basename(__FILE__); ?></h1> <?php echo $bar->toHtml(); $bar->run(); ?> <p><< <a href="../index.html">Back examples TOC</a></p> </body> </html> http://cvs.php.net/co.php/pear/HTML_Progress/examples/newshape/squareback.html?r=1.1&p=1 Index: pear/HTML_Progress/examples/newshape/squareback.html +++ pear/HTML_Progress/examples/newshape/squareback.html <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta name="robots" content="index,nofollow" > <meta name="keywords" content"="HTML_Progress, square, progress meter" /> <meta name="description" content="Display a square filled in reverse order as progress meter" /> <meta name="author" content="Laurent Laville" /> <title>PEAR::HTML::Progress example: Square Back</title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <link rel="stylesheet" href="../examples.css" /> </head> <body> <a name="top"> <p><a href="../index.html"><img src="../images/home.gif" alt="Examples TOC"/>examples</a></p> <h1><span class="chapter">Square Back</span></h1> <p align="right">$Date: 2004/06/29 20:48:52 $</p> <div class="toc"> Table of contents </div> <ul> <li><a href="#intro">Introduction<a> <li><a href="#render">Render options<a> <li><a href="#source">PHP source syntax highlight<a> <li><a href="#run">Play demo<a> </ul> <a name="intro"> <h2><img src="../images/info.gif"/> Introduction</h2> <p>This example requires : <ul> <li>PEAR::HTML_Progress 1.2.0RC3 or better (see source at line 11).</li> </ul> </p> <hr/> <p><b>This example will run a polygonal (square 4x4) ProgressBar filled in reverse way.</b></p> <p>Cell coordinates are pre-computed (line 22) but free x-y-grid coordinates are also possible. Percent text info is centered on a white background area of 50 pixels width, at left side of polygonal shape.</p> <p>[<a href="#top">Top</a>]</p> <a name="render"> <h2><img src="../images/config.gif"/> Render options </h2> Here are options to build this progress bar string (percent text info): <pre> valign = left align = center </pre> <div class="fig">HTML_Progress_UI::setStringAttributes()</div> Here are options to build the progress bar cells : <pre> width = 10 height = 10 </pre> <div class="fig">HTML_Progress_UI::setCellAttributes()</div> <p>[<a href="#top">Top</a>]</p> <a name="output"> <h2><img src="../images/image.gif"/> Output</h2> <h3>Screenshot </h3> <p><img src="../screenshots/square44.png"/></p> <p>[<a href="#top">Top</a>]</p> <a name="source"> <h2><img src="../images/source.gif"/> PHP source syntax highlight</h2> <a target="_blank" href="../highlighter.php?file=newshape/squareback.php">Open</a> source listing in a new window. <p>[<a href="#top">Top</a>]</p> <a name="run"> <h2><img src="../images/run.gif"/> Play demo</h2> <p><a href="squareback.php">Run</a> the script.</p> <p>[<a href="#top">Top</a>]</p> </body> </html> http://cvs.php.net/co.php/pear/HTML_Progress/examples/newshape/squareback.php?r=1.1&p=1 Index: pear/HTML_Progress/examples/newshape/squareback.php +++ pear/HTML_Progress/examples/newshape/squareback.php <?php @include '../include_path.php'; /** * Reverse Square Progress example. * * @version $Id: squareback.php,v 1.1 2004/06/29 20:48:52 farell Exp $ * @author Laurent Laville <pear@laurent-laville.org> * @package HTML_Progress */ require_once 'HTML/Progress.php'; $bar = new HTML_Progress(); $bar->setAnimSpeed(100); $bar->setIncrement(10); $ui =& $bar->getUI(); $ui->setStringAttributes('valign=left align=center'); $ui->setFillWay('reverse'); $ui->setOrientation(HTML_PROGRESS_POLYGONAL); $ui->setCellAttributes('width=10 height=10'); $ui->setCellCoordinates(4,4); // square 4x4 ?> <html> <head> <title>Reverse Square Progress example</title> <style type="text/css"> <!-- <?php echo $bar->getStyle(); ?> body { background-color: #FFFFFF; color: #000000; font-family: Verdana, Arial; } a:visited, a:active, a:link { color: navy; } // --> </style> <script type="text/javascript"> <!-- <?php echo $ui->getScript(); ?> //--> </script> </head> <body> <h1><?php echo basename(__FILE__); ?></h1> <?php echo $bar->toHtml(); $bar->run(); ?> <p><< <a href="../index.html">Back examples TOC</a></p> </body> </html>
http://cvs.php.net/co.php/pear/HTML_Progress/examples/newshape/circleback.html?r=1.1&p=1 Index: pear/HTML_Progress/examples/newshape/circleback.html +++ pear/HTML_Progress/examples/newshape/circleback.html <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta name="robots" content="index,nofollow" > <meta name="keywords" content"="HTML_Progress, circle, progress meter" /> <meta name="description" content="Display a plain circle 360 degree reverse as progress meter" /> <meta name="author" content="Laurent Laville" /> <title>PEAR::HTML::Progress example: Circle back</title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <link rel="stylesheet" href="../examples.css" /> </head> <body> <a name="top"> <p><a href="../index.html"><img src="../images/home.gif" alt="Examples TOC"/>examples</a></p> <h1><span class="chapter">Circle Back</span></h1> <p align="right">$Date: 2004/06/29 20:48:52 $</p> <div class="toc"> Table of contents </div> <ul> <li><a href="#intro">Introduction<a> <li><a href="#render">Render options<a> <li><a href="#source">PHP source syntax highlight<a> <li><a href="#run">Play demo<a> </ul> <a name="intro"> <h2><img src="../images/info.gif"/> Introduction</h2> <p>This example requires : <ul> <li>PEAR::HTML_Progress 1.2.0RC3 or better (see source at line 11).</li> </ul> </p> <hr/> <p><b>This example will display a plain circle 360 degree as new shape of progress meter.</b></p> <p>This example will run a circle (size:100x100) filled in reverse way.</p> <p>There are 10 cells with : <ul> <li>active-color = #FF0000 (red) <li>inactive-color = #000080 (navy) <li>spacing = 0 </ul> Percent text info is right aligned on a 100 pixels width area, at right side of circle.</p> <p>A cache system is used on lines 29 thru 37, to avoid built pictures a second times.</p> <p>[<a href="#top">Top</a>]</p> <a name="render"> <h2><img src="../images/config.gif"/> Render options </h2> Here are options to build this progress bar string (percent text info): <pre> font-size = 20 width = 100 </pre> <div class="fig">HTML_Progress_UI::setStringAttributes()</div> Here are options to build the progress bar cells : <pre> width = 100 height = 100 spacing = 0 inactive-color = navy active-color = red </pre> <div class="fig">HTML_Progress_UI::setCellAttributes()</div> <p>[<a href="#top">Top</a>]</p> <a name="output"> <h2><img src="../images/image.gif"/> Output</h2> <h3>Screenshots </h3> <p> <img src="../screenshots/cb010.png"/> <img src="../screenshots/cb060.png"/> <img src="../screenshots/cb100.png"/> </p> <p>[<a href="#top">Top</a>]</p> <a name="source"> <h2><img src="../images/source.gif"/> PHP source syntax highlight</h2> <a target="_blank" href="../highlighter.php?file=newshape/circleback.php">Open</a> source listing in a new window. <p>[<a href="#top">Top</a>]</p> <a name="run"> <h2><img src="../images/run.gif"/> Play demo</h2> <p><a href="circleback.php">Run</a> the script.</p> <p>[<a href="#top">Top</a>]</p> </body> </html> http://cvs.php.net/co.php/pear/HTML_Progress/examples/newshape/circleback.php?r=1.1&p=1 Index: pear/HTML_Progress/examples/newshape/circleback.php +++ pear/HTML_Progress/examples/newshape/circleback.php <?php @include '../include_path.php'; /** * Custom Circle Reverse Progress example. * * @version $Id: circleback.php,v 1.1 2004/06/29 20:48:52 farell Exp $ * @author Laurent Laville <pear@laurent-laville.org> * @package HTML_Progress */ require_once 'HTML/Progress.php'; $bar = new HTML_Progress(HTML_PROGRESS_CIRCLE); $bar->setAnimSpeed(100); $bar->setIncrement(10); $ui =& $bar->getUI(); $ui->setfillway('reverse'); $ui->setStringAttributes('font-size=20 width=100'); $ui->setCellAttributes(array( 'width' => 100, 'height' => 100, 'spacing' => 0, 'inactive-color' => 'navy', 'active-color' => 'red' ) ); if (file_exists('../temp/cb0.png')) { // uses cached files rather than create it again and again foreach (range(0,10) as $index) { $ui->setCellAttributes(array('background-image' => '../temp/cb'.$index.'.png'),$index); } } else { // creates circle segments pictures only once $ui->drawCircleSegments('../temp', 'cb%s.png'); } ?> <html> <head> <title>Custom Circle Reverse ProgressBar example</title> <style type="text/css"> <!-- <?php echo $bar->getStyle(); ?> body { background-color: #FFFFFF; color: #000000; font-family: Verdana, Arial; } a:visited, a:active, a:link { color: navy; } // --> </style> <script type="text/javascript"> <!-- <?php echo $ui->getScript(); ?> //--> </script> </head> <body> <h1><?php echo basename(__FILE__); ?></h1> <?php echo $bar->toHtml(); $bar->run(); ?> <p><< <a href="../index.html">Back examples TOC</a></p> </body> </html> http://cvs.php.net/co.php/pear/HTML_Progress/examples/newshape/circleplain.html?r=1.1&p=1 Index: pear/HTML_Progress/examples/newshape/circleplain.html +++ pear/HTML_Progress/examples/newshape/circleplain.html <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta name="robots" content="index,nofollow" > <meta name="keywords" content"="HTML_Progress, circle, progress meter" /> <meta name="description" content="Display a plain circle 360 degree as progress meter" /> <meta name="author" content="Laurent Laville" /> <title>PEAR::HTML::Progress example: Plain circle 360</title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <link rel="stylesheet" href="../examples.css" /> </head> <body> <a name="top"> <p><a href="../index.html"><img src="../images/home.gif" alt="Examples TOC"/>examples</a></p> <h1><span class="chapter">Circle Plain</span></h1> <p align="right">$Date: 2004/06/29 20:48:52 $</p> <div class="toc"> Table of contents </div> <ul> <li><a href="#intro">Introduction<a> <li><a href="#render">Render options<a> <li><a href="#source">PHP source syntax highlight<a> <li><a href="#run">Play demo<a> </ul> <a name="intro"> <h2><img src="../images/info.gif"/> Introduction</h2> <p>This example requires : <ul> <li>PEAR::HTML_Progress 1.2.0RC3 or better (see source at line 11).</li> </ul> </p> <hr/> <p><b>This example will display a plain circle 360 degree as new shape of progress meter.</b></p> <p>Default circle (size:50x50) filled in natural way.</p> <p>There are 10 cells with default colors : <ul> <li>active-color = #006600 <li>inactive-color = #CCCCCC <li>spacing = 0 </ul> Percent text info is right aligned on a #EEEEEE background color area of 50 pixels width, at right side of circle.</p> <p>A cache system is used on lines 21 thru 29, to avoid built pictures a second times.</p> <p>[<a href="#top">Top</a>]</p> <a name="render"> <h2><img src="../images/config.gif"/> Render options </h2> <pre> background-color = #EEEEEE </pre> <div class="fig">HTML_Progress_UI::setStringAttributes()</div> <pre> background-color = #EEEEEE spacing = 0 width = 50 height = 50 </pre> <div class="fig">HTML_Progress_UI::setCellAttributes()</div> <p>[<a href="#top">Top</a>]</p> <a name="output"> <h2><img src="../images/image.gif"/> Output</h2> <h3>Screenshots </h3> <p> <img src="../screenshots/circle000.png"/> <img src="../screenshots/circle040.png"/> <img src="../screenshots/circle080.png"/> <img src="../screenshots/circle100.png"/> </p> <p>[<a href="#top">Top</a>]</p> <a name="source"> <h2><img src="../images/source.gif"/> PHP source syntax highlight</h2> <a target="_blank" href="../highlighter.php?file=newshape/circleplain.php">Open</a> source listing in a new window. <p>[<a href="#top">Top</a>]</p> <a name="run"> <h2><img src="../images/run.gif"/> Play demo</h2> <p><a href="circleplain.php">Run</a> the script.</p> <p>[<a href="#top">Top</a>]</p> </body> </html> http://cvs.php.net/co.php/pear/HTML_Progress/examples/newshape/circleplain.php?r=1.1&p=1 Index: pear/HTML_Progress/examples/newshape/circleplain.php +++ pear/HTML_Progress/examples/newshape/circleplain.php <?php @include '../include_path.php'; /** * plain Circle Progress example. * * @version $Id: circleplain.php,v 1.1 2004/06/29 20:48:52 farell Exp $ * @author Laurent Laville <pear@laurent-laville.org> * @package HTML_Progress */ require_once 'HTML/Progress.php'; $bar = new HTML_Progress(HTML_PROGRESS_CIRCLE); $bar->setAnimSpeed(100); $bar->setIncrement(10); $ui =& $bar->getUI(); $ui->setStringAttributes('background-color=#eeeeee'); $ui->setCellAttributes('width=50 height=50 spacing=0 background-color=#eeeeee'); if (file_exists('../temp/c0.png')) { // uses cached files rather than create it again and again foreach (range(0,10) as $index) { $ui->setCellAttributes(array('background-image' => '../temp/c'.$index.'.png'),$index); } } else { // creates circle segments pictures only once $ui->drawCircleSegments('../temp', 'c%s.png'); } ?> <html> <head> <title>Basic Circle ProgressBar example</title> <style type="text/css"> <!-- <?php echo $bar->getStyle(); ?> body { background-color: #EEEEEE; color: #000000; font-family: Verdana, Arial; } a:visited, a:active, a:link { color: navy; } // --> </style> <script type="text/javascript"> <!-- <?php echo $ui->getScript(); ?> //--> </script> </head> <body> <h1><?php echo basename(__FILE__); ?></h1> <?php echo $bar->toHtml(); $bar->run(); ?> <p><< <a href="../index.html">Back examples TOC</a></p> </body> </html> http://cvs.php.net/co.php/pear/HTML_Progress/examples/newshape/ellipse.html?r=1.1&p=1 Index: pear/HTML_Progress/examples/newshape/ellipse.html +++ pear/HTML_Progress/examples/newshape/ellipse.html <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta name="robots" content="index,nofollow" > <meta name="keywords" content"="HTML_Progress, ellipse, progress meter" /> <meta name="description" content="Display a ellipse as progress meter" /> <meta name="author" content="Laurent Laville" /> <title>PEAR::HTML::Progress example: Ellipse</title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <link rel="stylesheet" href="../examples.css" /> </head> <body> <a name="top"> <p><a href="../index.html"><img src="../images/home.gif" alt="Examples TOC"/>examples</a></p> <h1><span class="chapter">Ellipse</span></h1> <p align="right">$Date: 2004/06/29 20:48:52 $</p> <div class="toc"> Table of contents </div> <ul> <li><a href="#intro">Introduction<a> <li><a href="#render">Render options<a> <li><a href="#source">PHP source syntax highlight<a> <li><a href="#run">Play demo<a> </ul> <a name="intro"> <h2><img src="../images/info.gif"/> Introduction</h2> <p>This example requires : <ul> <li>PEAR::HTML_Progress 1.2.0RC3 or better (see source at line 11).</li> </ul> </p> <hr/> <p><b>This example will run a ellipse (size:200x100) filled in natural way.</b></p> <p>Percent text info is right aligned on a 100 pixels width area, at right side of progress shape.</p> <p>A cache system is used on lines 29 thru 37, to avoid built pictures a second times.</p> <p>[<a href="#top">Top</a>]</p> <a name="render"> <h2><img src="../images/config.gif"/> Render options </h2> Here are options to build this progress bar string (percent text info): <pre> font-size = 20 width = 100 </pre> <div class="fig">HTML_Progress_UI::setStringAttributes()</div> Here are options to build the progress bar cells : <pre> width = 200 height = 100 spacing = 0 inactive-color = red active-color = navy </pre> <div class="fig">HTML_Progress_UI::setCellAttributes()</div> <p>[<a href="#top">Top</a>]</p> <a name="output"> <h2><img src="../images/image.gif"/> Output</h2> <h3>Screenshots </h3> <p> <img src="../screenshots/e000.png"/> <img src="../screenshots/e040.png"/> <br/> <img src="../screenshots/e080.png"/> <img src="../screenshots/e100.png"/> </p> <p>[<a href="#top">Top</a>]</p> <a name="source"> <h2><img src="../images/source.gif"/> PHP source syntax highlight</h2> <a target="_blank" href="../highlighter.php?file=newshape/ellipse.php">Open</a> source listing in a new window. <p>[<a href="#top">Top</a>]</p> <a name="run"> <h2><img src="../images/run.gif"/> Play demo</h2> <p><a href="ellipse.php">Run</a> the script.</p> <p>[<a href="#top">Top</a>]</p> </body> </html> http://cvs.php.net/co.php/pear/HTML_Progress/examples/newshape/ellipse.php?r=1.1&p=1 Index: pear/HTML_Progress/examples/newshape/ellipse.php +++ pear/HTML_Progress/examples/newshape/ellipse.php <?php @include '../include_path.php'; /** * Ellipse Progress meter example. * * @version $Id: ellipse.php,v 1.1 2004/06/29 20:48:52 farell Exp $ * @author Laurent Laville <pear@laurent-laville.org> * @package HTML_Progress */ require_once 'HTML/Progress.php'; $bar = new HTML_Progress(); $bar->setAnimSpeed(100); $bar->setIncrement(10); $ui =& $bar->getUI(); $ui->setOrientation(HTML_PROGRESS_CIRCLE); $ui->setStringAttributes('font-size=20 width=100'); $ui->setCellAttributes(array( 'width' => 200, 'height' => 100, 'spacing' => 0, 'inactive-color' => 'red', 'active-color' => 'navy' ) ); if (file_exists('../temp/e0.png')) { // uses cached files rather than create it again and again foreach (range(0,10) as $index) { $ui->setCellAttributes(array('background-image' => '../temp/e'.$index.'.png'),$index); } } else { // creates circle segments pictures only once $ui->drawCircleSegments('../temp', 'e%s.png'); } ?> <html> <head> <title>Ellipse ProgressBar example</title> <style type="text/css"> <!-- <?php echo $bar->getStyle(); ?> body { background-color: #FFFFFF; color: #000000; font-family: Verdana, Arial; } a:visited, a:active, a:link { color: navy; } // --> </style> <script type="text/javascript"> <!-- <?php echo $ui->getScript(); ?> //--> </script> </head> <body> <h1><?php echo basename(__FILE__); ?></h1> <?php echo $bar->toHtml(); $bar->run(); ?> <p><< <a href="../index.html">Back examples TOC</a></p> </body> </html> http://cvs.php.net/co.php/pear/HTML_Progress/examples/newshape/rectangle.html?r=1.1&p=1 Index: pear/HTML_Progress/examples/newshape/rectangle.html +++ pear/HTML_Progress/examples/newshape/rectangle.html <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta name="robots" content="index,nofollow" > <meta name="keywords" content"="HTML_Progress, rectangle, progress meter" /> <meta name="description" content="Display a rectangle as progress meter" /> <meta name="author" content="Laurent Laville" /> <title>PEAR::HTML::Progress example: Rectangle</title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <link rel="stylesheet" href="../examples.css" /> </head> <body> <a name="top"> <p><a href="../index.html"><img src="../images/home.gif" alt="Examples TOC"/>examples</a></p> <h1><span class="chapter">Rectangle</span></h1> <p align="right">$Date: 2004/06/29 20:48:52 $</p> <div class="toc"> Table of contents </div> <ul> <li><a href="#intro">Introduction<a> <li><a href="#render">Render options<a> <li><a href="#source">PHP source syntax highlight<a> <li><a href="#run">Play demo<a> </ul> <a name="intro"> <h2><img src="../images/info.gif"/> Introduction</h2> <p>This example requires : <ul> <li>PEAR::HTML_Progress 1.2.0RC3 or better (see source at line 11).</li> </ul> </p> <hr/> <p><b>This example will run a polygonal (rectangle 6x4) ProgressBar filled in natural way.</b></p> <p>Cell coordinates are pre-computed (line 27) but free x-y-grid coordinates are also possible. Percent text info is centered on a white background area of 90 pixels width, at bottom side of polygonal shape.</p> <p>[<a href="#top">Top</a>]</p> <a name="render"> <h2><img src="../images/config.gif"/> Render options </h2> Here are options to build this progress bar string (percent text info): <pre> valign = bottom align = center width = 90 height = 30 </pre> <div class="fig">HTML_Progress_UI::setStringAttributes()</div> Here are options to build the progress bar cells : <pre> active-color = red inactive-color = orange width = 15 height = 15 </pre> <div class="fig">HTML_Progress_UI::setCellAttributes()</div> <p>[<a href="#top">Top</a>]</p> <a name="output"> <h2><img src="../images/image.gif"/> Output</h2> <h3>Screenshot </h3> <p><img src="../screenshots/rect64.png"/></p> <p>[<a href="#top">Top</a>]</p> <a name="source"> <h2><img src="../images/source.gif"/> PHP source syntax highlight</h2> <a target="_blank" href="../highlighter.php?file=newshape/rectangle.php">Open</a> source listing in a new window. <p>[<a href="#top">Top</a>]</p> <a name="run"> <h2><img src="../images/run.gif"/> Play demo</h2> <p><a href="rectangle.php">Run</a> the script.</p> </body> </html> http://cvs.php.net/co.php/pear/HTML_Progress/examples/newshape/rectangle.php?r=1.1&p=1 Index: pear/HTML_Progress/examples/newshape/rectangle.php +++ pear/HTML_Progress/examples/newshape/rectangle.php <?php @include '../include_path.php'; /** * Basic Rectangle Progress example. * * @version $Id: rectangle.php,v 1.1 2004/06/29 20:48:52 farell Exp $ * @author Laurent Laville <pear@laurent-laville.org> * @package HTML_Progress */ require_once 'HTML/Progress.php'; $bar = new HTML_Progress(); $bar->setAnimSpeed(100); $bar->setIncrement(10); $ui =& $bar->getUI(); $ui->setStringAttributes('valign=bottom align=center width=90 height=30'); $ui->setOrientation(HTML_PROGRESS_POLYGONAL); $ui->setCellAttributes(array( 'width' => 15, 'height' => 15, 'active-color' => 'red', 'inactive-color' => 'orange', ) ); $ui->setCellCoordinates(6,4); // Rectangle 6x4 ?> <html> <head> <title>Basic Rectangle ProgressBar example</title> <style type="text/css"> <!-- <?php echo $bar->getStyle(); ?> body { background-color: #FFFFFF; color: #000000; font-family: Verdana, Arial; } a:visited, a:active, a:link { color: navy; } // --> </style> <script type="text/javascript"> <!-- <?php echo $ui->getScript(); ?> //--> </script> </head> <body> <h1><?php echo basename(__FILE__); ?></h1> <?php echo $bar->toHtml(); $bar->run(); ?> <p><< <a href="../index.html">Back examples TOC</a></p> </body> </html> http://cvs.php.net/co.php/pear/HTML_Progress/examples/newshape/rectangleback.html?r=1.1&p=1 Index: pear/HTML_Progress/examples/newshape/rectangleback.html +++ pear/HTML_Progress/examples/newshape/rectangleback.html <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta name="robots" content="index,nofollow" > <meta name="keywords" content"="HTML_Progress, rectangle, progress meter" /> <meta name="description" content="Display a rectangle filled in reverse order as progress meter" /> <meta name="author" content="Laurent Laville" /> <title>PEAR::HTML::Progress example: Rectangle Back</title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <link rel="stylesheet" href="../examples.css" /> </head> <body> <a name="top"> <p><a href="../index.html"><img src="../images/home.gif" alt="Examples TOC"/>examples</a></p> <h1><span class="chapter">Rectangle Back</span></h1> <p align="right">$Date: 2004/06/29 20:48:52 $</p> <div class="toc"> Table of contents </div> <ul> <li><a href="#intro">Introduction<a> <li><a href="#render">Render options<a> <li><a href="#source">PHP source syntax highlight<a> <li><a href="#run">Play demo<a> </ul> <a name="intro"> <h2><img src="../images/info.gif"/> Introduction</h2> <p>This example requires : <ul> <li>PEAR::HTML_Progress 1.2.0RC3 or better (see source at line 11).</li> </ul> </p> <hr/> <p><b>This example will run a polygonal (rectangle 15x3) ProgressBar filled in reverse way.</b></p> <p>Cell coordinates are pre-computed (line 27) but free x-y-grid coordinates are also possible. Percent text info is right aligned on a white background area of 50 pixels width, at right side of polygonal shape (default).</p> <p>[<a href="#top">Top</a>]</p> <a name="render"> <h2><img src="../images/config.gif"/> Render options </h2> Here are options to build the progress bar cells : <pre> active-color = red inactive-color = orange width = 10 height = 10 </pre> <div class="fig">HTML_Progress_UI::setCellAttributes()</div> <p>[<a href="#top">Top</a>]</p> <a name="output"> <h2><img src="../images/image.gif"/> Output</h2> <h3>Screenshot </h3> <p><img src="../screenshots/rect153.png"/></p> <p>[<a href="#top">Top</a>]</p> <a name="source"> <h2><img src="../images/source.gif"/> PHP source syntax highlight</h2> <a target="_blank" href="../highlighter.php?file=newshape/rectangleback.php">Open</a> source listing in a new window. <p>[<a href="#top">Top</a>]</p> <a name="run"> <h2><img src="../images/run.gif"/> Play demo</h2> <p><a href="rectangleback.php">Run</a> the script.</p> </body> </html> http://cvs.php.net/co.php/pear/HTML_Progress/examples/newshape/rectangleback.php?r=1.1&p=1 Index: pear/HTML_Progress/examples/newshape/rectangleback.php +++ pear/HTML_Progress/examples/newshape/rectangleback.php <?php @include '../include_path.php'; /** * Reverse Rectangle Progress example. * * @version $Id: rectangleback.php,v 1.1 2004/06/29 20:48:52 farell Exp $ * @author Laurent Laville <pear@laurent-laville.org> * @package HTML_Progress */ require_once 'HTML/Progress.php'; $bar = new HTML_Progress(); $bar->setAnimSpeed(100); $bar->setIncrement(10); $ui =& $bar->getUI(); $ui->setFillWay('reverse'); $ui->setOrientation(HTML_PROGRESS_POLYGONAL); $ui->setCellAttributes(array( 'width' => 10, 'height' => 10, 'active-color' => 'red', 'inactive-color' => 'orange', ) ); $ui->setCellCoordinates(15,3); // Rectangle 15x3 ?> <html> <head> <title>Reverse Rectangle ProgressBar example</title> <style type="text/css"> <!-- <?php echo $bar->getStyle(); ?> body { background-color: #FFFFFF; color: #000000; font-family: Verdana, Arial; } a:visited, a:active, a:link { color: navy; } // --> </style> <script type="text/javascript"> <!-- <?php echo $ui->getScript(); ?> //--> </script> </head> <body> <h1><?php echo basename(__FILE__); ?></h1> <?php echo $bar->toHtml(); $bar->run(); ?> <p><< <a href="../index.html">Back examples TOC</a></p> </body> </html> http://cvs.php.net/co.php/pear/HTML_Progress/examples/newshape/square.html?r=1.1&p=1 Index: pear/HTML_Progress/examples/newshape/square.html +++ pear/HTML_Progress/examples/newshape/square.html <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta name="robots" content="index,nofollow" > <meta name="keywords" content"="HTML_Progress, square, progress meter" /> <meta name="description" content="Display a square as progress meter" /> <meta name="author" content="Laurent Laville" /> <title>PEAR::HTML::Progress example: Ellipse</title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <link rel="stylesheet" href="../examples.css" /> </head> <body> <a name="top"> <p><a href="../index.html"><img src="../images/home.gif" alt="Examples TOC"/>examples</a></p> <h1><span class="chapter">Square </span></h1> <p align="right">$Date: 2004/06/29 20:48:52 $</p> <div class="toc"> Table of contents </div> <ul> <li><a href="#intro">Introduction<a> <li><a href="#render">Render options<a> <li><a href="#source">PHP source syntax highlight<a> <li><a href="#run">Play demo<a> </ul> <a name="intro"> <h2><img src="../images/info.gif"/> Introduction</h2> <p>This example requires : <ul> <li>PEAR::HTML_Progress 1.2.0RC3 or better (see source at line 17).</li> </ul> </p> <hr/> <p><b>This example will run a polygonal (square 3x3) ProgressBar.</b></p> <p>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.</p> <p>Lines 34 thru 56 allows to rotate cell coordinates list and start at different origin.</p> <p>[<a href="#top">Top</a>]</p> <a name="render"> <h2><img src="../images/config.gif"/> Render options </h2> Here are options to build this progress bar string (percent text info): <pre> valign = top align = center height = 30 </pre> <div class="fig">HTML_Progress_UI::setStringAttributes()</div> Here are options to build the progress bar cells : <pre> width = 20 height = 20 </pre> <div class="fig">HTML_Progress_UI::setCellAttributes()</div> <p>[<a href="#top">Top</a>]</p> <a name="output"> <h2><img src="../images/image.gif"/> Output</h2> <h3>Screenshot </h3> <p><img src="../screenshots/square.png"/></p> <p>[<a href="#top">Top</a>]</p> <a name="source"> <h2><img src="../images/source.gif"/> PHP source syntax highlight</h2> <a target="_blank" href="../highlighter.php?file=newshape/square.php">Open</a> source listing in a new window. <p>[<a href="#top">Top</a>]</p> <a name="run"> <h2><img src="../images/run.gif"/> Play demo</h2> <p>Run the script below to build a square 3x3 beginning at : <ul> <li><a href="square.php?start=topleft">top left corner</a> (default) <li><a href="square.php?start=topright">top right corner</a> <li><a href="square.php?start=bottomright">bottom right corner</a> <li><a href="square.php?start=bottomleft">bottom left corner</a> </ul> </p> <p>[<a href="#top">Top</a>]</p> </body> </html> http://cvs.php.net/co.php/pear/HTML_Progress/examples/newshape/square.php?r=1.1&p=1 Index: pear/HTML_Progress/examples/newshape/square.php +++ pear/HTML_Progress/examples/newshape/square.php <?php @include '../include_path.php'; /** * Basic Square Progress example. * * <b>start</b> parameter could be equal to: * - 'topleft' = beginning at top left corner (default) * - 'topright' = beginning at top right corner * - 'bottomright' = beginning at bottom right corner * - 'bottomleft' = beginning at bottom left corner * * @version $Id: square.php,v 1.1 2004/06/29 20:48:52 farell Exp $ * @author Laurent Laville <pear@laurent-laville.org> * @package HTML_Progress */ require_once 'HTML/Progress.php'; $s = isset($_GET['start']) ? $_GET['start'] : 'topleft'; $bar = new HTML_Progress(); $bar->setAnimSpeed(100); $bar->setIncrement(10); $ui =& $bar->getUI(); $ui->setStringAttributes('valign=top align=center height=30'); $ui->setOrientation(HTML_PROGRESS_POLYGONAL); $ui->setCellAttributes('width=20 height=20'); $w = 3; $h = 3; $ui->setCellCoordinates($w,$h); // square 3x3 $coord = $ui->getCellCoordinates(); switch (strtolower($s)) { case 'topright': for ($i=1; $i<$w; $i++) { $shift = array_shift($coord); array_push($coord, $shift); } break; case 'bottomright': for ($i=1; $i<($w+$h-1); $i++) { $shift = array_shift($coord); array_push($coord, $shift); } break; case 'bottomleft': for ($i=1; $i<$w; $i++) { $pop = array_pop($coord); array_unshift($coord, $pop); } break; case 'topleft': default: break; } $ui->setCellCoordinates($w, $h, $coord); ?> <html> <head> <title>Basic Square ProgressBar example</title> <style type="text/css"> <!-- <?php echo $bar->getStyle(); ?> body { background-color: #FFFFFF; color: #000000; font-family: Verdana, Arial; } a:visited, a:active, a:link { color: navy; } // --> </style> <script type="text/javascript"> <!-- <?php echo $ui->getScript(); ?> //--> </script> </head> <body> <h1><?php echo basename(__FILE__); ?></h1> <?php echo $bar->toHtml(); $bar->run(); ?> <p><< <a href="../index.html">Back examples TOC</a></p> </body> </html> http://cvs.php.net/co.php/pear/HTML_Progress/examples/newshape/squareback.html?r=1.1&p=1 Index: pear/HTML_Progress/examples/newshape/squareback.html +++ pear/HTML_Progress/examples/newshape/squareback.html <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta name="robots" content="index,nofollow" > <meta name="keywords" content"="HTML_Progress, square, progress meter" /> <meta name="description" content="Display a square filled in reverse order as progress meter" /> <meta name="author" content="Laurent Laville" /> <title>PEAR::HTML::Progress example: Square Back</title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <link rel="stylesheet" href="../examples.css" /> </head> <body> <a name="top"> <p><a href="../index.html"><img src="../images/home.gif" alt="Examples TOC"/>examples</a></p> <h1><span class="chapter">Square Back</span></h1> <p align="right">$Date: 2004/06/29 20:48:52 $</p> <div class="toc"> Table of contents </div> <ul> <li><a href="#intro">Introduction<a> <li><a href="#render">Render options<a> <li><a href="#source">PHP source syntax highlight<a> <li><a href="#run">Play demo<a> </ul> <a name="intro"> <h2><img src="../images/info.gif"/> Introduction</h2> <p>This example requires : <ul> <li>PEAR::HTML_Progress 1.2.0RC3 or better (see source at line 11).</li> </ul> </p> <hr/> <p><b>This example will run a polygonal (square 4x4) ProgressBar filled in reverse way.</b></p> <p>Cell coordinates are pre-computed (line 22) but free x-y-grid coordinates are also possible. Percent text info is centered on a white background area of 50 pixels width, at left side of polygonal shape.</p> <p>[<a href="#top">Top</a>]</p> <a name="render"> <h2><img src="../images/config.gif"/> Render options </h2> Here are options to build this progress bar string (percent text info): <pre> valign = left align = center </pre> <div class="fig">HTML_Progress_UI::setStringAttributes()</div> Here are options to build the progress bar cells : <pre> width = 10 height = 10 </pre> <div class="fig">HTML_Progress_UI::setCellAttributes()</div> <p>[<a href="#top">Top</a>]</p> <a name="output"> <h2><img src="../images/image.gif"/> Output</h2> <h3>Screenshot </h3> <p><img src="../screenshots/square44.png"/></p> <p>[<a href="#top">Top</a>]</p> <a name="source"> <h2><img src="../images/source.gif"/> PHP source syntax highlight</h2> <a target="_blank" href="../highlighter.php?file=newshape/squareback.php">Open</a> source listing in a new window. <p>[<a href="#top">Top</a>]</p> <a name="run"> <h2><img src="../images/run.gif"/> Play demo</h2> <p><a href="squareback.php">Run</a> the script.</p> <p>[<a href="#top">Top</a>]</p> </body> </html> http://cvs.php.net/co.php/pear/HTML_Progress/examples/newshape/squareback.php?r=1.1&p=1 Index: pear/HTML_Progress/examples/newshape/squareback.php +++ pear/HTML_Progress/examples/newshape/squareback.php <?php @include '../include_path.php'; /** * Reverse Square Progress example. * * @version $Id: squareback.php,v 1.1 2004/06/29 20:48:52 farell Exp $ * @author Laurent Laville <pear@laurent-laville.org> * @package HTML_Progress */ require_once 'HTML/Progress.php'; $bar = new HTML_Progress(); $bar->setAnimSpeed(100); $bar->setIncrement(10); $ui =& $bar->getUI(); $ui->setStringAttributes('valign=left align=center'); $ui->setFillWay('reverse'); $ui->setOrientation(HTML_PROGRESS_POLYGONAL); $ui->setCellAttributes('width=10 height=10'); $ui->setCellCoordinates(4,4); // square 4x4 ?> <html> <head> <title>Reverse Square Progress example</title> <style type="text/css"> <!-- <?php echo $bar->getStyle(); ?> body { background-color: #FFFFFF; color: #000000; font-family: Verdana, Arial; } a:visited, a:active, a:link { color: navy; } // --> </style> <script type="text/javascript"> <!-- <?php echo $ui->getScript(); ?> //--> </script> </head> <body> <h1><?php echo basename(__FILE__); ?></h1> <?php echo $bar->toHtml(); $bar->run(); ?> <p><< <a href="../index.html">Back examples TOC</a></p> </body> </html>