21 #include "../../SDL_internal.h"
23 #if !SDL_RENDER_DISABLED
40 length = draw_end ? (x2-x1+1) : (x2-
x1);
46 length = draw_end ? (x1-x2+1) : (x1-x2);
49 }
else if (x1 == x2) {
51 }
else if (
ABS(x1 - x2) ==
ABS(y1 - y2)) {
64 }
else if (x1 == x2) {
66 }
else if (
ABS(x1 - x2) ==
ABS(y1 - y2)) {
72 if (fmt->
Rmask == 0x7C00) {
76 }
else if (fmt->
Rmask == 0xF800) {
94 }
else if (x1 == x2) {
96 }
else if (
ABS(x1 - x2) ==
ABS(y1 - y2)) {
102 if (fmt->
Rmask == 0x00FF0000) {
147 return SDL_SetError(
"SDL_DrawLine(): Passed NULL destination surface");
152 return SDL_SetError(
"SDL_DrawLine(): Unsupported surface format");
176 return SDL_SetError(
"SDL_DrawLines(): Passed NULL destination surface");
181 return SDL_SetError(
"SDL_DrawLines(): Unsupported surface format");
184 for (i = 1; i <
count; ++
i) {
197 draw_end = (x2 != points[
i].
x || y2 != points[
i].
y);
199 func(dst, x1, y1, x2, y2, color, draw_end);
201 if (points[0].
x != points[count-1].
x || points[0].
y != points[count-1].
y) {