Mercurial > sdl-ios-xcode
comparison src/video/SDL_drawline.c @ 3594:c8bed77b0386
Added SDL_DrawRect(), SDL_DrawRects(), SDL_BlendRect() and SDL_BlendRects()
Fixed line drawing so when blending a sequence of lines there are no overlapping pixels drawn.
author | Sam Lantinga <slouken@libsdl.org> |
---|---|
date | Fri, 18 Dec 2009 07:41:59 +0000 |
parents | 0267b8b1595c |
children | f638ded38b8a |
comparison
equal
deleted
inserted
replaced
3593:b931bcfd94a0 | 3594:c8bed77b0386 |
---|---|
44 return (0); | 44 return (0); |
45 } | 45 } |
46 | 46 |
47 switch (dst->format->BytesPerPixel) { | 47 switch (dst->format->BytesPerPixel) { |
48 case 1: | 48 case 1: |
49 DRAWLINE(x1, y1, x2, y2, DRAW_FASTSETPIXEL1); | 49 DRAWLINE(x1, y1, x2, y2, DRAW_FASTSETPIXEL1, SDL_TRUE); |
50 break; | 50 break; |
51 case 2: | 51 case 2: |
52 DRAWLINE(x1, y1, x2, y2, DRAW_FASTSETPIXEL2); | 52 DRAWLINE(x1, y1, x2, y2, DRAW_FASTSETPIXEL2, SDL_TRUE); |
53 break; | 53 break; |
54 case 3: | 54 case 3: |
55 SDL_Unsupported(); | 55 SDL_Unsupported(); |
56 return -1; | 56 return -1; |
57 case 4: | 57 case 4: |
58 DRAWLINE(x1, y1, x2, y2, DRAW_FASTSETPIXEL4); | 58 DRAWLINE(x1, y1, x2, y2, DRAW_FASTSETPIXEL4, SDL_TRUE); |
59 break; | 59 break; |
60 } | 60 } |
61 return 0; | 61 return 0; |
62 } | 62 } |
63 | 63 |
94 continue; | 94 continue; |
95 } | 95 } |
96 | 96 |
97 switch (dst->format->BytesPerPixel) { | 97 switch (dst->format->BytesPerPixel) { |
98 case 1: | 98 case 1: |
99 DRAWLINE(x1, y1, x2, y2, DRAW_FASTSETPIXEL1); | 99 DRAWLINE(x1, y1, x2, y2, DRAW_FASTSETPIXEL1, SDL_TRUE); |
100 break; | 100 break; |
101 case 2: | 101 case 2: |
102 DRAWLINE(x1, y1, x2, y2, DRAW_FASTSETPIXEL2); | 102 DRAWLINE(x1, y1, x2, y2, DRAW_FASTSETPIXEL2, SDL_TRUE); |
103 break; | 103 break; |
104 case 3: | 104 case 3: |
105 SDL_Unsupported(); | 105 SDL_Unsupported(); |
106 return -1; | 106 return -1; |
107 case 4: | 107 case 4: |
108 DRAWLINE(x1, y1, x2, y2, DRAW_FASTSETPIXEL4); | 108 DRAWLINE(x1, y1, x2, y2, DRAW_FASTSETPIXEL4, SDL_TRUE); |
109 break; | 109 break; |
110 } | 110 } |
111 } | 111 } |
112 return 0; | 112 return 0; |
113 } | 113 } |