Source for file GD.php
Documentation is available at GD.php
protected function _getColor(Image_3D_Color $color)
$values = $color->getValues ();
$values[0 ] = (int) round($values[0 ] * 255 );
$values[1 ] = (int) round($values[1 ] * 255 );
$values[2 ] = (int) round($values[2 ] * 255 );
$values[3 ] = (int) round($values[3 ] * 127 );
// Tranzparente Farbe allokieren
$color = imageColorExactAlpha ($this->_image, $values[0 ], $values[1 ], $values[2 ], $values[3 ]);
// Wenn nicht Farbe neu alloziieren
$color = imageColorAllocateAlpha ($this->_image, $values[0 ], $values[1 ], $values[2 ], $values[3 ]);
// Deckende Farbe allozieren
$color = imageColorExact ($this->_image, $values[0 ], $values[1 ], $values[2 ]);
// Wenn nicht Farbe neu alloziieren
$color = imageColorAllocate ($this->_image, $values[0 ], $values[1 ], $values[2 ]);
$points = $polygon->getPoints ();
foreach ($points as $point) {
$coords = array_merge($coords, $point->getScreenCoordinates ());
$coordCount = (int) (count($coords) / 2 );
imageFilledPolygon ($this->_image, $coords, $coordCount, $this->_getColor($polygon->getColor ()));
imagePolygon ($this->_image, $coords, $coordCount, $this->_getColor($polygon->getColor ()));
if (in_array($type, array ('png', 'jpeg'))) {
public function save($file)
Documentation generated on Mon, 11 Mar 2019 15:48:14 -0400 by phpDocumentor 1.4.4. PEAR Logo Copyright © PHP Group 2004.
|