REDROOM
PHP 8.3.30
Path:
Logout
Edit File
Size: 2.71 KB
Close
/home/getspomw/itechservicellc.com/vendor/dompdf/dompdf/src/FrameDecorator/ListBulletImage.php
Text
Base64
<?php /** * @package dompdf * @link https://github.com/dompdf/dompdf * @license http://www.gnu.org/copyleft/lesser.html GNU Lesser General Public License */ namespace Dompdf\FrameDecorator; use Dompdf\Dompdf; use Dompdf\Frame; use Dompdf\Image\Cache; /** * Decorates frames for list bullets with custom images * * @package dompdf */ class ListBulletImage extends ListBullet { /** * The underlying image frame * * @var Image */ protected $_img; /** * The image's width in pixels * * @var float */ protected $_width; /** * The image's height in pixels * * @var float */ protected $_height; /** * ListBulletImage constructor. * @param Frame $frame * @param Dompdf $dompdf */ function __construct(Frame $frame, Dompdf $dompdf) { $style = $frame->get_style(); $url = $style->list_style_image; $frame->get_node()->setAttribute("src", $url); $this->_img = new Image($frame, $dompdf); parent::__construct($this->_img, $dompdf); $url = $this->_img->get_image_url(); if (Cache::is_broken($url)) { $this->_width = parent::get_width(); $this->_height = parent::get_height(); } else { // Resample the bullet image to be consistent with 'auto' sized images [$width, $height] = $this->_img->get_intrinsic_dimensions(); $this->_width = $this->_img->resample($width); $this->_height = $this->_img->resample($height); } } public function get_width(): float { return $this->_width; } public function get_height(): float { return $this->_height; } public function get_margin_width(): float { $style = $this->get_style(); return $this->_width + $style->font_size * self::MARKER_INDENT; } public function get_margin_height(): float { $fontMetrics = $this->_dompdf->getFontMetrics(); $style = $this->get_style(); $font = $style->font_family; $size = $style->font_size; $fontHeight = $fontMetrics->getFontHeight($font, $size); $baseline = $fontMetrics->getFontBaseline($font, $size); // This is the same factor as used in // `FrameDecorator\Text::get_margin_height()` $f = $style->line_height / ($size > 0 ? $size : 1); // FIXME: Tries to approximate replacing the space above the font // baseline with the image return $f * ($fontHeight - $baseline) + $this->_height; } /** * Return image url * * @return string */ function get_image_url() { return $this->_img->get_image_url(); } }
Save
Close
Exit & Reset
Text mode: syntax highlighting auto-detects file type.
Directory Contents
Dirs: 0 × Files: 13
Delete Selected
Select All
Select None
Sort:
Name
Size
Modified
Enable drag-to-move
Name
Size
Perms
Modified
Actions
AbstractFrameDecorator.php
21.99 KB
lrw-r--r--
2025-10-28 20:22:00
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
Block.php
5.98 KB
lrw-r--r--
2025-10-28 20:22:00
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
Image.php
2.98 KB
lrw-r--r--
2025-10-28 20:22:00
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
Inline.php
3.74 KB
lrw-r--r--
2025-10-28 20:22:00
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
ListBullet.php
2.76 KB
lrw-r--r--
2025-10-28 20:22:00
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
ListBulletImage.php
2.71 KB
lrw-r--r--
2025-10-28 20:22:00
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
NullFrameDecorator.php
726 B
lrw-r--r--
2025-10-28 20:22:00
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
Page.php
24.44 KB
lrw-r--r--
2025-10-28 20:22:00
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
Table.php
9.83 KB
lrw-r--r--
2025-10-28 20:22:00
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
TableCell.php
2.64 KB
lrw-r--r--
2025-10-28 20:22:00
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
TableRow.php
571 B
lrw-r--r--
2025-10-28 20:22:00
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
TableRowGroup.php
2.00 KB
lrw-r--r--
2025-10-28 20:22:00
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
Text.php
6.81 KB
lrw-r--r--
2025-10-28 20:22:00
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
Zip Selected
If ZipArchive is unavailable, a
.tar
will be created (no compression).