HTML_Progress
[ class tree: HTML_Progress ] [ index: HTML_Progress ] [ all elements ]
Prev Next

getCellCoordinates Manual

returns the coordinates of each cell for a polygonal progress shape

by by Laurent Laville
mailto:pear@laurent-laville.org
March 2004, Laurent Laville
(HTML_Progress 1.2+)

Synopsis

array getCellCoordinates()

Description

The getCellCoordinates() method is used to retrieve coordinates of progress bar cells (polygonal shape).

Example

Example below will print cell coordinates list of a square 3x3 progress shape:

  1. <?php
  2. require_once ('HTML/Progress.php');
  3.  
  4. $bar = new HTML_Progress();
  5.  
  6. $ui =$bar->getUI();
  7. $ui->setCellCoordinates(3,3);          // square 3x3
  8.  
  9. print '<pre>';
  10. var_dump($ui->getCellCoordinates());
  11. print '</pre>';
  12. ?>
array(8) {
  [0]=>
  array(2) {
    [0]=>
    int(0)
    [1]=>
    int(0)
  }
  [1]=>
  array(2) {
    [0]=>
    int(0)
    [1]=>
    int(1)
  }
  [2]=>
  array(2) {
    [0]=>
    int(0)
    [1]=>
    int(2)
  }
  [3]=>
  array(2) {
    [0]=>
    int(1)
    [1]=>
    int(2)
  }
  [4]=>
  array(2) {
    [0]=>
    int(2)
    [1]=>
    int(2)
  }
  [5]=>
  array(2) {
    [0]=>
    int(2)
    [1]=>
    int(1)
  }
  [6]=>
  array(2) {
    [0]=>
    int(2)
    [1]=>
    int(0)
  }
  [7]=>
  array(2) {
    [0]=>
    int(1)
    [1]=>
    int(0)
  }
}
   

See Also

setCellCoordinates Manual

Prev Up Next
setCellAttributes Manual Reference Guides setCellCoordinates Manual

Documentation generated on Mon, 11 Mar 2019 13:52:35 -0400 by phpDocumentor 1.4.4. PEAR Logo Copyright © PHP Group 2004.