Pixmap¶
-
php\gdx\graphics\Pixmap
Class Pixmap
Methods
__construct
($width, $height, $format)¶
Параметры:
- $width –
int
- $height –
int
- $format –
string
- - Alpha, Intensity, LuminanceAlpha, RGB565, RGBA4444, RGB888, RGBA8888
- static
ofFile
($fileHandle)¶
Параметры:
- $fileHandle – php\gdx\files\FileHandle
Результат:
string
setColor
($redOrColor, $g, $b, $a)¶
Параметры:
- $redOrColor –
double
,int
- $g –
double
- (optional)- $b –
double
- (optional)- $a –
double
- (optional)
fill
()¶
drawLine
($x, $y, $x2, $y2)¶
Параметры:
- $x –
int
- $y –
int
- $x2 –
int
- $y2 –
int
drawRectangle
($x, $y, $width, $height)¶
Параметры:
- $x –
int
- $y –
int
- $width –
int
- $height –
int
drawPixmap
($pixmap, $x, $y, $srcx, $srcy, $srcWidth, $srcHeight)¶
Параметры:
- $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)¶
Параметры:
- $x –
int
- $y –
int
- $width –
int
- $height –
int
drawCircle
($x, $y, $radius)¶
Параметры:
- $x –
int
- $y –
int
- $radius –
int
fillCircle
($x, $y, $radius)¶
Параметры:
- $x –
int
- $y –
int
- $radius –
int
fillTriangle
($x1, $y1, $x2, $y2, $x3, $y3)¶
Параметры:
- $x1 –
int
- $y1 –
int
- $x2 –
int
- $y2 –
int
- $x3 –
int
- $y3 –
int
getPixel
($x, $y)¶
Параметры:
- $x –
int
- $y –
int
Результат:
int
The pixel color in RGBA8888 format.
getWidth
()¶
Результат: int
getHeight
()¶
Результат: int
dispose
()¶
drawPixel
($x, $y, $color)¶
Параметры:
- $x –
int
- $y –
int
- $color –
int
- (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’
Параметры:
- $blending –
string
- static
setFilter
($filter)¶Filters to be used with Pixmap.drawPixmap(Pixmap, int, int, int, int, int, int, int, int).
Параметры:
- $filter –
string
- NearestNeighbour, BiLinear