Skip to content

Commit 2d5eae3

Browse files
Update SDL_rect.inc to 3.4.2
1 parent 0b56136 commit 2d5eae3

File tree

2 files changed

+49
-28
lines changed

2 files changed

+49
-28
lines changed

units/SDL3.pas

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ interface
8686
{$I SDL_stdinc.inc} // 3.1.6-prev (unfinished)
8787
{$I SDL_platform.inc} // 3.2.0
8888
{$I SDL_loadso.inc} // 3.2.0
89-
{$I SDL_rect.inc} // 3.1.6-prev
89+
{$I SDL_rect.inc} // 3.4.2
9090
{$I SDL_properties.inc} // 3.1.6-prev
9191
{$I SDL_pixels.inc} // 3.1.6-prev
9292
{$I SDL_blendmode.inc} // 3.1.6-prev
@@ -207,7 +207,7 @@ function SDL_RectEmptyFloat(const r: PSDL_FRect): Boolean;
207207
end;
208208

209209
function SDL_RectsEqualEpsilon(const a: PSDL_Frect; const b: PSDL_FRect;
210-
const epsilon: cfloat): Boolean;
210+
epsilon: cfloat): Boolean;
211211
begin
212212
Result :=
213213
(a <> nil) and (b <> nil) and ((a = b) or

units/SDL_rect.inc

Lines changed: 47 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
{*
1717
* The structure that defines a point (using integers).
1818
*
19-
* \since This struct is available since SDL 3.1.3.
19+
* \since This struct is available since SDL 3.2.0.
2020
*
2121
* \sa SDL_GetRectEnclosingPoints
2222
* \sa SDL_PointInRect
@@ -32,7 +32,7 @@ type
3232
{*
3333
* The structure that defines a point (using floating point values).
3434
*
35-
* \since This struct is available since SDL 3.1.3.
35+
* \since This struct is available since SDL 3.2.0.
3636
*
3737
* \sa SDL_GetRectEnclosingPointsFloat
3838
* \sa SDL_PointInRectFloat
@@ -47,7 +47,7 @@ type
4747
{*
4848
* A rectangle, with the origin at the upper left (using integers).
4949
*
50-
* \since This struct is available since SDL 3.1.3.
50+
* \since This struct is available since SDL 3.2.0.
5151
*
5252
* \sa SDL_RectEmpty
5353
* \sa SDL_RectsEqual
@@ -67,10 +67,13 @@ type
6767
end;
6868

6969
{*
70-
* A rectangle, with the origin at the upper left (using floating point
71-
* values).
70+
* A rectangle stored using floating point values.
7271
*
73-
* \since This struct is available since SDL 3.1.3.
72+
* The origin of the coordinate space is in the top-left, with increasing
73+
* values moving down and right. The properties `x` and `y` represent the
74+
* coordinates of the top-left corner of the rectangle.
75+
*
76+
* \since This struct is available since SDL 3.2.0.
7477
*
7578
* \sa SDL_RectEmptyFloat
7679
* \sa SDL_RectsEqualFloat
@@ -100,7 +103,7 @@ type
100103
*
101104
* \threadsafety It is safe to call this function from any thread.
102105
*
103-
* \since This function is available since SDL 3.1.3.
106+
* \since This function is available since SDL 3.2.0.
104107
}
105108
procedure SDL_RectToFRect(const rect: PSDL_Rect; frect: PSDL_FRect); inline;
106109

@@ -123,7 +126,7 @@ procedure SDL_RectToFRect(const rect: PSDL_Rect; frect: PSDL_FRect); inline;
123126
*
124127
* \threadsafety It is safe to call this function from any thread.
125128
*
126-
* \since This function is available since SDL 3.1.3.
129+
* \since This function is available since SDL 3.2.0.
127130
}
128131
function SDL_PointInRect(const p: PSDL_Point; const r: PSDL_Rect): Boolean; inline;
129132

@@ -143,7 +146,7 @@ function SDL_PointInRect(const p: PSDL_Point; const r: PSDL_Rect): Boolean; inli
143146
*
144147
* \threadsafety It is safe to call this function from any thread.
145148
*
146-
* \since This function is available since SDL 3.1.3.
149+
* \since This function is available since SDL 3.2.0.
147150
}
148151
function SDL_RectEmpty(const r: PSDL_Rect): Boolean; inline;
149152

@@ -164,7 +167,7 @@ function SDL_RectEmpty(const r: PSDL_Rect): Boolean; inline;
164167
*
165168
* \threadsafety It is safe to call this function from any thread.
166169
*
167-
* \since This function is available since SDL 3.1.3.
170+
* \since This function is available since SDL 3.2.0.
168171
}
169172
function SDL_RectsEqual(const a: PSDL_Rect; const b: PSDL_Rect): Boolean; inline;
170173

@@ -179,7 +182,7 @@ function SDL_RectEmpty(const r: PSDL_Rect): Boolean; inline;
179182
*
180183
* \threadsafety It is safe to call this function from any thread.
181184
*
182-
* \since This function is available since SDL 3.1.3.
185+
* \since This function is available since SDL 3.2.0.
183186
*
184187
* \sa SDL_GetRectIntersection
185188
}
@@ -197,7 +200,9 @@ function SDL_HasRectIntersection(A: PSDL_Rect; B: PSDL_Rect): Boolean; cdecl;
197200
* rectangles `A` and `B`.
198201
* \returns true if there is an intersection, false otherwise.
199202
*
200-
* \since This function is available since SDL 3.1.3.
203+
* \threadsafety It is safe to call this function from any thread.
204+
*
205+
* \since This function is available since SDL 3.2.0.
201206
*
202207
* \sa SDL_HasRectIntersection
203208
}
@@ -214,7 +219,9 @@ function SDL_GetRectIntersection(A: PSDL_Rect; B: PSDL_Rect; result: PSDL_Rect):
214219
* \returns true on success or false on failure; call SDL_GetError() for more
215220
* information.
216221
*
217-
* \since This function is available since SDL 3.1.3.
222+
* \threadsafety It is safe to call this function from any thread.
223+
*
224+
* \since This function is available since SDL 3.2.0.
218225
}
219226
function SDL_GetRectUnion(A: PSDL_Rect; B: PSDL_Rect; result: PSDL_Rect): Boolean; cdecl;
220227
external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_GetRectUnion' {$ENDIF} {$ENDIF};
@@ -234,7 +241,9 @@ function SDL_GetRectUnion(A: PSDL_Rect; B: PSDL_Rect; result: PSDL_Rect): Boolea
234241
* \returns true if any points were enclosed or false if all the points were
235242
* outside of the clipping rectangle.
236243
*
237-
* \since This function is available since SDL 3.1.3.
244+
* \threadsafety It is safe to call this function from any thread.
245+
*
246+
* \since This function is available since SDL 3.2.0.
238247
}
239248
function SDL_GetRectEnclosingPoints(points: PSDL_Point; count: cint; clip: PSDL_Rect; result: PSDL_Rect): Boolean; cdecl;
240249
external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_GetRectEnclosingPoints' {$ENDIF} {$ENDIF};
@@ -255,7 +264,9 @@ function SDL_GetRectEnclosingPoints(points: PSDL_Point; count: cint; clip: PSDL_
255264
* \param Y2 a pointer to the ending Y-coordinate of the line.
256265
* \returns true if there is an intersection, false otherwise.
257266
*
258-
* \since This function is available since SDL 3.1.3.
267+
* \threadsafety It is safe to call this function from any thread.
268+
*
269+
* \since This function is available since SDL 3.2.0.
259270
}
260271
function SDL_GetRectAndLineIntersection(rect: PSDL_Rect; X1: pcint; Y1: pcint; X2: pcint; Y2: pcint): Boolean; cdecl;
261272
external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_GetRectAndLineIntersection' {$ENDIF} {$ENDIF};
@@ -281,12 +292,12 @@ function SDL_GetRectAndLineIntersection(rect: PSDL_Rect; X1: pcint; Y1: pcint; X
281292
*
282293
* \threadsafety It is safe to call this function from any thread.
283294
*
284-
* \since This function is available since SDL 3.1.3.
295+
* \since This function is available since SDL 3.2.0.
285296
}
286297
function SDL_PointInRectFloat(const p: PSDL_FPoint; const r: PSDL_FRect): Boolean; inline;
287298

