
Basic Shapes | |||
| GFX_DrawThickRoundRect |
Blitting | |||
| GFX_BlitFramebuffer | GFX_BlitImageCentered |
Font Handling | |||
| GFX_SetFont |
Mouse Handling | |||
| GFX_GetMouseCap |
Window Handling | |||
| GFX_GetWindowHWND | GFX_Init |

GFX_DrawThickRoundRectFunctioncall:
| Description: |
| draws a round-rectangle with a custom thickness. You shouldn't redraw with it too often, as it eats many ressources returns false in case of an error |
| boolean retval | true, drawing was successful; false, drawing wasn't successful |
| integer x | the x position of the rectangle |
| integer y | the y position of the rectangle |
| integer w | the width of the rectangle |
| integer h | the height of the rectangle |
| number thickness | the thickness of the rectangle's edges |
| number roundness | the angle of the rectangle's corners |
| boolean antialias | true, draw antialiased; false, simply draw aliased |

GFX_BlitFramebufferFunctioncall:
| Description: |
| blits a framebuffer at position 0,0. If the gfx-window is smaller than the contents of the framebuffer, it will resize it before blitting to window size, retaining the correct aspect-ratio. Mostly intended for debugging-purposes, when you want to track, if a certain framebuffer contains, what you expect it to contain. returns false in case of an error |
| boolean retval | true, drawing was successful; false, drawing wasn't successful |
| integer framebufferidx | the indexnumber of the framebuffer to blit; 0 to 1023; -1 is the displaying framebuffer |
| optional boolean showidx | true, displays the id-number of the framebuffer in the top-left corner; false, does not display framebuffer-idx |


GFX_InitFunctioncall:
| Description: |
| Opens a new graphics window and returns its HWND-windowhandler object. |
| number retval | 1.0, if window is opened |
| HWND hwnd | the window-handler of the newly created window; can be used with JS_Window_xxx-functions of the JS-extension-plugin |
| string "name" | the name of the window, which will be shown in the title of the window |
| optional integer width | the width of the window; minmum is 50 |
| optional integer height | the height of the window; minimum is 16 |
| optional integer dockstate | &1=0, undocked; &1=1, docked |
| optional integer xpos | x-position of the window in pixels; minimum is -80; nil, to center it horizontally |
| optional integer ypos | y-position of the window in pixels; minimum is -15; nil, to center it vertically |

GFX_GetWindowHWNDFunctioncall:
| Description: |
| Returns the HWND of the currently opened gfx-window. You need to use ultraschall.GFX_Init(), otherwise it will contain the message "Please, use ultraschall.GFX_Init() for window-creation, not gfx.init(!), to retrieve the HWND of the gfx-window." |
| HWND hwnd | the window-handler of the opened gfx-window; will contain a helpermessage, if you didn't use ultraschall.GFX_Init() for window creation. |

GFX_GetMouseCapFunctioncall:
| Description: |
| Checks mouseclick/wheel-behavior, since last time calling this function and returns it's state. Allows you to get click, doubleclick, dragging, including the appropriate coordinates and mousewheel-states. Much more convenient, than fiddling around with gfx.mouse_cap Note: After doubleclicked, this will not return mouse-clicked-states, until the mouse-button is released. So any mouse-clicks during that can be only gotten from the retval mouse_cap. This is to prevent automatic mouse-dragging after double-clicks. |
| string clickstate | "", if not clicked, "CLK" for clicked and "FirstCLK", if the click is a first-click. |
| string specific_clickstate | either "" for not clicked, "CLK" for clicked, "DBLCLK" for doubleclick or "DRAG" for dragging |
| integer mouse_cap | the mouse_cap, a bitfield of mouse and keyboard modifier states 1: left mouse button 2: right mouse button 4: Control key 8: Shift key 16: Alt key 32: Windows key 64: middle mouse button |
| integer click_x | the x position, when the mouse has been clicked the last time |
| integer click_y | the y position, when the mouse has been clicked the last time |
| integer drag_x | the x-position of the mouse-dragging-coordinate; is like click_x for non-dragging mousestates |
| integer drag_y | the y-position of the mouse-dragging-coordinate; is like click_y for non-dragging mousestates |
| integer mouse_wheel | the mouse_wheel-delta, since the last time calling this function |
| integer mouse_hwheel | the mouse_horizontal-wheel-delta, since the last time calling this function |
| optional integer doubleclick_wait | the timeframe, in which a second click is recognized as double-click, in defer-cycles. 30 is approximately 1 second; nil, will use 15(default) |
| optional integer drag_wait | the timeframe, after which a mouseclick without moving the mouse is recognized as dragging, in defer-cycles. 30 is approximately 1 second; nil, will use 5(default) |

GFX_SetFontFunctioncall:
| Description: |
| Sets the font of the gfx-window. As Mac and Windows have different visible font-sizes for the same font-size, this function adapts the font-size correctly(unlike Reaper's own native gfx.setfont-function). returns false in case of an error |
| integer fontindex | the font-id; idx=0 for default bitmapped font, no configuration is possible for this font. idx=1..16 for a configurable font |
| string font | the name of the font |
| integer size | the size of the font |
| string flagStr | a string, which holds the desired font-styles. You can combine multiple ones, up to 4. The following are valid: B - bold i - italic o - white outline r - blurred s - sharpen u - underline v - inverse |

GFX_BlitImageCenteredFunctioncall:
| Description: |
| Blits a centered image at the position given by parameter x and y. That means, the center of the image will be at x and y. All the rest basically works like the regular gfx.blit-function. returns false in case of an error |
| boolean retval | true, blitting was successful; false, blitting was unsuccessful |
| integer source | the source-image/framebuffer to blit; -1 to 1023; -1 for the currently displayed framebuffer. |
| integer x | the x-position of the center of the image |
| integer y | the y-position of the center of the image |
| number scale | the scale-factor; 1, for normal size; smaller or bigger than 1 make image smaller or bigger has no effect, when destx, desty, destw, desth are given |
| number rotation | the rotation-factor; 0 to 6.28; 3.14 for 180 degrees. |
| optional number srcx | the x-coordinate-offset in the source-image |
| optional number srcy | the y-coordinate-offset in the source-image |
| optional number srcw | the width-offset in the source-image |
| optional number srch | the height-offset in the source-image |
| optional integer destx | the x-coordinate of the blitting destination |
| optional integer desty | the y-coordinate of the blitting destination |
| optional integer destw | the width of the blitting destination; may lead to stretched images |
| optional integer desth | the height of the blitting destination; may lead to stretched images |
| optional number rotxoffs | influences rotation |
| optional number rotyoffs | influences rotation |
| Automatically generated by Ultraschall-API 4.00 - 1111 functions and 6 Api-variables available |