Pixmap

php\gdx\graphics\Pixmap

Class Pixmap

Methods


__construct($width, $height, $format)
Параметры:
  • $widthint
  • $heightint
  • $formatstring - - Alpha, Intensity, LuminanceAlpha, RGB565, RGBA4444, RGB888, RGBA8888
static ofFile($fileHandle)
Параметры:
Результат:

string

setColor($redOrColor, $g, $b, $a)
Параметры:
  • $redOrColordouble, int
  • $gdouble - (optional)
  • $bdouble - (optional)
  • $adouble - (optional)
fill()
drawLine($x, $y, $x2, $y2)
Параметры:
  • $xint
  • $yint
  • $x2int
  • $y2int
drawRectangle($x, $y, $width, $height)
Параметры:
  • $xint
  • $yint
  • $widthint
  • $heightint
drawPixmap($pixmap, $x, $y, $srcx, $srcy, $srcWidth, $srcHeight)
Параметры:
  • $pixmapphp\gdx\graphics\Pixmap
  • $xint
  • $yint
  • $srcxint - (optional)
  • $srcyint - (optional)
  • $srcWidthint - (optional)
  • $srcHeightint - (optional)
fillRectangle($x, $y, $width, $height)
Параметры:
  • $xint
  • $yint
  • $widthint
  • $heightint
drawCircle($x, $y, $radius)
Параметры:
  • $xint
  • $yint
  • $radiusint
fillCircle($x, $y, $radius)
Параметры:
  • $xint
  • $yint
  • $radiusint
fillTriangle($x1, $y1, $x2, $y2, $x3, $y3)
Параметры:
  • $x1int
  • $y1int
  • $x2int
  • $y2int
  • $x3int
  • $y3int
getPixel($x, $y)
Параметры:
  • $xint
  • $yint
Результат:

int The pixel color in RGBA8888 format.

getWidth()
Результат:int
getHeight()
Результат:int
dispose()
drawPixel($x, $y, $color)
Параметры:
  • $xint
  • $yint
  • $colorint - (optional)
getGLFormat()
Результат:int one of GL_ALPHA, GL_RGB, GL_RGBA, GL_LUMINANCE, or GL_LUMINANCE_ALPHA.
getGLInternalFormat()
Результат:int one of GL_ALPHA, GL_RGB, GL_RGBA, GL_LUMINANCE, or GL_LUMINANCE_ALPHA.
getGLType()
Результат:int one of GL_UNSIGNED_BYTE, GL_UNSIGNED_SHORT_5_6_5, GL_UNSIGNED_SHORT_4_4_4_4
getFormat()
Результат:string
getBlending()
Результат:string None, SourceOver
static setBlending($blending)

Sets the type of Blending to be used for all operations. Default is ‘SourceOver’

Параметры:
  • $blendingstring
static setFilter($filter)

Filters to be used with Pixmap.drawPixmap(Pixmap, int, int, int, int, int, int, int, int).

Параметры:
  • $filterstring - NearestNeighbour, BiLinear