288299
{*
289-
* Determine whether a floating point rectangle can contain any point.
300+
* Determine whether a floating point rectangle takes no space.
290301
*
291302
* A rectangle is considered "empty" for this function if `r` is nil, or if
292303
* `r`'s width and/or height are < 0.0f.
@@ -301,7 +312,7 @@ function SDL_PointInRectFloat(const p: PSDL_FPoint; const r: PSDL_FRect): Boolea
301312
*
302313
* \threadsafety It is safe to call this function from any thread.
303314
*
304-
* \since This function is available since SDL 3.1.3.
315+
* \since This function is available since SDL 3.2.0.
305316
}
306317
function SDL_RectEmptyFloat(const r: PSDL_FRect): Boolean; inline;
307318

@@ -326,11 +337,11 @@ function SDL_RectEmptyFloat(const r: PSDL_FRect): Boolean; inline;
326337
*
327338
* \threadsafety It is safe to call this function from any thread.
328339
*
329-
* \since This function is available since SDL 3.1.3.
340+
* \since This function is available since SDL 3.2.0.
330341
*
331342
* \sa SDL_RectsEqualFloat
332343
}
333-
function SDL_RectsEqualEpsilon(const a: PSDL_Frect; const b: PSDL_FRect; const epsilon: cfloat): Boolean; inline;
344+
function SDL_RectsEqualEpsilon(const a: PSDL_Frect; const b: PSDL_FRect; epsilon: cfloat): Boolean; inline;
334345

