.
*/
namespace Fisharebest\Webtrees\Report;
/**
* Class ReportBaseCell
*/
class ReportBaseCell extends ReportBaseElement
{
/**
* Allows to center or align the text. Possible values are:
- left or empty string: left align
- center: center align
- right: right align
- justify: justification (default value when $ishtml=false)
*
* @var string
*/
public $align = '';
/**
* Whether or not a border should be printed around this box. 0 = no border, 1 = border. Default is 0.
* Or a string containing some or all of the following characters (in any order):- L: left
- T: top
- R: right
- B: bottom
*
* @var mixed
*/
public $border;
/**
* Border color in HTML code
*
* @var string
*/
public $bocolor;
/**
* The HTML color code to fill the background of this cell.
*
* @var string
*/
public $bgcolor;
/**
* Indicates if the cell background must be painted (1) or transparent (0). Default value: 1.
* If no background color is set then it will not be painted
*
* @var int
*/
public $fill;
/**
* Cell height DEFAULT 0 (expressed in points)
* The starting height of this cell. If the text wraps the height will automatically be adjusted.
*
* @var int
*/
public $height;
/**
* Left position in user units (X-position). Default is the current position
*
* @var mixed
*/
public $left;
/**
* Indicates where the current position should go after the call. Possible values are:- 0: to the right [DEFAULT]
- 1: to the beginning of the next line
- 2: below
*
* @var int
*/
public $newline;
/**
* The name of the Style that should be used to render the text.
*
* @var string
*/
public $styleName;
/**
* Stretch carachter mode: - 0 = disabled (default)
- 1 = horizontal scaling only if necessary
- 2 = forced horizontal scaling
- 3 = character spacing only if necessary
- 4 = forced character spacing
*
* @var int
*/
public $stretch;
/**
* Text color in HTML code
*
* @var string
*/
public $tcolor;
/**
* Top position in user units (Y-position). Default is the current position
*
* @var mixed
*/
public $top;
/**
* URL address
*
* @var string
*/
public $url;
/**
* Cell width DEFAULT 0 (expressed in points)
* Setting the width to 0 will make it the width from the current location to the right margin.
*
* @var int
*/
public $width;
/** @var int Unknown */
public $reseth;
/**
* CELL - Element
*
* @param int $width cell width (expressed in points)
* @param int $height cell height (expressed in points)
* @param mixed $border Border style
* @param string $align Text alignement
* @param string $bgcolor Background color code
* @param string $style The name of the text style
* @param int $ln Indicates where the current position should go after the call
* @param mixed $top Y-position
* @param mixed $left X-position
* @param int $fill Indicates if the cell background must be painted (1) or transparent (0). Default value: 0.
* @param int $stretch Stretch carachter mode
* @param string $bocolor Border color
* @param string $tcolor Text color
* @param $reseth
*/
public function __construct($width, $height, $border, $align, $bgcolor, $style, $ln, $top, $left, $fill, $stretch, $bocolor, $tcolor, $reseth)
{
$this->align = $align;
$this->border = $border;
$this->bgcolor = $bgcolor;
$this->bocolor = $bocolor;
$this->fill = $fill;
$this->height = $height;
$this->left = $left;
$this->newline = $ln;
$this->styleName = $style;
$this->text = '';
$this->tcolor = $tcolor;
$this->top = $top;
$this->url = '';
$this->stretch = $stretch;
$this->width = $width;
$this->reseth = $reseth;
return 0;
}
/**
* Get the cell height
*
* @param $renderer
*
* @return float
*/
public function getHeight($renderer)
{
return $this->height;
}
/**
* Sets the current cells URL
*
* @param string $url The URL address to save
*
* @return int
*/
public function setUrl($url)
{
$this->url = $url;
return 0;
}
/**
* Get the cell width
*
* @param $renderer
*
* @return float
*/
public function getWidth($renderer)
{
return $this->width;
}
}