Pixmap¶
-
php\gdx\graphics\Pixmap
Class Pixmap
Methods
__construct
($width, $height, $format)¶
Parameters:
- $width – int
- $height – int
- $format – string - - Alpha, Intensity, LuminanceAlpha, RGB565, RGBA4444, RGB888, RGBA8888
- static
ofFile
($fileHandle)¶
Parameters:
- $fileHandle – php\gdx\files\FileHandle
Returns: string
setColor
($redOrColor, $g, $b, $a)¶
Parameters:
- $redOrColor – double, int
- $g – double - (optional)
- $b – double - (optional)
- $a – double - (optional)
fill
()¶
drawLine
($x, $y, $x2, $y2)¶
Parameters:
- $x – int
- $y – int
- $x2 – int
- $y2 – int
drawRectangle
($x, $y, $width, $height)¶
Parameters:
- $x – int
- $y – int
- $width – int
- $height – int
drawPixmap
($pixmap, $x, $y, $srcx, $srcy, $srcWidth, $srcHeight)¶
Parameters:
- $pixmap – php\gdx\graphics\Pixmap
- $x – int
- $y – int
- $srcx – int - (optional)
- $srcy – int - (optional)
- $srcWidth – int - (optional)
- $srcHeight – int - (optional)
fillRectangle
($x, $y, $width, $height)¶
Parameters:
- $x – int
- $y – int
- $width – int
- $height – int
drawCircle
($x, $y, $radius)¶
Parameters:
- $x – int
- $y – int
- $radius – int
fillCircle
($x, $y, $radius)¶
Parameters:
- $x – int
- $y – int
- $radius – int
fillTriangle
($x1, $y1, $x2, $y2, $x3, $y3)¶
Parameters:
- $x1 – int
- $y1 – int
- $x2 – int
- $y2 – int
- $x3 – int
- $y3 – int
getPixel
($x, $y)¶
Parameters:
- $x – int
- $y – int
Returns: int The pixel color in RGBA8888 format.
getWidth
()¶
Returns: int
getHeight
()¶
Returns: int
dispose
()¶
drawPixel
($x, $y, $color)¶
Parameters:
- $x – int
- $y – int
- $color – int - (optional)
getGLFormat
()¶
Returns: int one of GL_ALPHA, GL_RGB, GL_RGBA, GL_LUMINANCE, or GL_LUMINANCE_ALPHA.
getGLInternalFormat
()¶
Returns: int one of GL_ALPHA, GL_RGB, GL_RGBA, GL_LUMINANCE, or GL_LUMINANCE_ALPHA.
getGLType
()¶
Returns: int one of GL_UNSIGNED_BYTE, GL_UNSIGNED_SHORT_5_6_5, GL_UNSIGNED_SHORT_4_4_4_4
getFormat
()¶
Returns: string
getBlending
()¶
Returns: string None, SourceOver
- static
setBlending
($blending)¶Sets the type of Blending to be used for all operations. Default is ‘SourceOver’
Parameters:
- $blending – string
- static
setFilter
($filter)¶Filters to be used with Pixmap.drawPixmap(Pixmap, int, int, int, int, int, int, int, int).
Parameters:
- $filter – string - NearestNeighbour, BiLinear