FINComputerGPUT2
Parent |
Functions
drawBezier (p0 : Struct<Vector2D>, p1 : Struct<Vector2D>, p2 : Struct<Vector2D>, p3 : Struct<Vector2D>, thickness : Float, color : Struct<Color>)
Draws a Cubic Bezier Spline from one position to another with given control points, thickness and color.
Details
Flags |
RuntimeSync RuntimeParallel RuntimeAsync MemberFunc |
Display Name |
Draw Bezier |
| Name | Type | Description |
|---|---|---|
P0 |
Struct<Vector2D> |
The local position of the start point of the spline. |
P1 |
Struct<Vector2D> |
The local position of the first control point. |
P2 |
Struct<Vector2D> |
The local position of the second control point. |
P3 |
Struct<Vector2D> |
The local position of the end point of the spline. |
Thickness |
Float |
The thickness of the line drawn. |
Color |
Struct<Color> |
The color of the line drawn. |
drawBox (boxSettings : Struct<GPUT2DrawCallBox>)
Draws a box.
Details
Flags |
RuntimeSync RuntimeParallel RuntimeAsync MemberFunc |
Display Name |
Draw Box |
| Name | Type | Description |
|---|---|---|
Box Settings |
Struct<GPUT2DrawCallBox> |
The settings of the box you want to draw. |
drawLines (points : Array<Struct<Vector2D>>, thickness : Float, color : Struct<Color>)
Draws connected lines through all given points with the given thickness and color.
Details
Flags |
RuntimeSync RuntimeParallel RuntimeAsync MemberFunc |
Display Name |
Draw Lines |
| Name | Type | Description |
|---|---|---|
Points |
Array<Struct<Vector2D>> |
The local points that get connected by lines one after the other. |
thickness |
Float |
The thickness of the lines. |
Color |
Struct<Color> |
The color of the lines. |
drawRect (position : Struct<Vector2D>, size : Struct<Vector2D>, color : Struct<Color>, image : String, rotation : Float)
Draws a Rectangle with the upper left corner at the given local position, size, color and rotation around the upper left corner.
Details
Flags |
RuntimeSync RuntimeParallel RuntimeAsync MemberFunc |
Display Name |
Draw Rectangle |
| Name | Type | Description |
|---|---|---|
Position |
Struct<Vector2D> |
The local position of the upper left corner of the rectangle. |
Size |
Struct<Vector2D> |
The size of the rectangle. |
Color |
Struct<Color> |
The color of the rectangle. |
Image |
String |
If not empty string, should be image reference that should be placed inside the rectangle. |
Rotation |
Float |
The rotation of the rectangle around the upper left corner in degrees. |
drawSpline (start : Struct<Vector2D>, startDirections : Struct<Vector2D>, end_ : Struct<Vector2D>, endDirection : Struct<Vector2D>, thickness : Float, color : Struct<Color>)
Draws a Spline from one position to another with given directions, thickness and color.
Details
Flags |
RuntimeSync RuntimeParallel RuntimeAsync MemberFunc |
Display Name |
Draw Spline |
| Name | Type | Description |
|---|---|---|
Start |
Struct<Vector2D> |
The local position of the start point of the spline. |
Start Direction |
Struct<Vector2D> |
The direction of the spline of how it exists the start point. |
End |
Struct<Vector2D> |
The local position of the end point of the spline. |
End Directions |
Struct<Vector2D> |
The direction of how the spline enters the end position. |
Thickness |
Float |
The thickness of the line drawn. |
Color |
Struct<Color> |
The color of the line drawn. |
drawText (position : Struct<Vector2D>, text : String, size : Int, color : Struct<Color>, monospace : Bool)
Draws some Text at the given position (top left corner of the text), text, size, color and rotation.
Details
Flags |
RuntimeSync RuntimeParallel RuntimeAsync MemberFunc |
Display Name |
Draw Text |
| Name | Type | Description |
|---|---|---|
Position |
Struct<Vector2D> |
The position of the top left corner of the text. |
Text |
String |
The text to draw. |
Size |
Int |
The font size used. |
Color |
Struct<Color> |
The color of the text. |
Monospace |
Bool |
True if a monospace font should be used. |
flush ()
Flushes all draw calls to the visible draw call buffer to show all changes at once. The draw buffer gets cleared afterwards.
Details
Flags |
RuntimeSync RuntimeParallel MemberFunc |
Display Name |
Flush |
getFontBaseline (size : Int, monospace : Bool) → ReturnValue : Int
Get offset from the bottom of the font height to the baseline.
Details
Flags |
RuntimeSync MemberFunc |
Display Name |
Get Font Baseline |
| Name | Type | Description |
|---|---|---|
Size |
Int |
Font size in points. |
Monospace |
Bool |
Whether to use monospace or normal font. |
| Name | Type | Description |
|---|---|---|
ReturnValue |
Int |
getFontBaselineBatch (size : Array<Int>, monospace : Array<Bool>) → ReturnValue : Array<Int>
Same as getFontBaseline, but optimized to perform multiple requests at once.
Details
Flags |
RuntimeSync MemberFunc |
Display Name |
Get Font Baseline Batch |
| Name | Type | Description |
|---|---|---|
Size |
Array<Int> |
Font size in points. |
Monospace |
Array<Bool> |
Whether to use monospace or normal font. |
| Name | Type | Description |
|---|---|---|
ReturnValue |
Array<Int> |
getFontHeight (size : Int, monospace : Bool) → ReturnValue : Int
Get height of a tallest glyph in a font, in pixels. When measuring text, its height is always equal to font height multiplied by number of text lines.
Details
Flags |
RuntimeSync MemberFunc |
Display Name |
Get Font Height |
| Name | Type | Description |
|---|---|---|
Size |
Int |
Font size in points. |
Monospace |
Bool |
Whether to use monospace or normal font. |
| Name | Type | Description |
|---|---|---|
ReturnValue |
Int |
getFontHeightBatch (size : Array<Int>, monospace : Array<Bool>) → ReturnValue : Array<Int>
Same as getFontHeight, but optimized to perform multiple requests at once.
Details
Flags |
RuntimeSync MemberFunc |
Display Name |
Get Font Height Batch |
| Name | Type | Description |
|---|---|---|
Size |
Array<Int> |
Font size in points. |
Monospace |
Array<Bool> |
Whether to use monospace or normal font. |
| Name | Type | Description |
|---|---|---|
ReturnValue |
Array<Int> |
measureText (text : String, size : Int, monospace : Bool) → ReturnValue : Struct<Vector2D>
Measures dimensions that a text will take when rendered. Respects selected font and font size. Does not take into account any transforms pushed onto a transform stack.
Details
Flags |
RuntimeSync MemberFunc |
Display Name |
Measure Text |
| Name | Type | Description |
|---|---|---|
Text |
String |
Text to measure. |
Size |
Int |
Font size in points. |
Monospace |
Bool |
Whether to use monospace or normal font. |
| Name | Type | Description |
|---|---|---|
ReturnValue |
Struct<Vector2D> |
measureTextBatch (text : Array<String>, size : Array<Int>, monospace : Array<Bool>) → ReturnValue : Array<Struct<Vector2D>>
Same as measureText, but optimized to perform multiple requests at once.
Details
Flags |
RuntimeSync MemberFunc |
Display Name |
Measure Text Batch |
| Name | Type | Description |
|---|---|---|
Text |
Array<String> |
Text to measure. |
Size |
Array<Int> |
Font size in points. |
Monospace |
Array<Bool> |
Whether to use monospace or normal font. |
| Name | Type | Description |
|---|---|---|
ReturnValue |
Array<Struct<Vector2D>> |
popClip ()
Pops the top most clipping zone from the clipping stack. The latest clipping zone on the stack gets removed first. (Last In, First Out)
Details
Flags |
RuntimeSync RuntimeParallel RuntimeAsync MemberFunc |
Display Name |
Pop Clipping Zone |
popGeometry ()
Pops the top most geometry from the geometry stack. The latest geometry on the stack gets removed first. (Last In, First Out)
Details
Flags |
RuntimeSync RuntimeParallel RuntimeAsync MemberFunc |
Display Name |
Pop Geometry |
pushClipRect (position : Struct<Vector2D>, size : Struct<Vector2D>)
Pushes a rectangle to the clipping stack. All subsequent drawcalls will be clipped to only be visible within this clipping zone and all previously pushed clipping zones. Be aware, only all draw calls, till this clipping zone gets pop’ed are getting clipped by it, previous draw calls (and draw calls after the pop) are unaffected by this.
Details
pushClipPolygon (topLeft : Struct<Vector2D>, topRight : Struct<Vector2D>, bottomLeft : Struct<Vector2D>, bottomRight : Struct<Vector2D>)
Pushes a 4 pointed polygon to the clipping stack. All subsequent drawcalls will be clipped to only be visible within this clipping zone and all previously pushed clipping zones. Be aware, only all draw calls, till this clipping zone gets pop’ed are getting clipped by it, previous draw calls (and draw calls after the pop) are unaffected by this.
Details
Flags |
RuntimeSync RuntimeParallel RuntimeAsync MemberFunc |
Display Name |
Push Clipping Polygon |
| Name | Type | Description |
|---|---|---|
Top Left |
Struct<Vector2D> |
The local position of the top left point. |
Top Right |
Struct<Vector2D> |
The local position of the top right point. |
Bottom Left |
Struct<Vector2D> |
The local position of the top right point. |
Bottom Right |
Struct<Vector2D> |
The local position of the bottom right point. |
pushLayout (offset : Struct<Vector2D>, size : Struct<Vector2D>, scale : Float)
Pushes a layout to the geometry stack. All subsequent drawcalls will be transformed through all previously pushed geometries and this one. Be aware, only all draw calls, till this geometry gets pop’ed are transformed, previous draw calls (and draw calls after the pop) are unaffected by this.
Details
Flags |
RuntimeSync RuntimeParallel RuntimeAsync MemberFunc |
Display Name |
Push Layout |
| Name | Type | Description |
|---|---|---|
Offset |
Struct<Vector2D> |
The local translation (or offset) that is supposed to happen to all further drawcalls. Translation can be also thought as 'repositioning'. |
Size |
Struct<Vector2D> |
The scale that gets applied to the whole screen localy along both axis. No change in scale is 1. |
Scale |
Float |
pushTransform (translation : Struct<Vector2D>, rotation : Float, scale : Struct<Vector2D>)
Pushes a transformation to the geometry stack. All subsequent drawcalls will be transformed through all previously pushed geometries and this one. Be aware, only all draw calls till, this geometry gets pop’ed are transformed, previous draw calls (and draw calls after the pop) are unaffected by this.
Details
Flags |
RuntimeSync RuntimeParallel RuntimeAsync MemberFunc |
Display Name |
Push Transform |
| Name | Type | Description |
|---|---|---|
Translation |
Struct<Vector2D> |
The local translation that is supposed to happen to all further drawcalls. Translation can be also thought as 'repositioning'. |
Rotation |
Float |
The local rotation that gets applied to all subsequent draw calls. The origin of the rotation is the whole screens center point. The value is in degrees. |
Scale |
Struct<Vector2D> |
The scale that gets applied to the whole screen localy along the (rotated) axis. No change in scale is (1,1). |
Signals
OnKeyChar (String Character c, Int Modifiers modifiers)
Triggers when a character key got 'clicked' and essentially a character got typed in, usful for text input.
Details
| Name | Type | Description |
|---|---|---|
Character |
String |
The character that got typed in as string. |
Modifiers |
Int |
The Modifiers-Bit-Field providing information about the key release event. Bits: 1th left mouse pressed 2th right mouse button pressed 3th ctrl key pressed 4th shift key pressed 5th alt key pressed 6th cmd key pressed |
OnKeyDown (Int C c, Int Code code, Int Modifiers modifiers)
Triggers when a key got pressed.
Details
| Name | Type | Description |
|---|---|---|
C |
Int |
The ASCII number of the character typed in. |
Code |
Int |
The number code of the pressed key. |
Modifiers |
Int |
The Modifiers-Bit-Field providing information about the key press event. Bits: 1th left mouse pressed 2th right mouse button pressed 3th ctrl key pressed 4th shift key pressed 5th alt key pressed 6th cmd key pressed |
OnKeyUp (Int C c, Int Code code, Int Modifiers modifiers)
Triggers when a key got released.
Details
| Name | Type | Description |
|---|---|---|
C |
Int |
The ASCII number of the character typed in. |
Code |
Int |
The number code of the pressed key. |
Modifiers |
Int |
The Modifiers-Bit-Field providing information about the key release event. Bits: 1th left mouse pressed 2th right mouse button pressed 3th ctrl key pressed 4th shift key pressed 5th alt key pressed 6th cmd key pressed |
OnMouseDown (Struct<Vector2D> Position position, Int Modifiers modifiers)
Triggers when a mouse button got pressed.
Details
| Name | Type | Description |
|---|---|---|
Position |
Struct<Vector2D> |
The position of the cursor. |
Modifiers |
Int |
The Modifier-Bit-Field providing information about the pressed button event. Bits: 1th left mouse pressed 2th right mouse button pressed 3th ctrl key pressed 4th shift key pressed 5th alt key pressed 6th cmd key pressed |
OnMouseEnter (Struct<Vector2D> Position position, Int Modifiers modifiers)
Triggers when the mouse cursor enters the screen area.
Details
| Name | Type | Description |
|---|---|---|
Position |
Struct<Vector2D> |
The position of the cursor. |
Modifiers |
Int |
The Modifiers-Bit-Field providing information about the move event. Bits: 1th left mouse pressed 2th right mouse button pressed 3th ctrl key pressed 4th shift key pressed 5th alt key pressed 6th cmd key pressed |
OnMouseLeave (Struct<Vector2D> Position position, Int Modifiers modifiers)
Triggers when the mouse cursor leaves the screen area.
Details
| Name | Type | Description |
|---|---|---|
Position |
Struct<Vector2D> |
The position of the cursor. |
Modifiers |
Int |
The Modifiers-Bit-Field providing information about the move event. Bits: 1th left mouse pressed 2th right mouse button pressed 3th ctrl key pressed 4th shift key pressed 5th alt key pressed 6th cmd key pressed |
OnMouseMove (Struct<Vector2D> Position position, Int Modifiers modifiers)
Triggers when the mouse cursor moves on the screen.
Details
| Name | Type | Description |
|---|---|---|
Position |
Struct<Vector2D> |
The position of the cursor. |
Modifiers |
Int |
The Modifiers-Bit-Field providing information about the move event. Bits: 1th left mouse pressed 2th right mouse button pressed 3th ctrl key pressed 4th shift key pressed 5th alt key pressed 6th cmd key pressed |
OnMouseUp (Struct<Vector2D> Position position, Int Modifiers modifiers)
Triggers when a mouse button got released.
Details
| Name | Type | Description |
|---|---|---|
Position |
Struct<Vector2D> |
The position of the cursor. |
Modifiers |
Int |
The Modifiers-Bit-Field providing information about the released button event. Bits: 1th left mouse pressed 2th right mouse button pressed 3th ctrl key pressed 4th shift key pressed 5th alt key pressed 6th cmd key pressed |
OnMouseWheel (Struct<Vector2D> Position position, Float Wheel Delta wheelDelta, Int Modifiers modifiers)
Triggers when the mouse wheel rotates on the screen.
Details
| Name | Type | Description |
|---|---|---|
Position |
Struct<Vector2D> |
The position of the cursor. |
Wheel Delta |
Float |
The delta value of how much the mouse wheel got moved. |
Modifiers |
Int |
The Modifiers-Bit-Field providing information about the move event. Bits: 1th left mouse pressed 2th right mouse button pressed 3th ctrl key pressed 4th shift key pressed 5th alt key pressed 6th cmd key pressed |