335346
{*
336347
* Determine whether two floating point rectangles are equal, within a default
@@ -353,7 +364,7 @@ function SDL_RectsEqualEpsilon(const a: PSDL_Frect; const b: PSDL_FRect; const e
353364
*
354365
* \threadsafety It is safe to call this function from any thread.
355366
*
356-
* \since This function is available since SDL 3.1.3.
367+
* \since This function is available since SDL 3.2.0.
357368
*
358369
* \sa SDL_RectsEqualEpsilon
359370
}
@@ -368,7 +379,9 @@ function SDL_RectsEqualFloat(const a: PSDL_FRect; b: PSDL_FRect): Boolean; inlin
368379
* \param B an SDL_FRect structure representing the second rectangle.
369380
* \returns true if there is an intersection, false otherwise.
370381
*
371-
* \since This function is available since SDL 3.1.3.
382+
* \threadsafety It is safe to call this function from any thread.
383+
*
384+
* \since This function is available since SDL 3.2.0.
372385
*
373386
* \sa SDL_GetRectIntersection
374387
}
@@ -386,7 +399,9 @@ function SDL_HasRectIntersectionFloat(A: PSDL_FRect; B: PSDL_FRect): Boolean; cd
386399
* rectangles `A` and `B`.
387400
* \returns true if there is an intersection, false otherwise.
388401
*
389-
* \since This function is available since SDL 3.1.3.
402+
* \threadsafety It is safe to call this function from any thread.
403+
*
404+
* \since This function is available since SDL 3.2.0.
390405
*
391406
* \sa SDL_HasRectIntersectionFloat
392407
}
@@ -403,7 +418,9 @@ function SDL_GetRectIntersectionFloat(A: PSDL_FRect; B: PSDL_FRect; result: PSDL
403418
* \returns true on success or false on failure; call SDL_GetError() for more
404419
* information.
405420
*
406-
* \since This function is available since SDL 3.1.3.
421+
* \threadsafety It is safe to call this function from any thread.
422+
*
423+
* \since This function is available since SDL 3.2.0.
407424
}
408425
function SDL_GetRectUnionFloat(A: PSDL_FRect; B: PSDL_FRect; result: PSDL_FRect): Boolean; cdecl;
409426
external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_GetRectUnionFloat' {$ENDIF} {$ENDIF};
@@ -424,7 +441,9 @@ function SDL_GetRectUnionFloat(A: PSDL_FRect; B: PSDL_FRect; result: PSDL_FRect)
424441
* \returns true if any points were enclosed or false if all the points were
425442
* outside of the clipping rectangle.
426443
*
427-
* \since This function is available since SDL 3.1.3.
444+
* \threadsafety It is safe to call this function from any thread.
445+
*
446+
* \since This function is available since SDL 3.2.0.
428447
}
429448
function SDL_GetRectEnclosingPointsFloat(points: PSDL_FPoint; count: cint; clip: PSDL_FRect; result: PSDL_FRect): Boolean; cdecl;
430449
external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_GetRectEnclosingPointsFloat' {$ENDIF} {$ENDIF};
@@ -446,7 +465,9 @@ function SDL_GetRectEnclosingPointsFloat(points: PSDL_FPoint; count: cint; clip:
446465
* \param Y2 a pointer to the ending Y-coordinate of the line.
447466
* \returns true if there is an intersection, false otherwise.
448467
*
449-
* \since This function is available since SDL 3.1.3.
468+
* \threadsafety It is safe to call this function from any thread.
469+
*
470+
* \since This function is available since SDL 3.2.0.
450471
}
451472
function SDL_GetRectAndLineIntersectionFloat(rect: PSDL_FRect; X1: pcfloat; Y1: pcfloat; X2: pcfloat; Y2: pcfloat): Boolean; cdecl;
452473
external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_GetRectAndLineIntersectionFloat' {$ENDIF} {$ENDIF};

0 commit comments

Comments
 (0)