mirror of
https://github.com/libsdl-org/SDL.git
synced 2026-04-20 14:25:40 +00:00
SDL API renaming: SDL_rect.h
Fixes https://github.com/libsdl-org/SDL/issues/6887
This commit is contained in:
@@ -223,7 +223,7 @@ int SDL_BlendFillRect(SDL_Surface *dst, const SDL_Rect *rect,
|
||||
/* If 'rect' == NULL, then fill the whole surface */
|
||||
if (rect) {
|
||||
/* Perform clipping */
|
||||
if (!SDL_IntersectRect(rect, &dst->clip_rect, &clipped)) {
|
||||
if (!SDL_GetRectIntersection(rect, &dst->clip_rect, &clipped)) {
|
||||
return 0;
|
||||
}
|
||||
rect = &clipped;
|
||||
@@ -335,7 +335,7 @@ int SDL_BlendFillRects(SDL_Surface *dst, const SDL_Rect *rects, int count,
|
||||
|
||||
for (i = 0; i < count; ++i) {
|
||||
/* Perform clipping */
|
||||
if (!SDL_IntersectRect(&rects[i], &dst->clip_rect, &rect)) {
|
||||
if (!SDL_GetRectIntersection(&rects[i], &dst->clip_rect, &rect)) {
|
||||
continue;
|
||||
}
|
||||
status = func(dst, &rect, blendMode, r, g, b, a);
|
||||
|
||||
@@ -809,7 +809,7 @@ int SDL_BlendLine(SDL_Surface *dst, int x1, int y1, int x2, int y2,
|
||||
|
||||
/* Perform clipping */
|
||||
/* FIXME: We don't actually want to clip, as it may change line slope */
|
||||
if (!SDL_IntersectRectAndLine(&dst->clip_rect, &x1, &y1, &x2, &y2)) {
|
||||
if (!SDL_GetRectAndLineIntersection(&dst->clip_rect, &x1, &y1, &x2, &y2)) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -843,7 +843,7 @@ int SDL_BlendLines(SDL_Surface *dst, const SDL_Point *points, int count,
|
||||
|
||||
/* Perform clipping */
|
||||
/* FIXME: We don't actually want to clip, as it may change line slope */
|
||||
if (!SDL_IntersectRectAndLine(&dst->clip_rect, &x1, &y1, &x2, &y2)) {
|
||||
if (!SDL_GetRectAndLineIntersection(&dst->clip_rect, &x1, &y1, &x2, &y2)) {
|
||||
continue;
|
||||
}
|
||||
|
||||
|
||||
@@ -148,7 +148,7 @@ int SDL_DrawLine(SDL_Surface *dst, int x1, int y1, int x2, int y2, Uint32 color)
|
||||
|
||||
/* Perform clipping */
|
||||
/* FIXME: We don't actually want to clip, as it may change line slope */
|
||||
if (!SDL_IntersectRectAndLine(&dst->clip_rect, &x1, &y1, &x2, &y2)) {
|
||||
if (!SDL_GetRectAndLineIntersection(&dst->clip_rect, &x1, &y1, &x2, &y2)) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -182,7 +182,7 @@ int SDL_DrawLines(SDL_Surface *dst, const SDL_Point *points, int count,
|
||||
|
||||
/* Perform clipping */
|
||||
/* FIXME: We don't actually want to clip, as it may change line slope */
|
||||
if (!SDL_IntersectRectAndLine(&dst->clip_rect, &x1, &y1, &x2, &y2)) {
|
||||
if (!SDL_GetRectAndLineIntersection(&dst->clip_rect, &x1, &y1, &x2, &y2)) {
|
||||
continue;
|
||||
}
|
||||
|
||||
|
||||
@@ -644,7 +644,7 @@ static void SetDrawState(SDL_Surface *surface, SW_DrawStateCache *drawstate)
|
||||
clip_rect.y = cliprect->y + viewport->y;
|
||||
clip_rect.w = cliprect->w;
|
||||
clip_rect.h = cliprect->h;
|
||||
SDL_IntersectRect(viewport, &clip_rect, &clip_rect);
|
||||
SDL_GetRectIntersection(viewport, &clip_rect, &clip_rect);
|
||||
SDL_SetSurfaceClipRect(surface, &clip_rect);
|
||||
} else {
|
||||
SDL_SetSurfaceClipRect(surface, drawstate->viewport);
|
||||
|
||||
@@ -251,14 +251,14 @@ int SDL_SW_FillTriangle(SDL_Surface *dst, SDL_Point *d0, SDL_Point *d1, SDL_Poin
|
||||
rect.y = 0;
|
||||
rect.w = dst->w;
|
||||
rect.h = dst->h;
|
||||
SDL_IntersectRect(&dstrect, &rect, &dstrect);
|
||||
SDL_GetRectIntersection(&dstrect, &rect, &dstrect);
|
||||
}
|
||||
|
||||
{
|
||||
/* Clip triangle with surface clip rect */
|
||||
SDL_Rect rect;
|
||||
SDL_GetSurfaceClipRect(dst, &rect);
|
||||
SDL_IntersectRect(&dstrect, &rect, &dstrect);
|
||||
SDL_GetRectIntersection(&dstrect, &rect, &dstrect);
|
||||
}
|
||||
|
||||
if (blend != SDL_BLENDMODE_NONE) {
|
||||
@@ -547,14 +547,14 @@ int SDL_SW_BlitTriangle(
|
||||
rect.w = dst->w;
|
||||
rect.h = dst->h;
|
||||
|
||||
SDL_IntersectRect(&dstrect, &rect, &dstrect);
|
||||
SDL_GetRectIntersection(&dstrect, &rect, &dstrect);
|
||||
}
|
||||
|
||||
{
|
||||
/* Clip triangle with surface clip rect */
|
||||
SDL_Rect rect;
|
||||
SDL_GetSurfaceClipRect(dst, &rect);
|
||||
SDL_IntersectRect(&dstrect, &rect, &dstrect);
|
||||
SDL_GetRectIntersection(&dstrect, &rect, &dstrect);
|
||||
}
|
||||
|
||||
/* Set destination pointer */
|
||||
|
||||
Reference in New Issue
Block a user