VideoChip
Properties
Mode VideoChipMode
The SingleBuffer/DoubleBuffer mode for this VideoChip.
Height numberread only
Height in pixels of the rendering buffer. The area takes in account all the displays cound to this VideoChip.
Width numberread only
WIdth in pixels of the rendering buffer. The area takes in account all the displays cound to this VideoChip.
Methods
Clear( color color )
Clears all the render area with the specified color
SetPixel( position vec2, color color )
Sets the pixel at the specified position to the specified color
DrawPointGrid( gridOffset vec2, dotsDistance number, color color )
Draws a dotted grid on the entire display area, with an offset. The dotsDistance parameter express the distance in pixels, on both axis, between dots.
DrawLine( start vec2, end vec2, color color )
Draws a line from position start to position end, using the specified color
DrawCircle( position vec2, radius number, color color )
Draws an empty circle at the specified position, with the specified radius, in the specified color.
FillCircle( position vec2, radius number, color color )
Draws a filled circle at the specified position, with the specified radius, in the specified color.
DrawRect( position1 vec2, position2 vec2, color color )
Draws an empty rect from position1 to position2, in the specified color.
FillRect( position1 vec2, position2 vec2, color color )
Draws a filled rect from position1 to position2, in the specified color.
DrawTriangle( position1 vec2, position2 vec2, position3 vec2, color color )
Draws an empty triangle with vertexes in position1,position2 and position3, in the specified color.
FillTriangle( position1 vec2, position2 vec2, position3 vec2, color color )
Draws a filled triangle with vertexes in position1,position2 and position3, in the specified color.
DrawSprite( position vec2, spriteSheet SpriteSheet, spriteX number, spriteY number, tintColor color, backgroundColor color )
Draws a specific sprite frame from the spriteSheet.
Position is the on-screen sprite desired position starting from the top left corner,
spriteSheet is the SpriteSheet asset containing the sprite frame to draw,
spriteX and spriteY are the coordinates to identify the desired sprite frame starting from the, top left corner, expressed in grid units.
spriteX=0 and spriteY=0 are the coordinates of the first sprite, top left.
tintColor is the color multiplier used to draw the sprite frame. Color(255,255,255) or color.white will leave the sprite frame unaffected.
backgroundColor is the color used to replay the transparent areas of the spriteFrame.
Using ColorRGBA(0,0,0,0) or color.clear will leave the transparency as it is.
DrawCustomSprite( position vec2, spriteSheet SpriteSheet, spriteOffset vec2, spriteSize vec2, tintColor color, backgroundColor color )
Draw a portion of a SpriteSheet (defined by spriteOffset, spriteSize) without taking into account the grid
DrawText( position vec2, fontSprite SpriteSheet, text string, textColor color, backgroundColor color )
Draws the string contained in the text parameter, at the desired position, using textColor and backgroundColor.
The parameter fontSprite expect a spriteSheet asset labeled as font.
By placing a ROM you can access the sandard font: gdt.ROM.System.SpriteSheets["StandardFont"]
RasterSprite( position1 vec2, position2 vec2, position3 vec2, position4 vec2, spriteSheet SpriteSheet, spriteX number, spriteY number, tintColor color, backgroundColor color )
Draws a specific sprite frame from the spriteSheet mapping it on a quad identified by position1, position2, position3, position4
RasterCustomSprite( position1 vec2, position2 vec2, position3 vec2, position4 vec2, spriteSheet SpriteSheet, spriteOffset vec2, spriteSize vec2, tintColor color, backgroundColor color )
Draws a portion of a SpriteSheet (defined by spriteOffset, spriteSize) without taking into account the grid mapping it on a quad identified by position1, position2, position3, position4
DrawRenderBuffer( position vec2, renderBuffer RenderBuffer, width number, height number )
Draws a render buffer (supposedly coming from Webcam component) at the desired position, width and height