shop-old/libs/phImaginator/phImaginator.Draw.class.php
2026-04-20 01:03:43 +02:00

28 lines
748 B
PHP

<?php
abstract class phImaginator_Draw extends phImaginator_Universal implements phImaginator_Module {
protected static $runCollected = false;
public static function rectangle($position_horizontal, $position_vertical, $width, $height, $color, $opacity) {
$image_data =& parent::getCurrentResource();
$bgColor = parent::transparency($image_data['resource'], $color, $opacity);
$elemPos = parent::getElementPositions($position_horizontal, $position_vertical, $image_data, $width, $height);
$elemSizes = parent::computeElementSizes($image_data, $width, $height);
imagefilledrectangle($image_data['resource'], $elemPos['x'], $elemPos['y'], $elemPos['x'] + $elemSizes['w'], $elemPos['y'] + $elemSizes['h'], $bgColor);
}
}
?>