#
Draw(x, y)
Draw the image to the canvas at given coordinates.
Parameters:
Name |
Type |
Description |
x |
number
|
position to draw to. |
y |
number
|
position to draw to. |
View Source
doc/classes.js, line 101
#
DrawAdvanced(srcX, srcY, srcW, srcH, destX, destY, destW, destH)
Draw the image to the canvas at given coordinates.
Parameters:
Name |
Type |
Description |
srcX |
number
|
source position to draw from. |
srcY |
number
|
source position to draw from. |
srcW |
number
|
source size to draw from. |
srcH |
number
|
source size to draw from. |
destX |
number
|
position to draw to. |
destY |
number
|
position to draw to. |
destW |
number
|
size to draw. |
destH |
number
|
size to draw. |
View Source
doc/classes.js, line 114
#
DrawTrans(x, y)
Draw the image to the canvas at given coordinates using the alpha channel transparency. Only works for 32bit TGA with alpha channel information.
Parameters:
Name |
Type |
Description |
x |
number
|
position to draw to. |
y |
number
|
position to draw to. |
View Source
doc/classes.js, line 120
#
FxDrawLfb(x, y, buffer, pipeline)
draw the bitmap directly into the 3dfx/voodoo framebuffer (only works when fxInit() was called).
Parameters:
Name |
Type |
Description |
x |
number
|
position to draw to. |
y |
number
|
position to draw to. |
buffer |
GR_BUFFER
|
one of FRONTBUFFER, BACKBUFFER or AUXBUFFER |
pipeline |
boolean
|
true if the pixels shall be processed by the voodoos pixel pipeline, false to just draw. |
View Source
doc/classes.js, line 136
#
GetPixel(x, y) → {number}
Get the color of a pixel of this image.
Parameters:
Name |
Type |
Description |
x |
number
|
position. |
y |
number
|
position. |
View Source
doc/classes.js, line 127
the color of the pixel.
number