Go to the source code of this file.
◆ SDL_DrawLine()
Definition at line 142 of file SDL_drawline.c.
References SDL_Surface::clip_rect, SDL_Surface::format, SDL_CalculateDrawLineFunc(), SDL_IntersectRectAndLine, SDL_SetError, and SDL_TRUE.
147 return SDL_SetError(
"SDL_DrawLine(): Passed NULL destination surface");
152 return SDL_SetError(
"SDL_DrawLine(): Unsupported surface format");
GLuint GLfloat GLfloat GLfloat x1
GLfixed GLfixed GLfixed y2
void(* DrawLineFunc)(SDL_Surface *dst, int x1, int y1, int x2, int y2, Uint32 color, SDL_bool draw_end)
static DrawLineFunc SDL_CalculateDrawLineFunc(const SDL_PixelFormat *fmt)
#define SDL_IntersectRectAndLine
◆ SDL_DrawLines()
Definition at line 166 of file SDL_drawline.c.
References SDL_Surface::clip_rect, SDL_Surface::format, i, SDL_CalculateDrawLineFunc(), SDL_DrawPoint(), SDL_IntersectRectAndLine, SDL_SetError, SDL_Point::x, and SDL_Point::y.
Referenced by SW_RenderDrawLines().
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) {
GLuint GLfloat GLfloat GLfloat x1
GLint GLint GLint GLint GLint x
GLuint GLuint GLsizei count
GLfixed GLfixed GLfixed y2
void(* DrawLineFunc)(SDL_Surface *dst, int x1, int y1, int x2, int y2, Uint32 color, SDL_bool draw_end)
GLint GLint GLint GLint GLint GLint y
return Display return Display Bool Bool int int int return Display XEvent Bool(*) XPointer return Display return Display Drawable _Xconst char unsigned int unsigned int return Display Pixmap Pixmap XColor XColor unsigned int unsigned int return Display _Xconst char char int char return Display Visual unsigned int int int char unsigned int unsigned int in i)
static DrawLineFunc SDL_CalculateDrawLineFunc(const SDL_PixelFormat *fmt)
#define SDL_IntersectRectAndLine
int SDL_DrawPoint(SDL_Surface *dst, int x, int y, Uint32 color)