GPU T1 Buffer
A structure that can hold a buffer of characters and colors that can be displayed with a gpu
Functions
clone () → buffer : Struct<GPUT1Buffer>
Clones this buffer into a new struct
Details
Flags |
RuntimeSync RuntimeParallel MemberFunc |
Display Name |
Clone |
| Name | Type | Description |
|---|---|---|
Buffer |
Struct<GPUT1Buffer> |
The clone of this buffer |
copy (x : Int, y : Int, buffer : Struct<GPUT1Buffer>, textBlendMode : Int, foregroundBlendMode : Int, backgroundBlendMode : Int)
Copies the given buffer at the given offset of the upper left corner into this buffer.
Details
Flags |
RuntimeSync RuntimeParallel RuntimeAsync MemberFunc |
Display Name |
Copy |
| Name | Type | Description |
|---|---|---|
X |
Int |
The x offset of the upper left corner of the buffer relative to this buffer |
Y |
Int |
The y offset of the upper left corener of the buffer relative to this buffer |
Buffer |
Struct<GPUT1Buffer> |
The buffer from wich you want to copy from |
Text Blend Mode |
Int |
The blend mode that is used for the text. 0 = Overwrite this with the content of the given buffer 1 = Overwrite with only characters that are not ' ' 2 = Overwrite only were this characters are ' ' 3 = Keep this buffer |
Foreground Color Blend Mode |
Int |
The blend mode that is used for the foreground color. 0 = Overwrite with the given color 1 = Normal alpha composition 2 = Multiply 3 = Divide 4 = Addition 5 = Subtraction 6 = Difference 7 = Darken Only 8 = Lighten Only 9 = None |
Background Color Blend Mode |
Int |
The blend mode that is used for the background color. 0 = Overwrite with the given color 1 = Normal alpha composition 2 = Multiply 3 = Divide 4 = Addition 5 = Subtraction 6 = Difference 7 = Darken Only 8 = Lighten Only 9 = None |
fill (x : Int, y : Int, width : Int, height : Int, character : String, foreground : Struct<Color>, background : Struct<Color>)
Draws the given character at all given positions in the given rectangle on-to the hidden screen buffer.
Details
Flags |
RuntimeSync RuntimeParallel RuntimeAsync MemberFunc |
Display Name |
Fill |
| Name | Type | Description |
|---|---|---|
X |
Int |
The x coordinate at which the rectangle should get drawn. (upper-left corner) |
Y |
Int |
The y coordinate at which the rectangle should get drawn. (upper-left corner) |
Width |
Int |
The width of the rectangle. |
Height |
Int |
The height of the rectangle. |
Character |
String |
A string with a single character that will be used for each pixel in the range you want to fill. |
Foreground |
Struct<Color> |
The foreground color which will be used to fill the rectangle. |
Background |
Struct<Color> |
The background color which will be used to fill the rectangle. |
get (x : Int, y : Int) → (c : String, foreground : Struct<Color>, background : Struct<Color>)
Allows to get a single pixel from the buffer at the given position
Details
Flags |
RuntimeSync RuntimeParallel RuntimeAsync MemberFunc |
Display Name |
Get |
| Name | Type | Description |
|---|---|---|
X |
Int |
The x position of the character you want to get |
Y |
Int |
The y position of the character you want to get |
| Name | Type | Description |
|---|---|---|
Char |
String |
The character at the given position |
Foreground Color |
Struct<Color> |
The foreground color of the pixel at the given position |
Background Color |
Struct<Color> |
The background color of the pixel at the given position |
getSize () → (width : Float, height : Float)
Allows to get the dimensions of the buffer.
Details
Flags |
RuntimeSync RuntimeParallel RuntimeAsync MemberFunc |
Display Name |
Get Size |
| Name | Type | Description |
|---|---|---|
Width |
Float |
The width of this buffer |
Height |
Float |
The height of this buffer |
set (x : Int, y : Int, c : String, foreground : Struct<Color>, background : Struct<Color>) → done : Bool
Allows to set a single pixel of the buffer at the given position
Details
Flags |
RuntimeSync RuntimeParallel RuntimeAsync MemberFunc |
Display Name |
Set |
| Name | Type | Description |
|---|---|---|
X |
Int |
The x position of the character you want to set |
Y |
Int |
The y position of the character you want to set |
Char |
String |
The character the pixel should have |
Foreground Color |
Struct<Color> |
The foreground color the pixel at the given position should have |
Background Color |
Struct<Color> |
The background color the pixel at the given position should have |
| Name | Type | Description |
|---|---|---|
Done |
Bool |
True if the pixel got set successfully |
setRaw (characters : String, foreground : Array<Float>, background : Array<Float>) → success : Bool
Allows to set the internal data of the buffer more directly.
Details
Flags |
RuntimeSync RuntimeParallel RuntimeAsync MemberFunc |
Display Name |
Set Raw |
| Name | Type | Description |
|---|---|---|
Characters |
String |
The characters you want to draw with a length of exactly width*height. |
Foreground Color |
Array<Float> |
The values of the foreground color slots for each character were a group of four values give one color. so the length has to be exactly width*height*4. |
Background Color |
Array<Float> |
The values of the background color slots for each character were a group of four values give one color. so the length has to be exactly width*height*4. |
| Name | Type | Description |
|---|---|---|
Success |
Bool |
True if the raw data was successfully written |
setSize (width : Float, height : Float)
Allows to set the dimensions of the buffer.
Details
Flags |
RuntimeSync RuntimeParallel RuntimeAsync MemberFunc |
Display Name |
Set Size |
| Name | Type | Description |
|---|---|---|
Width |
Float |
The width this buffer should now have |
Height |
Float |
The height this buffer now have |
setText (x : Int, y : Int, text : String, foreground : Struct<Color>, background : Struct<Color>)
Allows to write the given text onto the buffer and with the given offset.
Details
Flags |
RuntimeSync RuntimeParallel RuntimeAsync MemberFunc |
Display Name |
Set Text |
| Name | Type | Description |
|---|---|---|
X |
Int |
The X Position at which the text should begin to get written. |
Y |
Int |
The Y Position at which the text should begin to get written. |
Text |
String |
The text that should get written. |
Foreground |
Struct<Color> |
The foreground color which will be used to write the text. |
Background |
Struct<Color> |
The background color which will be used to write the text. |