comparison src/video/SDL_drawline.c @ 2900:3a9636c83849

Make it possible to switch algorithms in the future
author Sam Lantinga <slouken@libsdl.org>
date Sun, 21 Dec 2008 08:59:56 +0000
parents e40448bc7727
children 133601e3b255
comparison
equal deleted inserted replaced
2899:a0c837a16e4c 2900:3a9636c83849
45 } 45 }
46 */ 46 */
47 47
48 switch (dst->format->BytesPerPixel) { 48 switch (dst->format->BytesPerPixel) {
49 case 1: 49 case 1:
50 BRESENHAM(x1, y1, x2, y2, SETPIXEL1); 50 DRAWLINE(x1, y1, x2, y2, SETPIXEL1);
51 break; 51 break;
52 case 2: 52 case 2:
53 BRESENHAM(x1, y1, x2, y2, SETPIXEL2); 53 DRAWLINE(x1, y1, x2, y2, SETPIXEL2);
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 BRESENHAM(x1, y1, x2, y2, SETPIXEL4); 59 DRAWLINE(x1, y1, x2, y2, SETPIXEL4);
60 break; 60 break;
61 } 61 }
62 return 0; 62 return 0;
63 } 63 }
64 64