| 1 | /* |
| 2 | * Descent 3 |
| 3 | * Copyright (C) 2024 Parallax Software |
| 4 | * |
| 5 | * This program is free software: you can redistribute it and/or modify |
| 6 | * it under the terms of the GNU General Public License as published by |
| 7 | * the Free Software Foundation, either version 3 of the License, or |
| 8 | * (at your option) any later version. |
| 9 | * |
| 10 | * This program is distributed in the hope that it will be useful, |
| 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 13 | * GNU General Public License for more details. |
| 14 | * |
| 15 | * You should have received a copy of the GNU General Public License |
| 16 | * along with this program. If not, see <http://www.gnu.org/licenses/>. |
| 17 | */ |
| 18 | |
| 19 | |
| 20 | |
| 21 | #ifndef UIDRAW_H |
| 22 | #define UIDRAW_Hcxx . . $ `ui/uidraw.h:22:9`! |
| 23 | |
| 24 | // Graphics Primatives. |
| 25 | void ui_StartDrawcxx . . $ ui_StartDraw(748afa4755bc9595).(int left, int top, int right, int bottom); |
| 26 | void ui_EndDrawcxx . . $ ui_EndDraw(49f6e7a06ebc5aa8).(); |
| 27 | |
| 28 | // sets text clipping within the startdraw region |
| 29 | void ui_SetTextClipcxx . . $ ui_SetTextClip(748afa4755bc9595).(int left, int top, int right, int bottom); |
| 30 | void ui_ResetTextClipcxx . . $ ui_ResetTextClip(49f6e7a06ebc5aa8).(); |
| 31 | |
| 32 | // draw primatives |
| 33 | void ui_DrawSetAlphacxx . . $ ui_DrawSetAlpha(ac50b47256ae7414).(uint8_tcxx . . $ uint8_t# alpha); |
| 34 | void ui_DrawLinecxx . . $ ui_DrawLine(fe09a4b73d8d396f).(ddgr_colorcxx . . $ ddgr_color# color, int x1, int y1, int x2, int y2); |
| 35 | void ui_DrawBoxcxx . . $ ui_DrawBox(fe09a4b73d8d396f).(ddgr_colorcxx . . $ ddgr_color#, int l, int t, int r, int b); |
| 36 | void ui_DrawLTBoxcxx . . $ ui_DrawLTBox(c7c2c8c9daee4a15).(ddgr_colorcxx . . $ ddgr_color# lt_col, ddgr_colorcxx . . $ ddgr_color# rb_col, int l, int t, int r, int b); |
| 37 | void ui_DrawRectcxx . . $ ui_DrawRect(fe09a4b73d8d396f).(ddgr_colorcxx . . $ ddgr_color#, int l, int t, int r, int b); |
| 38 | |
| 39 | // draws all textures derived from ui_bm_handle. |
| 40 | void ui_DrawBitmapcxx . . $ ui_DrawBitmap(d33d35b40e6b2157).(UIBitmapItemcxx . . $ UIBitmapItem# *bi, int x, int y, uint8_tcxx . . $ uint8_t# alpha); |
| 41 | int ui_GetBitmapWidthcxx . . $ ui_GetBitmapWidth(fac790737e02cbfd).(UIBitmapItemcxx . . $ UIBitmapItem# *bi); |
| 42 | int ui_GetBitmapHeightcxx . . $ ui_GetBitmapHeight(fac790737e02cbfd).(UIBitmapItemcxx . . $ UIBitmapItem# *bi); |
| 43 | |
| 44 | // sets font for text drawing. |
| 45 | void ui_DrawSetFontcxx . . $ ui_DrawSetFont(d4f767463ce0a6b3).(int handle); |
| 46 | int ui_DrawGetFontcxx . . $ ui_DrawGetFont(b126dc7c1de90089).(); |
| 47 | int ui_GetFontHeightcxx . . $ ui_GetFontHeight(b126dc7c1de90089).(); |
| 48 | void ui_SetCharAlphacxx . . $ ui_SetCharAlpha(ac50b47256ae7414).(uint8_tcxx . . $ uint8_t# alpha); |
| 49 | int ui_GetTextWidthcxx . . $ ui_GetTextWidth(5c4306d8553b3696).(const char *text); |
| 50 | int ui_GetTextHeightcxx . . $ ui_GetTextHeight(5c4306d8553b3696).(const char *text); |
| 51 | |
| 52 | #define UI_TEXTTYPE_SATURATEcxx . . $ `ui/uidraw.h:52:9`! 1 |
| 53 | #define UI_TEXTTYPE_SHADOWcxx . . $ `ui/uidraw.h:53:9`! 2 |
| 54 | void ui_DrawSetTextTypecxx . . $ ui_DrawSetTextType(d4f767463ce0a6b3).(int type); |
| 55 | |
| 56 | // draws a line of text. |
| 57 | void ui_DrawStringcxx . . $ ui_DrawString(c261e420eb73c8b5).(ddgr_colorcxx . . $ ddgr_color# col, int x, int y, const char *str); |
| 58 | void ui_DrawCenteredStringcxx . . $ ui_DrawCenteredString(c261e420eb73c8b5).(ddgr_colorcxx . . $ ddgr_color# col, int xoff, int y, const char *str); |
| 59 | |
| 60 | #endif |