Skip to content

Commit

Permalink
Merge pull request #2074 from rsanzante/fb-change-adapter-members-fro…
Browse files Browse the repository at this point in the history
…m-private-to-protected

Fb change adapter members from private to protected
  • Loading branch information
bsweeney committed Feb 16, 2020
2 parents 9e41499 + ab60080 commit cbe2c2f
Show file tree
Hide file tree
Showing 3 changed files with 49 additions and 49 deletions.
20 changes: 10 additions & 10 deletions src/Adapter/CPDF.php
Original file line number Diff line number Diff line change
Expand Up @@ -107,70 +107,70 @@ class CPDF implements Canvas
*
* @var Dompdf
*/
private $_dompdf;
protected $_dompdf;

/**
* Instance of Cpdf class
*
* @var Cpdf
*/
private $_pdf;
protected $_pdf;

/**
* PDF width, in points
*
* @var float
*/
private $_width;
protected $_width;

/**
* PDF height, in points
*
* @var float;
*/
private $_height;
protected $_height;

/**
* Current page number
*
* @var int
*/
private $_page_number;
protected $_page_number;

/**
* Total number of pages
*
* @var int
*/
private $_page_count;
protected $_page_count;

/**
* Text to display on every page
*
* @var array
*/
private $_page_text;
protected $_page_text;

/**
* Array of pages for accessing after rendering is initially complete
*
* @var array
*/
private $_pages;
protected $_pages;

/**
* Array of temporary cached images to be deleted when processing is complete
*
* @var array
*/
private $_image_cache;
protected $_image_cache;

/**
* Currently-applied opacity level (0 - 1)
*
* @var float
*/
private $_current_opacity = 1;
protected $_current_opacity = 1;

/**
* Class constructor
Expand Down
40 changes: 20 additions & 20 deletions src/Adapter/GD.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,98 +26,98 @@ class GD implements Canvas
/**
* @var Dompdf
*/
private $_dompdf;
protected $_dompdf;

/**
* Resource handle for the image
*
* @var resource
*/
private $_img;
protected $_img;

/**
* Resource handle for the image
*
* @var resource[]
*/
private $_imgs;
protected $_imgs;

/**
* Apparent canvas width in pixels
*
* @var int
*/
private $_width;
protected $_width;

/**
* Apparent canvas height in pixels
*
* @var int
*/
private $_height;
protected $_height;

/**
* Actual image width in pixels
*
* @var int
*/
private $_actual_width;
protected $_actual_width;

/**
* Actual image height in pixels
*
* @var int
*/
private $_actual_height;
protected $_actual_height;

/**
* Current page number
*
* @var int
*/
private $_page_number;
protected $_page_number;

/**
* Total number of pages
*
* @var int
*/
private $_page_count;
protected $_page_count;

/**
* Image antialias factor
*
* @var float
*/
private $_aa_factor;
protected $_aa_factor;

/**
* Allocated colors
*
* @var array
*/
private $_colors;
protected $_colors;

/**
* Background color
*
* @var int
*/
private $_bg_color;
protected $_bg_color;

/**
* Background color array
*
* @var int
*/
private $_bg_color_array;
protected $_bg_color_array;

/**
* Actual DPI
*
* @var int
*/
private $dpi;
protected $dpi;

/**
* Amount to scale font sizes
Expand Down Expand Up @@ -176,7 +176,7 @@ public function __construct($size = 'letter', $orientation = "portrait", Dompdf

$this->_page_number = $this->_page_count = 1;
$this->_page_text = [];

if (is_null($bg_color) || !is_array($bg_color)) {
// Pure white bg
$bg_color = [1, 1, 1, 0];
Expand Down Expand Up @@ -281,7 +281,7 @@ public function set_opacity($opacity, $mode = "Normal")
* @param array $color The new current color
* @return int The allocated color
*/
private function _allocate_color($color)
protected function _allocate_color($color)
{
$a = isset($color["alpha"]) ? $color["alpha"] : 1;

Expand Down Expand Up @@ -328,7 +328,7 @@ private function _allocate_color($color)
* @param float $length
* @return float
*/
private function _upscale($length)
protected function _upscale($length)
{
return ($length * $this->dpi) / 72 * $this->_aa_factor;
}
Expand All @@ -339,7 +339,7 @@ private function _upscale($length)
* @param float $length
* @return float
*/
private function _downscale($length)
protected function _downscale($length)
{
return ($length / $this->dpi * 72) / $this->_aa_factor;
}
Expand Down Expand Up @@ -920,7 +920,7 @@ public function get_font_height($font, $size)
return $this->_downscale($height);
}

private function get_font_height_actual($font, $size)
protected function get_font_height_actual($font, $size)
{
$font = $this->get_ttf_file($font);
$ratio = $this->_dompdf->getOptions()->getFontHeightRatio();
Expand Down Expand Up @@ -1049,7 +1049,7 @@ public function output($options = [])
* @param array $options Associative array: 'type' => jpeg|jpg|png; 'quality' => 0 - 100 (JPEG only);
* 'page' => Number of the page to output (defaults to the first).
*/
private function _output($options = [])
protected function _output($options = [])
{
if (!isset($options["type"])) $options["type"] = "png";
if (!isset($options["page"])) $options["page"] = 1;
Expand Down
Loading

0 comments on commit cbe2c2f

Please sign in to comment.