comparison src/video/SDL_drawpoint.c @ 3596:f638ded38b8a

Added SDL_RenderClear() as a fast method of clearing the screen to the drawing color. Renamed SDL_RenderPoint() and SDL_RenderLine() to SDL_RenderDrawPoint() and SDL_RenderDrawLine(). Added API for rectangle drawing (as opposed to filling) Added placeholder API functions for circles and ellipses ... I'm not sure whether these will stay. Optimized software line drawing quite a bit. Added support for Wu's anti-aliased line drawing, currently disabled by default.
author Sam Lantinga <slouken@libsdl.org>
date Wed, 23 Dec 2009 01:55:00 +0000
parents 0267b8b1595c
children f7b03b6838cb
comparison
equal deleted inserted replaced
3595:b7c6828d4039 3596:f638ded38b8a
45 return 0; 45 return 0;
46 } 46 }
47 47
48 switch (dst->format->BytesPerPixel) { 48 switch (dst->format->BytesPerPixel) {
49 case 1: 49 case 1:
50 DRAW_FASTSETPIXEL1(x, y); 50 DRAW_FASTSETPIXELXY1(x, y);
51 break; 51 break;
52 case 2: 52 case 2:
53 DRAW_FASTSETPIXEL2(x, y); 53 DRAW_FASTSETPIXELXY2(x, y);
54 break; 54 break;
55 case 3: 55 case 3:
56 SDL_Unsupported(); 56 SDL_Unsupported();
57 return -1; 57 return -1;
58 case 4: 58 case 4:
59 DRAW_FASTSETPIXEL4(x, y); 59 DRAW_FASTSETPIXELXY4(x, y);
60 break; 60 break;
61 } 61 }
62 return 0; 62 return 0;
63 } 63 }
64 64
95 continue; 95 continue;
96 } 96 }
97 97
98 switch (dst->format->BytesPerPixel) { 98 switch (dst->format->BytesPerPixel) {
99 case 1: 99 case 1:
100 DRAW_FASTSETPIXEL1(x, y); 100 DRAW_FASTSETPIXELXY1(x, y);
101 break; 101 break;
102 case 2: 102 case 2:
103 DRAW_FASTSETPIXEL2(x, y); 103 DRAW_FASTSETPIXELXY2(x, y);
104 break; 104 break;
105 case 3: 105 case 3:
106 SDL_Unsupported(); 106 SDL_Unsupported();
107 return -1; 107 return -1;
108 case 4: 108 case 4:
109 DRAW_FASTSETPIXEL4(x, y); 109 DRAW_FASTSETPIXELXY4(x, y);
110 break; 110 break;
111 } 111 }
112 } 112 }
113 return 0; 113 return 0;
114 } 114 }