Initial import: Carteasy Shop (Dev-Stand)
This commit is contained in:
@@ -0,0 +1,47 @@
|
||||
<?php
|
||||
|
||||
|
||||
abstract class phImaginator_Flip extends phImaginator_Universal implements phImaginator_Module {
|
||||
|
||||
protected static $runCollected = false;
|
||||
|
||||
|
||||
public static function horizontal() {
|
||||
$image_data =& parent::getCurrentResource();
|
||||
|
||||
$image = imagecreatetruecolor($image_data['width'], $image_data['height']);
|
||||
imagealphablending($image, false);
|
||||
imagesavealpha($image, true);
|
||||
|
||||
imagecopyresampled($image, $image_data['resource'], 0, 0, 0, $image_data['height'] - 1, $image_data['width'], $image_data['height'], $image_data['width'], -$image_data['height']);
|
||||
|
||||
$image_data['resource'] = $image;
|
||||
}
|
||||
|
||||
|
||||
public static function vertical() {
|
||||
$image_data =& parent::getCurrentResource();
|
||||
|
||||
$image = imagecreatetruecolor($image_data['width'], $image_data['height']);
|
||||
imagealphablending($image, false);
|
||||
imagesavealpha($image, true);
|
||||
|
||||
imagecopyresampled($image, $image_data['resource'], 0, 0, $image_data['width'] - 1, 0, $image_data['width'], $image_data['height'], -$image_data['width'], $image_data['height']);
|
||||
|
||||
$image_data['resource'] = $image;
|
||||
}
|
||||
|
||||
|
||||
public static function both() {
|
||||
self::horizontal();
|
||||
self::vertical();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
?>
|
||||
Reference in New Issue
Block a user