2 Simple DirectMedia Layer
3 Copyright (C) 1997-2017 Sam Lantinga <slouken@libsdl.org>
5 This software is provided 'as-is', without any express or implied
6 warranty. In no event will the authors be held liable for any damages
7 arising from the use of this software.
9 Permission is granted to anyone to use this software for any purpose,
10 including commercial applications, and to alter it and redistribute it
11 freely, subject to the following restrictions:
13 1. The origin of this software must not be misrepresented; you must not
14 claim that you wrote the original software. If you use this software
15 in a product, an acknowledgment in the product documentation would be
16 appreciated but is not required.
17 2. Altered source versions must be plainly marked as such, and must not be
18 misrepresented as being the original software.
19 3. This notice may not be removed or altered from any source distribution.
21 #include "../../SDL_internal.h"
23 #if !SDL_RENDER_DISABLED
26 #include "SDL_blendline.h"
27 #include "SDL_blendpoint.h"
31 SDL_BlendLine_RGB2(SDL_Surface * dst, int x1, int y1, int x2, int y2,
32 SDL_BlendMode blendMode, Uint8 _r, Uint8 _g, Uint8 _b, Uint8 _a,
35 const SDL_PixelFormat *fmt = dst->format;
36 unsigned r, g, b, a, inva;
38 if (blendMode == SDL_BLENDMODE_BLEND || blendMode == SDL_BLENDMODE_ADD) {
53 case SDL_BLENDMODE_BLEND:
54 HLINE(Uint16, DRAW_SETPIXEL_BLEND_RGB, draw_end);
56 case SDL_BLENDMODE_ADD:
57 HLINE(Uint16, DRAW_SETPIXEL_ADD_RGB, draw_end);
59 case SDL_BLENDMODE_MOD:
60 HLINE(Uint16, DRAW_SETPIXEL_MOD_RGB, draw_end);
63 HLINE(Uint16, DRAW_SETPIXEL_RGB, draw_end);
66 } else if (x1 == x2) {
68 case SDL_BLENDMODE_BLEND:
69 VLINE(Uint16, DRAW_SETPIXEL_BLEND_RGB, draw_end);
71 case SDL_BLENDMODE_ADD:
72 VLINE(Uint16, DRAW_SETPIXEL_ADD_RGB, draw_end);
74 case SDL_BLENDMODE_MOD:
75 VLINE(Uint16, DRAW_SETPIXEL_MOD_RGB, draw_end);
78 VLINE(Uint16, DRAW_SETPIXEL_RGB, draw_end);
81 } else if (ABS(x1 - x2) == ABS(y1 - y2)) {
83 case SDL_BLENDMODE_BLEND:
84 DLINE(Uint16, DRAW_SETPIXEL_BLEND_RGB, draw_end);
86 case SDL_BLENDMODE_ADD:
87 DLINE(Uint16, DRAW_SETPIXEL_ADD_RGB, draw_end);
89 case SDL_BLENDMODE_MOD:
90 DLINE(Uint16, DRAW_SETPIXEL_MOD_RGB, draw_end);
93 DLINE(Uint16, DRAW_SETPIXEL_RGB, draw_end);
98 case SDL_BLENDMODE_BLEND:
99 AALINE(x1, y1, x2, y2,
100 DRAW_SETPIXELXY2_BLEND_RGB, DRAW_SETPIXELXY2_BLEND_RGB,
103 case SDL_BLENDMODE_ADD:
104 AALINE(x1, y1, x2, y2,
105 DRAW_SETPIXELXY2_ADD_RGB, DRAW_SETPIXELXY2_ADD_RGB,
108 case SDL_BLENDMODE_MOD:
109 AALINE(x1, y1, x2, y2,
110 DRAW_SETPIXELXY2_MOD_RGB, DRAW_SETPIXELXY2_MOD_RGB,
114 AALINE(x1, y1, x2, y2,
115 DRAW_SETPIXELXY2_RGB, DRAW_SETPIXELXY2_BLEND_RGB,
123 SDL_BlendLine_RGB555(SDL_Surface * dst, int x1, int y1, int x2, int y2,
124 SDL_BlendMode blendMode, Uint8 _r, Uint8 _g, Uint8 _b, Uint8 _a,
127 unsigned r, g, b, a, inva;
129 if (blendMode == SDL_BLENDMODE_BLEND || blendMode == SDL_BLENDMODE_ADD) {
130 r = DRAW_MUL(_r, _a);
131 g = DRAW_MUL(_g, _a);
132 b = DRAW_MUL(_b, _a);
144 case SDL_BLENDMODE_BLEND:
145 HLINE(Uint16, DRAW_SETPIXEL_BLEND_RGB555, draw_end);
147 case SDL_BLENDMODE_ADD:
148 HLINE(Uint16, DRAW_SETPIXEL_ADD_RGB555, draw_end);
150 case SDL_BLENDMODE_MOD:
151 HLINE(Uint16, DRAW_SETPIXEL_MOD_RGB555, draw_end);
154 HLINE(Uint16, DRAW_SETPIXEL_RGB555, draw_end);
157 } else if (x1 == x2) {
159 case SDL_BLENDMODE_BLEND:
160 VLINE(Uint16, DRAW_SETPIXEL_BLEND_RGB555, draw_end);
162 case SDL_BLENDMODE_ADD:
163 VLINE(Uint16, DRAW_SETPIXEL_ADD_RGB555, draw_end);
165 case SDL_BLENDMODE_MOD:
166 VLINE(Uint16, DRAW_SETPIXEL_MOD_RGB555, draw_end);
169 VLINE(Uint16, DRAW_SETPIXEL_RGB555, draw_end);
172 } else if (ABS(x1 - x2) == ABS(y1 - y2)) {
174 case SDL_BLENDMODE_BLEND:
175 DLINE(Uint16, DRAW_SETPIXEL_BLEND_RGB555, draw_end);
177 case SDL_BLENDMODE_ADD:
178 DLINE(Uint16, DRAW_SETPIXEL_ADD_RGB555, draw_end);
180 case SDL_BLENDMODE_MOD:
181 DLINE(Uint16, DRAW_SETPIXEL_MOD_RGB555, draw_end);
184 DLINE(Uint16, DRAW_SETPIXEL_RGB555, draw_end);
189 case SDL_BLENDMODE_BLEND:
190 AALINE(x1, y1, x2, y2,
191 DRAW_SETPIXELXY_BLEND_RGB555, DRAW_SETPIXELXY_BLEND_RGB555,
194 case SDL_BLENDMODE_ADD:
195 AALINE(x1, y1, x2, y2,
196 DRAW_SETPIXELXY_ADD_RGB555, DRAW_SETPIXELXY_ADD_RGB555,
199 case SDL_BLENDMODE_MOD:
200 AALINE(x1, y1, x2, y2,
201 DRAW_SETPIXELXY_MOD_RGB555, DRAW_SETPIXELXY_MOD_RGB555,
205 AALINE(x1, y1, x2, y2,
206 DRAW_SETPIXELXY_RGB555, DRAW_SETPIXELXY_BLEND_RGB555,
214 SDL_BlendLine_RGB565(SDL_Surface * dst, int x1, int y1, int x2, int y2,
215 SDL_BlendMode blendMode, Uint8 _r, Uint8 _g, Uint8 _b, Uint8 _a,
218 unsigned r, g, b, a, inva;
220 if (blendMode == SDL_BLENDMODE_BLEND || blendMode == SDL_BLENDMODE_ADD) {
221 r = DRAW_MUL(_r, _a);
222 g = DRAW_MUL(_g, _a);
223 b = DRAW_MUL(_b, _a);
235 case SDL_BLENDMODE_BLEND:
236 HLINE(Uint16, DRAW_SETPIXEL_BLEND_RGB565, draw_end);
238 case SDL_BLENDMODE_ADD:
239 HLINE(Uint16, DRAW_SETPIXEL_ADD_RGB565, draw_end);
241 case SDL_BLENDMODE_MOD:
242 HLINE(Uint16, DRAW_SETPIXEL_MOD_RGB565, draw_end);
245 HLINE(Uint16, DRAW_SETPIXEL_RGB565, draw_end);
248 } else if (x1 == x2) {
250 case SDL_BLENDMODE_BLEND:
251 VLINE(Uint16, DRAW_SETPIXEL_BLEND_RGB565, draw_end);
253 case SDL_BLENDMODE_ADD:
254 VLINE(Uint16, DRAW_SETPIXEL_ADD_RGB565, draw_end);
256 case SDL_BLENDMODE_MOD:
257 VLINE(Uint16, DRAW_SETPIXEL_MOD_RGB565, draw_end);
260 VLINE(Uint16, DRAW_SETPIXEL_RGB565, draw_end);
263 } else if (ABS(x1 - x2) == ABS(y1 - y2)) {
265 case SDL_BLENDMODE_BLEND:
266 DLINE(Uint16, DRAW_SETPIXEL_BLEND_RGB565, draw_end);
268 case SDL_BLENDMODE_ADD:
269 DLINE(Uint16, DRAW_SETPIXEL_ADD_RGB565, draw_end);
271 case SDL_BLENDMODE_MOD:
272 DLINE(Uint16, DRAW_SETPIXEL_MOD_RGB565, draw_end);
275 DLINE(Uint16, DRAW_SETPIXEL_RGB565, draw_end);
280 case SDL_BLENDMODE_BLEND:
281 AALINE(x1, y1, x2, y2,
282 DRAW_SETPIXELXY_BLEND_RGB565, DRAW_SETPIXELXY_BLEND_RGB565,
285 case SDL_BLENDMODE_ADD:
286 AALINE(x1, y1, x2, y2,
287 DRAW_SETPIXELXY_ADD_RGB565, DRAW_SETPIXELXY_ADD_RGB565,
290 case SDL_BLENDMODE_MOD:
291 AALINE(x1, y1, x2, y2,
292 DRAW_SETPIXELXY_MOD_RGB565, DRAW_SETPIXELXY_MOD_RGB565,
296 AALINE(x1, y1, x2, y2,
297 DRAW_SETPIXELXY_RGB565, DRAW_SETPIXELXY_BLEND_RGB565,
305 SDL_BlendLine_RGB4(SDL_Surface * dst, int x1, int y1, int x2, int y2,
306 SDL_BlendMode blendMode, Uint8 _r, Uint8 _g, Uint8 _b, Uint8 _a,
309 const SDL_PixelFormat *fmt = dst->format;
310 unsigned r, g, b, a, inva;
312 if (blendMode == SDL_BLENDMODE_BLEND || blendMode == SDL_BLENDMODE_ADD) {
313 r = DRAW_MUL(_r, _a);
314 g = DRAW_MUL(_g, _a);
315 b = DRAW_MUL(_b, _a);
327 case SDL_BLENDMODE_BLEND:
328 HLINE(Uint32, DRAW_SETPIXEL_BLEND_RGB, draw_end);
330 case SDL_BLENDMODE_ADD:
331 HLINE(Uint32, DRAW_SETPIXEL_ADD_RGB, draw_end);
333 case SDL_BLENDMODE_MOD:
334 HLINE(Uint32, DRAW_SETPIXEL_MOD_RGB, draw_end);
337 HLINE(Uint32, DRAW_SETPIXEL_RGB, draw_end);
340 } else if (x1 == x2) {
342 case SDL_BLENDMODE_BLEND:
343 VLINE(Uint32, DRAW_SETPIXEL_BLEND_RGB, draw_end);
345 case SDL_BLENDMODE_ADD:
346 VLINE(Uint32, DRAW_SETPIXEL_ADD_RGB, draw_end);
348 case SDL_BLENDMODE_MOD:
349 VLINE(Uint32, DRAW_SETPIXEL_MOD_RGB, draw_end);
352 VLINE(Uint32, DRAW_SETPIXEL_RGB, draw_end);
355 } else if (ABS(x1 - x2) == ABS(y1 - y2)) {
357 case SDL_BLENDMODE_BLEND:
358 DLINE(Uint32, DRAW_SETPIXEL_BLEND_RGB, draw_end);
360 case SDL_BLENDMODE_ADD:
361 DLINE(Uint32, DRAW_SETPIXEL_ADD_RGB, draw_end);
363 case SDL_BLENDMODE_MOD:
364 DLINE(Uint32, DRAW_SETPIXEL_MOD_RGB, draw_end);
367 DLINE(Uint32, DRAW_SETPIXEL_RGB, draw_end);
372 case SDL_BLENDMODE_BLEND:
373 AALINE(x1, y1, x2, y2,
374 DRAW_SETPIXELXY4_BLEND_RGB, DRAW_SETPIXELXY4_BLEND_RGB,
377 case SDL_BLENDMODE_ADD:
378 AALINE(x1, y1, x2, y2,
379 DRAW_SETPIXELXY4_ADD_RGB, DRAW_SETPIXELXY4_ADD_RGB,
382 case SDL_BLENDMODE_MOD:
383 AALINE(x1, y1, x2, y2,
384 DRAW_SETPIXELXY4_MOD_RGB, DRAW_SETPIXELXY4_MOD_RGB,
388 AALINE(x1, y1, x2, y2,
389 DRAW_SETPIXELXY4_RGB, DRAW_SETPIXELXY4_BLEND_RGB,
397 SDL_BlendLine_RGBA4(SDL_Surface * dst, int x1, int y1, int x2, int y2,
398 SDL_BlendMode blendMode, Uint8 _r, Uint8 _g, Uint8 _b, Uint8 _a,
401 const SDL_PixelFormat *fmt = dst->format;
402 unsigned r, g, b, a, inva;
404 if (blendMode == SDL_BLENDMODE_BLEND || blendMode == SDL_BLENDMODE_ADD) {
405 r = DRAW_MUL(_r, _a);
406 g = DRAW_MUL(_g, _a);
407 b = DRAW_MUL(_b, _a);
419 case SDL_BLENDMODE_BLEND:
420 HLINE(Uint32, DRAW_SETPIXEL_BLEND_RGBA, draw_end);
422 case SDL_BLENDMODE_ADD:
423 HLINE(Uint32, DRAW_SETPIXEL_ADD_RGBA, draw_end);
425 case SDL_BLENDMODE_MOD:
426 HLINE(Uint32, DRAW_SETPIXEL_MOD_RGBA, draw_end);
429 HLINE(Uint32, DRAW_SETPIXEL_RGBA, draw_end);
432 } else if (x1 == x2) {
434 case SDL_BLENDMODE_BLEND:
435 VLINE(Uint32, DRAW_SETPIXEL_BLEND_RGBA, draw_end);
437 case SDL_BLENDMODE_ADD:
438 VLINE(Uint32, DRAW_SETPIXEL_ADD_RGBA, draw_end);
440 case SDL_BLENDMODE_MOD:
441 VLINE(Uint32, DRAW_SETPIXEL_MOD_RGBA, draw_end);
444 VLINE(Uint32, DRAW_SETPIXEL_RGBA, draw_end);
447 } else if (ABS(x1 - x2) == ABS(y1 - y2)) {
449 case SDL_BLENDMODE_BLEND:
450 DLINE(Uint32, DRAW_SETPIXEL_BLEND_RGBA, draw_end);
452 case SDL_BLENDMODE_ADD:
453 DLINE(Uint32, DRAW_SETPIXEL_ADD_RGBA, draw_end);
455 case SDL_BLENDMODE_MOD:
456 DLINE(Uint32, DRAW_SETPIXEL_MOD_RGBA, draw_end);
459 DLINE(Uint32, DRAW_SETPIXEL_RGBA, draw_end);
464 case SDL_BLENDMODE_BLEND:
465 AALINE(x1, y1, x2, y2,
466 DRAW_SETPIXELXY4_BLEND_RGBA, DRAW_SETPIXELXY4_BLEND_RGBA,
469 case SDL_BLENDMODE_ADD:
470 AALINE(x1, y1, x2, y2,
471 DRAW_SETPIXELXY4_ADD_RGBA, DRAW_SETPIXELXY4_ADD_RGBA,
474 case SDL_BLENDMODE_MOD:
475 AALINE(x1, y1, x2, y2,
476 DRAW_SETPIXELXY4_MOD_RGBA, DRAW_SETPIXELXY4_MOD_RGBA,
480 AALINE(x1, y1, x2, y2,
481 DRAW_SETPIXELXY4_RGBA, DRAW_SETPIXELXY4_BLEND_RGBA,
489 SDL_BlendLine_RGB888(SDL_Surface * dst, int x1, int y1, int x2, int y2,
490 SDL_BlendMode blendMode, Uint8 _r, Uint8 _g, Uint8 _b, Uint8 _a,
493 unsigned r, g, b, a, inva;
495 if (blendMode == SDL_BLENDMODE_BLEND || blendMode == SDL_BLENDMODE_ADD) {
496 r = DRAW_MUL(_r, _a);
497 g = DRAW_MUL(_g, _a);
498 b = DRAW_MUL(_b, _a);
510 case SDL_BLENDMODE_BLEND:
511 HLINE(Uint32, DRAW_SETPIXEL_BLEND_RGB888, draw_end);
513 case SDL_BLENDMODE_ADD:
514 HLINE(Uint32, DRAW_SETPIXEL_ADD_RGB888, draw_end);
516 case SDL_BLENDMODE_MOD:
517 HLINE(Uint32, DRAW_SETPIXEL_MOD_RGB888, draw_end);
520 HLINE(Uint32, DRAW_SETPIXEL_RGB888, draw_end);
523 } else if (x1 == x2) {
525 case SDL_BLENDMODE_BLEND:
526 VLINE(Uint32, DRAW_SETPIXEL_BLEND_RGB888, draw_end);
528 case SDL_BLENDMODE_ADD:
529 VLINE(Uint32, DRAW_SETPIXEL_ADD_RGB888, draw_end);
531 case SDL_BLENDMODE_MOD:
532 VLINE(Uint32, DRAW_SETPIXEL_MOD_RGB888, draw_end);
535 VLINE(Uint32, DRAW_SETPIXEL_RGB888, draw_end);
538 } else if (ABS(x1 - x2) == ABS(y1 - y2)) {
540 case SDL_BLENDMODE_BLEND:
541 DLINE(Uint32, DRAW_SETPIXEL_BLEND_RGB888, draw_end);
543 case SDL_BLENDMODE_ADD:
544 DLINE(Uint32, DRAW_SETPIXEL_ADD_RGB888, draw_end);
546 case SDL_BLENDMODE_MOD:
547 DLINE(Uint32, DRAW_SETPIXEL_MOD_RGB888, draw_end);
550 DLINE(Uint32, DRAW_SETPIXEL_RGB888, draw_end);
555 case SDL_BLENDMODE_BLEND:
556 AALINE(x1, y1, x2, y2,
557 DRAW_SETPIXELXY_BLEND_RGB888, DRAW_SETPIXELXY_BLEND_RGB888,
560 case SDL_BLENDMODE_ADD:
561 AALINE(x1, y1, x2, y2,
562 DRAW_SETPIXELXY_ADD_RGB888, DRAW_SETPIXELXY_ADD_RGB888,
565 case SDL_BLENDMODE_MOD:
566 AALINE(x1, y1, x2, y2,
567 DRAW_SETPIXELXY_MOD_RGB888, DRAW_SETPIXELXY_MOD_RGB888,
571 AALINE(x1, y1, x2, y2,
572 DRAW_SETPIXELXY_RGB888, DRAW_SETPIXELXY_BLEND_RGB888,
580 SDL_BlendLine_ARGB8888(SDL_Surface * dst, int x1, int y1, int x2, int y2,
581 SDL_BlendMode blendMode, Uint8 _r, Uint8 _g, Uint8 _b, Uint8 _a,
584 unsigned r, g, b, a, inva;
586 if (blendMode == SDL_BLENDMODE_BLEND || blendMode == SDL_BLENDMODE_ADD) {
587 r = DRAW_MUL(_r, _a);
588 g = DRAW_MUL(_g, _a);
589 b = DRAW_MUL(_b, _a);
601 case SDL_BLENDMODE_BLEND:
602 HLINE(Uint32, DRAW_SETPIXEL_BLEND_ARGB8888, draw_end);
604 case SDL_BLENDMODE_ADD:
605 HLINE(Uint32, DRAW_SETPIXEL_ADD_ARGB8888, draw_end);
607 case SDL_BLENDMODE_MOD:
608 HLINE(Uint32, DRAW_SETPIXEL_MOD_ARGB8888, draw_end);
611 HLINE(Uint32, DRAW_SETPIXEL_ARGB8888, draw_end);
614 } else if (x1 == x2) {
616 case SDL_BLENDMODE_BLEND:
617 VLINE(Uint32, DRAW_SETPIXEL_BLEND_ARGB8888, draw_end);
619 case SDL_BLENDMODE_ADD:
620 VLINE(Uint32, DRAW_SETPIXEL_ADD_ARGB8888, draw_end);
622 case SDL_BLENDMODE_MOD:
623 VLINE(Uint32, DRAW_SETPIXEL_MOD_ARGB8888, draw_end);
626 VLINE(Uint32, DRAW_SETPIXEL_ARGB8888, draw_end);
629 } else if (ABS(x1 - x2) == ABS(y1 - y2)) {
631 case SDL_BLENDMODE_BLEND:
632 DLINE(Uint32, DRAW_SETPIXEL_BLEND_ARGB8888, draw_end);
634 case SDL_BLENDMODE_ADD:
635 DLINE(Uint32, DRAW_SETPIXEL_ADD_ARGB8888, draw_end);
637 case SDL_BLENDMODE_MOD:
638 DLINE(Uint32, DRAW_SETPIXEL_MOD_ARGB8888, draw_end);
641 DLINE(Uint32, DRAW_SETPIXEL_ARGB8888, draw_end);
646 case SDL_BLENDMODE_BLEND:
647 AALINE(x1, y1, x2, y2,
648 DRAW_SETPIXELXY_BLEND_ARGB8888, DRAW_SETPIXELXY_BLEND_ARGB8888,
651 case SDL_BLENDMODE_ADD:
652 AALINE(x1, y1, x2, y2,
653 DRAW_SETPIXELXY_ADD_ARGB8888, DRAW_SETPIXELXY_ADD_ARGB8888,
656 case SDL_BLENDMODE_MOD:
657 AALINE(x1, y1, x2, y2,
658 DRAW_SETPIXELXY_MOD_ARGB8888, DRAW_SETPIXELXY_MOD_ARGB8888,
662 AALINE(x1, y1, x2, y2,
663 DRAW_SETPIXELXY_ARGB8888, DRAW_SETPIXELXY_BLEND_ARGB8888,
670 typedef void (*BlendLineFunc) (SDL_Surface * dst,
671 int x1, int y1, int x2, int y2,
672 SDL_BlendMode blendMode,
673 Uint8 r, Uint8 g, Uint8 b, Uint8 a,
677 SDL_CalculateBlendLineFunc(const SDL_PixelFormat * fmt)
679 switch (fmt->BytesPerPixel) {
681 if (fmt->Rmask == 0x7C00) {
682 return SDL_BlendLine_RGB555;
683 } else if (fmt->Rmask == 0xF800) {
684 return SDL_BlendLine_RGB565;
686 return SDL_BlendLine_RGB2;
688 /* break; -Wunreachable-code-break */
690 if (fmt->Rmask == 0x00FF0000) {
692 return SDL_BlendLine_ARGB8888;
694 return SDL_BlendLine_RGB888;
698 return SDL_BlendLine_RGBA4;
700 return SDL_BlendLine_RGB4;
708 SDL_BlendLine(SDL_Surface * dst, int x1, int y1, int x2, int y2,
709 SDL_BlendMode blendMode, Uint8 r, Uint8 g, Uint8 b, Uint8 a)
714 return SDL_SetError("SDL_BlendLine(): Passed NULL destination surface");
717 func = SDL_CalculateBlendLineFunc(dst->format);
719 return SDL_SetError("SDL_BlendLine(): Unsupported surface format");
722 /* Perform clipping */
723 /* FIXME: We don't actually want to clip, as it may change line slope */
724 if (!SDL_IntersectRectAndLine(&dst->clip_rect, &x1, &y1, &x2, &y2)) {
728 func(dst, x1, y1, x2, y2, blendMode, r, g, b, a, SDL_TRUE);
733 SDL_BlendLines(SDL_Surface * dst, const SDL_Point * points, int count,
734 SDL_BlendMode blendMode, Uint8 r, Uint8 g, Uint8 b, Uint8 a)
743 return SDL_SetError("SDL_BlendLines(): Passed NULL destination surface");
746 func = SDL_CalculateBlendLineFunc(dst->format);
748 return SDL_SetError("SDL_BlendLines(): Unsupported surface format");
751 for (i = 1; i < count; ++i) {
757 /* Perform clipping */
758 /* FIXME: We don't actually want to clip, as it may change line slope */
759 if (!SDL_IntersectRectAndLine(&dst->clip_rect, &x1, &y1, &x2, &y2)) {
763 /* Draw the end if it was clipped */
764 draw_end = (x2 != points[i].x || y2 != points[i].y);
766 func(dst, x1, y1, x2, y2, blendMode, r, g, b, a, draw_end);
768 if (points[0].x != points[count-1].x || points[0].y != points[count-1].y) {
769 SDL_BlendPoint(dst, points[count-1].x, points[count-1].y,
770 blendMode, r, g, b, a);
775 #endif /* !SDL_RENDER_DISABLED */
777 /* vi: set ts=4 sw=4 expandtab: */