|
| 1 | +{ |
| 2 | + This file is part of: |
| 3 | + |
| 4 | + SDL3 for Pascal |
| 5 | + (https://github.com/PascalGameDevelopment/SDL3-for-Pascal) |
| 6 | + SPDX-License-Identifier: Zlib |
| 7 | +} |
| 8 | + |
| 9 | +const |
| 10 | + SDL3_GFXPRIMITIVES_MAJOR = 1; |
| 11 | + SDL3_GFXPRIMITIVES_MINOR = 0; |
| 12 | + SDL3_GFXPRIMITIVES_MICRO = 0; |
| 13 | + |
| 14 | +{* Note: all ___Color routines expect the color to be in format 0xRRGGBBAA *} |
| 15 | + |
| 16 | +{* Pixel *} |
| 17 | + |
| 18 | +function pixelColor(renderer: PSDL_Renderer; x, y: cint16; color: cuint32): Boolean; cdecl; |
| 19 | + external GFX_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_pixelColor' {$ENDIF} {$ENDIF}; |
| 20 | +function pixelRGBA(renderer: PSDL_Renderer; x, y: cint16; r, g, b, a: cuint8): Boolean; cdecl; |
| 21 | + external GFX_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_pixelRGBA' {$ENDIF} {$ENDIF}; |
| 22 | + |
| 23 | +{* Horizontal line *} |
| 24 | + |
| 25 | +function hlineColor(renderer: PSDL_Renderer; x1, x2, y: cint16; color: cuint32): Boolean; cdecl; |
| 26 | + external GFX_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_hlineColor' {$ENDIF} {$ENDIF}; |
| 27 | +function hlineRGBA(renderer: PSDL_Renderer; x1, x2, y: cint16; r, g, b, a: cuint8): Boolean; cdecl; |
| 28 | + external GFX_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_hlineRGBA' {$ENDIF} {$ENDIF}; |
| 29 | + |
| 30 | +{* Vertical line *} |
| 31 | + |
| 32 | +function vlineColor(renderer: PSDL_Renderer; x, y1, y2: cint16; color: cuint32): Boolean; cdecl; |
| 33 | + external GFX_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_vlineColor' {$ENDIF} {$ENDIF}; |
| 34 | +function vlineRGBA(renderer: PSDL_Renderer; x, y1, y2: cint16; r, g, b, a: cuint8): Boolean; cdecl; |
| 35 | + external GFX_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_vlineRGBA' {$ENDIF} {$ENDIF}; |
| 36 | + |
| 37 | +{* Rectangle *} |
| 38 | + |
| 39 | +function rectangleColor(renderer: PSDL_Renderer; x1, y1, x2, y2: cint16; color: cuint32): Boolean; cdecl; |
| 40 | + external GFX_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_rectangleColor' {$ENDIF} {$ENDIF}; |
| 41 | +function rectangleRGBA(renderer: PSDL_Renderer; x1, y1, x2, y2: cint16; r, g, b, a: cuint8): Boolean; cdecl; |
| 42 | + external GFX_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_rectangleRGBA' {$ENDIF} {$ENDIF}; |
| 43 | + |
| 44 | +{* Rounded-Corner Rectangle *} |
| 45 | + |
| 46 | +function roundedRectangleColor(renderer: PSDL_Renderer; x1, y1, x2, y2, rad: cint16; color: cuint32): Boolean; cdecl; |
| 47 | + external GFX_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_roundedRectangleColor' {$ENDIF} {$ENDIF}; |
| 48 | +function roundedRectangleRGBA(renderer: PSDL_Renderer; x1, y1, x2, y2, rad: cint16; r, g, b, a: cuint8): Boolean; cdecl; |
| 49 | + external GFX_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_roundedRectangleRGBA' {$ENDIF} {$ENDIF}; |
| 50 | + |
| 51 | +{* Filled rectangle (Box) *} |
| 52 | + |
| 53 | +function boxColor(renderer: PSDL_Renderer; x1, y1, x2, y2: cint16; color: cuint32): Boolean; cdecl; |
| 54 | + external GFX_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_boxColor' {$ENDIF} {$ENDIF}; |
| 55 | +function boxRGBA(renderer: PSDL_Renderer; x1, y1, x2, y2: cint16; r, g, b, a: cuint8): Boolean; cdecl; |
| 56 | + external GFX_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_boxRGBA' {$ENDIF} {$ENDIF}; |
| 57 | + |
| 58 | +{* Rounded-Corner Filled rectangle (Box) *} |
| 59 | + |
| 60 | +function roundedBoxColor(renderer: PSDL_Renderer; x1, y1, x2, y2, rad: cint16; color: cuint32): Boolean; cdecl; |
| 61 | + external GFX_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_roundedBoxColor' {$ENDIF} {$ENDIF}; |
| 62 | +function roundedBoxRGBA(renderer: PSDL_Renderer; x1, y1, x2, y2, rad: cint16; r, g, b, a: cuint8): Boolean; cdecl; |
| 63 | + external GFX_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_roundedBoxRGBA' {$ENDIF} {$ENDIF}; |
| 64 | + |
| 65 | +{* Line *} |
| 66 | + |
| 67 | +function lineColor(renderer: PSDL_Renderer; x1, y1, x2, y2: cint16; color: cuint32): Boolean; cdecl; |
| 68 | + external GFX_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_lineColor' {$ENDIF} {$ENDIF}; |
| 69 | +function lineRGBA(renderer: PSDL_Renderer; x1, y1, x2, y2: cint16; r, g, b, a: cuint8): Boolean; cdecl; |
| 70 | + external GFX_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_lineRGBA' {$ENDIF} {$ENDIF}; |
| 71 | + |
| 72 | +{* AA Line *} |
| 73 | + |
| 74 | +function aalineColor(renderer: PSDL_Renderer; x1, y1, x2, y2: cint16; color: cuint32): Boolean; cdecl; |
| 75 | + external GFX_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_aalineColor' {$ENDIF} {$ENDIF}; |
| 76 | +function aalineRGBA(renderer: PSDL_Renderer; x1, y1, x2, y2: cint16; r, g, b, a: cuint8): Boolean; cdecl; |
| 77 | + external GFX_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_aalineRGBA' {$ENDIF} {$ENDIF}; |
| 78 | + |
| 79 | +{* Thick Line *} |
| 80 | + |
| 81 | +function thickLineColor(renderer: PSDL_Renderer; x1, y1, x2, y2: cint16; width: cuint8; color: cuint32): Boolean; cdecl; |
| 82 | + external GFX_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_thickLineColor' {$ENDIF} {$ENDIF}; |
| 83 | +function thickLineRGBA(renderer: PSDL_Renderer; x1, y1, x2, y2: cint16; width, r, g, b, a: cuint8): Boolean; cdecl; |
| 84 | + external GFX_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_thickLineRGBA' {$ENDIF} {$ENDIF}; |
| 85 | + |
| 86 | +{* Circle *} |
| 87 | + |
| 88 | +function circleColor(renderer: PSDL_Renderer; x, y, rad: cint16; color: cuint32): Boolean; cdecl; |
| 89 | + external GFX_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_circleColor' {$ENDIF} {$ENDIF}; |
| 90 | +function circleRGBA(renderer: PSDL_Renderer; x, y, rad: cint16; r, g, b, a: cuint8): Boolean; cdecl; |
| 91 | + external GFX_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_circleRGBA' {$ENDIF} {$ENDIF}; |
| 92 | + |
| 93 | +{* Arc *} |
| 94 | + |
| 95 | +function arcColor(renderer: PSDL_Renderer; x, y, rad, start, end_: cint16; color: cuint32): Boolean; cdecl; |
| 96 | + external GFX_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_arcColor' {$ENDIF} {$ENDIF}; |
| 97 | +function arcRGBA(renderer: PSDL_Renderer; x, y, rad, start, end_: cint16; r, g, b, a: cuint8): Boolean; cdecl; |
| 98 | + external GFX_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_arcRGBA' {$ENDIF} {$ENDIF}; |
| 99 | + |
| 100 | +{* AA Circle *} |
| 101 | + |
| 102 | +function aacircleColor(renderer: PSDL_Renderer; x, y, rad: cint16; color: cuint32): Boolean; cdecl; |
| 103 | + external GFX_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_aacircleColor' {$ENDIF} {$ENDIF}; |
| 104 | +function aacircleRGBA(renderer: PSDL_Renderer; x, y, rad: cint16; r, g, b, a: cuint8): Boolean; cdecl; |
| 105 | + external GFX_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_aacircleRGBA' {$ENDIF} {$ENDIF}; |
| 106 | + |
| 107 | +{* Filled Circle *} |
| 108 | + |
| 109 | +function filledCircleColor(renderer: PSDL_Renderer; x, y, r: cint16; color: cuint32): Boolean; cdecl; |
| 110 | + external GFX_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_filledCircleColor' {$ENDIF} {$ENDIF}; |
| 111 | +function filledCircleRGBA(renderer: PSDL_Renderer; x, y, rad: cint16; r, g, b, a: cuint8): Boolean; cdecl; |
| 112 | + external GFX_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_filledCircleRGBA' {$ENDIF} {$ENDIF}; |
| 113 | + |
| 114 | +{* Ellipse *} |
| 115 | + |
| 116 | +function ellipseColor(renderer: PSDL_Renderer; x, y, rx, ry: cint16; color: cuint32): Boolean; cdecl; |
| 117 | + external GFX_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_ellipseColor' {$ENDIF} {$ENDIF}; |
| 118 | +function ellipseRGBA(renderer: PSDL_Renderer; x, y, rx, ry: cint16; r, g, b, a: cuint8): Boolean; cdecl; |
| 119 | + external GFX_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_ellipseRGBA' {$ENDIF} {$ENDIF}; |
| 120 | + |
| 121 | +{* AA Ellipse *} |
| 122 | + |
| 123 | +function aaellipseColor(renderer: PSDL_Renderer; x, y, rx, ry: cint16; color: cuint32): Boolean; cdecl; |
| 124 | + external GFX_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_aaellipseColor' {$ENDIF} {$ENDIF}; |
| 125 | +function aaellipseRGBA(renderer: PSDL_Renderer; x, y, rx, ry: cint16; r, g, b, a: cuint8): Boolean; cdecl; |
| 126 | + external GFX_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_aaellipseRGBA' {$ENDIF} {$ENDIF}; |
| 127 | + |
| 128 | +{* Filled Ellipse *} |
| 129 | + |
| 130 | +function filledEllipseColor(renderer: PSDL_Renderer; x, y, rx, ry: cint16; color: cuint32): Boolean; cdecl; |
| 131 | + external GFX_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_filledEllipseColor' {$ENDIF} {$ENDIF}; |
| 132 | +function filledEllipseRGBA(renderer: PSDL_Renderer; x, y, rx, ry: cint16; r, g, b, a: cuint8): Boolean; cdecl; |
| 133 | + external GFX_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_filledEllipseRGBA' {$ENDIF} {$ENDIF}; |
| 134 | + |
| 135 | +{* Pie *} |
| 136 | + |
| 137 | +function pieColor(renderer: PSDL_Renderer; x, y, rad, start, end_: cint16; color: cuint32): Boolean; cdecl; |
| 138 | + external GFX_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_pieColor' {$ENDIF} {$ENDIF}; |
| 139 | +function pieRGBA(renderer: PSDL_Renderer; x, y, rad, start, end_: cint16; r, g, b, a: cuint8): Boolean; cdecl; |
| 140 | + external GFX_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_pieRGBA' {$ENDIF} {$ENDIF}; |
| 141 | + |
| 142 | +{* Filled Pie *} |
| 143 | + |
| 144 | +function filledPieColor(renderer: PSDL_Renderer; x, y, rad, start, end_: cint16; color: cuint32): Boolean; cdecl; |
| 145 | + external GFX_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_filledPieColor' {$ENDIF} {$ENDIF}; |
| 146 | +function filledPieRGBA(renderer: PSDL_Renderer; x, y, rad, start, end_: cint16; r, g, b, a: cuint8): Boolean; cdecl; |
| 147 | + external GFX_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_filledPieRGBA' {$ENDIF} {$ENDIF}; |
| 148 | + |
| 149 | +{* Trigon *} |
| 150 | + |
| 151 | +function trigonColor(renderer: PSDL_Renderer; x1, y1, x2, y2, x3, y3: cint16; color: cuint32): Boolean; cdecl; |
| 152 | + external GFX_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_trigonColor' {$ENDIF} {$ENDIF}; |
| 153 | +function trigonRGBA(renderer: PSDL_Renderer; x1, y1, x2, y2, x3, y3: cint16; r, g, b, a: cuint8): Boolean; cdecl; |
| 154 | + external GFX_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_trigonRGBA' {$ENDIF} {$ENDIF}; |
| 155 | + |
| 156 | +{* AA-Trigon *} |
| 157 | + |
| 158 | +function aatrigonColor(renderer: PSDL_Renderer; x1, y1, x2, y2, x3, y3: cint16; color: cuint32): Boolean; cdecl; |
| 159 | + external GFX_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_aatrigonColor' {$ENDIF} {$ENDIF}; |
| 160 | +function aatrigonRGBA(renderer: PSDL_Renderer; x1, y1, x2, y2, x3, y3: cint16; r, g, b, a: cuint8): Boolean; cdecl; |
| 161 | + external GFX_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_aatrigonRGBA' {$ENDIF} {$ENDIF}; |
| 162 | + |
| 163 | +{* Filled Trigon *} |
| 164 | + |
| 165 | +function filledTrigonColor(renderer: PSDL_Renderer; x1, y1, x2, y2, x3, y3: cint16; color: cuint32): Boolean; cdecl; |
| 166 | + external GFX_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_filledTrigonColor' {$ENDIF} {$ENDIF}; |
| 167 | +function filledTrigonRGBA(renderer: PSDL_Renderer; x1, y1, x2, y2, x3, y3: cint16; r, g, b, a: cuint8): Boolean; cdecl; |
| 168 | + external GFX_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_filledTrigonRGBA' {$ENDIF} {$ENDIF}; |
| 169 | + |
| 170 | +{* Polygon *} |
| 171 | + |
| 172 | +function polygonColor(renderer: PSDL_Renderer; const vx, vy: pcint16; n: cint; color: cuint32): Boolean; cdecl; |
| 173 | + external GFX_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_polygonColor' {$ENDIF} {$ENDIF}; |
| 174 | +function polygonRGBA(renderer: PSDL_Renderer; const vx, vy: pcint16; n: cint; r, g, b, a: cuint8): Boolean; cdecl; |
| 175 | + external GFX_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_polygonRGBA' {$ENDIF} {$ENDIF}; |
| 176 | + |
| 177 | +{* AA-Polygon *} |
| 178 | + |
| 179 | +function aapolygonColor(renderer: PSDL_Renderer; const vx, vy: pcint16; n: cint; color: cuint32): Boolean; cdecl; |
| 180 | + external GFX_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_aapolygonColor' {$ENDIF} {$ENDIF}; |
| 181 | +function aapolygonRGBA(renderer: PSDL_Renderer; const vx, vy: pcint16; n: cint; r, g, b, a: cuint8): Boolean; cdecl; |
| 182 | + external GFX_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_aapolygonRGBA' {$ENDIF} {$ENDIF}; |
| 183 | + |
| 184 | +{* Filled Polygon *} |
| 185 | + |
| 186 | +function filledPolygonColor(renderer: PSDL_Renderer; const vx, vy: pcint16; n: cint; color: cuint32): Boolean; cdecl; |
| 187 | + external GFX_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_filledPolygonColor' {$ENDIF} {$ENDIF}; |
| 188 | +function filledPolygonRGBA(renderer: PSDL_Renderer; const vx, vy: pcint16; n: cint; r, g, b, a: cuint8): Boolean; cdecl; |
| 189 | + external GFX_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_filledPolygonRGBA' {$ENDIF} {$ENDIF}; |
| 190 | + |
| 191 | +{* Textured Polygon *} |
| 192 | + |
| 193 | +function texturedPolygon(renderer: PSDL_Renderer; const vx, vy: pcint16; n: cint; texture: PSDL_Surface; texture_dx: cint; texture_dy: cint): Boolean; cdecl; |
| 194 | + external GFX_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_texturedPolygon' {$ENDIF} {$ENDIF}; |
| 195 | + |
| 196 | +{* Bezier *} |
| 197 | + |
| 198 | +function bezierColor(renderer: PSDL_Renderer; const vx, vy: pcint16; n, s: cint; color: cuint32): Boolean; cdecl; |
| 199 | + external GFX_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_bezierColor' {$ENDIF} {$ENDIF}; |
| 200 | +function bezierRGBA(renderer: PSDL_Renderer; const vx, vy: pcint16; n, s: cint; r, g, b, a: cuint8): Boolean; cdecl; |
| 201 | + external GFX_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_bezierRGBA' {$ENDIF} {$ENDIF}; |
| 202 | + |
| 203 | +{* Characters/Strings *} |
| 204 | + |
| 205 | +procedure gfxPrimitivesSetFont(const fontdata: Pointer; cw, ch: cuint32); cdecl; |
| 206 | + external GFX_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_gfxPrimitivesSetFont' {$ENDIF} {$ENDIF}; |
| 207 | +procedure gfxPrimitivesSetFontRotation(rotation: cuint32); cdecl; |
| 208 | + external GFX_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_gfxPrimitivesSetFontRotation' {$ENDIF} {$ENDIF}; |
| 209 | +function characterColor(renderer: PSDL_Renderer; x, y: cint16; c: AnsiChar; color: cuint32): Boolean; cdecl; |
| 210 | + external GFX_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_characterColor' {$ENDIF} {$ENDIF}; |
| 211 | +function characterRGBA(renderer: PSDL_Renderer; x, y: cint16; c: AnsiChar; r, g, b, a: cuint8): Boolean; cdecl; |
| 212 | + external GFX_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_characterRGBA' {$ENDIF} {$ENDIF}; |
| 213 | +function stringColor(renderer: PSDL_Renderer; x, y: cint16; const s: PAnsiChar; color: cuint32): Boolean; cdecl; |
| 214 | + external GFX_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_stringColor' {$ENDIF} {$ENDIF}; |
| 215 | +function stringRGBA(renderer: PSDL_Renderer; x, y: cint16; const s: PAnsiChar; r, g, b, a: cuint8): Boolean; cdecl; |
| 216 | + external GFX_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_stringRGBA' {$ENDIF} {$ENDIF}; |
0 commit comments