23 #if !SDL_RENDER_DISABLED
36 unsigned r,
g,
b,
a, inva;
66 }
else if (x1 == x2) {
81 }
else if (
ABS(x1 - x2) ==
ABS(y1 - y2)) {
127 unsigned r,
g,
b,
a, inva;
157 }
else if (x1 == x2) {
172 }
else if (
ABS(x1 - x2) ==
ABS(y1 - y2)) {
218 unsigned r,
g,
b,
a, inva;
248 }
else if (x1 == x2) {
263 }
else if (
ABS(x1 - x2) ==
ABS(y1 - y2)) {
310 unsigned r,
g,
b,
a, inva;
340 }
else if (x1 == x2) {
355 }
else if (
ABS(x1 - x2) ==
ABS(y1 - y2)) {
402 unsigned r,
g,
b,
a, inva;
432 }
else if (x1 == x2) {
447 }
else if (
ABS(x1 - x2) ==
ABS(y1 - y2)) {
493 unsigned r,
g,
b,
a, inva;
523 }
else if (x1 == x2) {
538 }
else if (
ABS(x1 - x2) ==
ABS(y1 - y2)) {
584 unsigned r,
g,
b,
a, inva;
614 }
else if (x1 == x2) {
629 }
else if (
ABS(x1 - x2) ==
ABS(y1 - y2)) {
681 if (fmt->
Rmask == 0x7C00) {
683 }
else if (fmt->
Rmask == 0xF800) {
690 if (fmt->
Rmask == 0x00FF0000) {
714 return SDL_SetError(
"SDL_BlendLine(): Passed NULL destination surface");
719 return SDL_SetError(
"SDL_BlendLine(): Unsupported surface format");
728 func(dst, x1, y1, x2, y2, blendMode, r, g, b, a,
SDL_TRUE);
743 return SDL_SetError(
"SDL_BlendLines(): Passed NULL destination surface");
748 return SDL_SetError(
"SDL_BlendLines(): Unsupported surface format");
751 for (i = 1; i <
count; ++
i) {
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) {
770 blendMode, r, g, b, a);
#define DRAW_SETPIXELXY2_RGB(x, y)
#define DRAW_SETPIXELXY4_MOD_RGB(x, y)
#define DRAW_SETPIXEL_BLEND_ARGB8888
DECLSPEC SDL_bool SDLCALL SDL_IntersectRectAndLine(const SDL_Rect *rect, int *X1, int *Y1, int *X2, int *Y2)
Calculate the intersection of a rectangle and line segment.
#define DRAW_SETPIXEL_MOD_ARGB8888
#define DRAW_SETPIXELXY_RGB565(x, y)
void(* BlendLineFunc)(SDL_Surface *dst, int x1, int y1, int x2, int y2, SDL_BlendMode blendMode, Uint8 r, Uint8 g, Uint8 b, Uint8 a, SDL_bool draw_end)
#define DRAW_SETPIXELXY_ADD_RGB888(x, y)
GLvoid **typedef void(GLAPIENTRY *PFNGLGETVERTEXATTRIBDVPROC)(GLuint
static BlendLineFunc SDL_CalculateBlendLineFunc(const SDL_PixelFormat *fmt)
SDL_BlendMode
The blend mode used in SDL_RenderCopy() and drawing operations.
#define DRAW_SETPIXEL_MOD_RGB565
#define DRAW_SETPIXEL_RGBA
static void SDL_BlendLine_RGBA4(SDL_Surface *dst, int x1, int y1, int x2, int y2, SDL_BlendMode blendMode, Uint8 _r, Uint8 _g, Uint8 _b, Uint8 _a, SDL_bool draw_end)
#define DRAW_SETPIXELXY4_RGBA(x, y)
#define DRAW_SETPIXEL_ADD_RGB565
#define DRAW_SETPIXELXY2_BLEND_RGB(x, y)
#define VLINE(type, op, draw_end)
The structure that defines a point.
#define DRAW_SETPIXEL_MOD_RGB
A collection of pixels used in software blitting.
static void SDL_BlendLine_RGB555(SDL_Surface *dst, int x1, int y1, int x2, int y2, SDL_BlendMode blendMode, Uint8 _r, Uint8 _g, Uint8 _b, Uint8 _a, SDL_bool draw_end)
#define DRAW_SETPIXELXY4_ADD_RGBA(x, y)
#define DRAW_SETPIXEL_ADD_RGB888
GLboolean GLboolean GLboolean GLboolean a
#define DRAW_SETPIXELXY_MOD_ARGB8888(x, y)
#define DLINE(type, op, draw_end)
#define HLINE(type, op, draw_end)
#define DRAW_SETPIXELXY4_MOD_RGBA(x, y)
GLuint GLfloat GLfloat GLfloat GLfloat y1
GLfixed GLfixed GLfixed y2
#define DRAW_SETPIXEL_BLEND_RGB888
static void SDL_BlendLine_RGB4(SDL_Surface *dst, int x1, int y1, int x2, int y2, SDL_BlendMode blendMode, Uint8 _r, Uint8 _g, Uint8 _b, Uint8 _a, SDL_bool draw_end)
#define DRAW_SETPIXEL_RGB
uint32_t Uint32
An unsigned 32-bit integer type.
#define DRAW_SETPIXEL_BLEND_RGB555
#define DRAW_SETPIXEL_ADD_RGB555
static void SDL_BlendLine_RGB888(SDL_Surface *dst, int x1, int y1, int x2, int y2, SDL_BlendMode blendMode, Uint8 _r, Uint8 _g, Uint8 _b, Uint8 _a, SDL_bool draw_end)
int SDL_BlendLine(SDL_Surface *dst, int x1, int y1, int x2, int y2, SDL_BlendMode blendMode, Uint8 r, Uint8 g, Uint8 b, Uint8 a)
#define DRAW_SETPIXELXY_BLEND_RGB888(x, y)
#define DRAW_SETPIXELXY_BLEND_RGB555(x, y)
#define DRAW_SETPIXELXY_ARGB8888(x, y)
#define DRAW_SETPIXELXY_MOD_RGB555(x, y)
DECLSPEC int SDLCALL SDL_SetError(const char *fmt,...)
int SDL_BlendLines(SDL_Surface *dst, const SDL_Point *points, int count, SDL_BlendMode blendMode, Uint8 r, Uint8 g, Uint8 b, Uint8 a)
#define DRAW_SETPIXEL_ARGB8888
#define DRAW_SETPIXELXY4_BLEND_RGB(x, y)
#define DRAW_SETPIXEL_RGB888
#define DRAW_SETPIXELXY_ADD_RGB555(x, y)
GLuint GLfloat GLfloat GLfloat x1
EGLSurface EGLint EGLint y
#define DRAW_SETPIXEL_ADD_RGB
#define DRAW_SETPIXEL_BLEND_RGB565
static void SDL_BlendLine_ARGB8888(SDL_Surface *dst, int x1, int y1, int x2, int y2, SDL_BlendMode blendMode, Uint8 _r, Uint8 _g, Uint8 _b, Uint8 _a, SDL_bool draw_end)
static void SDL_BlendLine_RGB2(SDL_Surface *dst, int x1, int y1, int x2, int y2, SDL_BlendMode blendMode, Uint8 _r, Uint8 _g, Uint8 _b, Uint8 _a, SDL_bool draw_end)
#define AALINE(x1, y1, x2, y2, opaque_op, blend_op, draw_end)
#define DRAW_SETPIXELXY_MOD_RGB888(x, y)
#define DRAW_SETPIXEL_RGB565
uint8_t Uint8
An unsigned 8-bit integer type.
#define DRAW_SETPIXEL_BLEND_RGB
#define DRAW_SETPIXELXY_MOD_RGB565(x, y)
int SDL_BlendPoint(SDL_Surface *dst, int x, int y, SDL_BlendMode blendMode, Uint8 r, Uint8 g, Uint8 b, Uint8 a)
GLdouble GLdouble GLdouble r
#define DRAW_SETPIXEL_MOD_RGB555
#define DRAW_SETPIXEL_RGB555
GLdouble GLdouble GLdouble b
#define DRAW_SETPIXEL_ADD_RGBA
static void SDL_BlendLine_RGB565(SDL_Surface *dst, int x1, int y1, int x2, int y2, SDL_BlendMode blendMode, Uint8 _r, Uint8 _g, Uint8 _b, Uint8 _a, SDL_bool draw_end)
uint16_t Uint16
An unsigned 16-bit integer type.
#define DRAW_SETPIXELXY2_ADD_RGB(x, y)
GLuint GLdouble GLdouble GLint GLint const GLdouble * points
#define DRAW_SETPIXELXY_RGB555(x, y)
#define DRAW_SETPIXELXY_BLEND_RGB565(x, y)
#define DRAW_SETPIXELXY4_ADD_RGB(x, y)
#define DRAW_SETPIXELXY_RGB888(x, y)
#define DRAW_SETPIXELXY4_BLEND_RGBA(x, y)
#define DRAW_SETPIXELXY_BLEND_ARGB8888(x, y)
#define DRAW_SETPIXELXY_ADD_ARGB8888(x, y)
#define DRAW_SETPIXELXY4_RGB(x, y)
#define DRAW_SETPIXEL_ADD_ARGB8888
#define DRAW_SETPIXEL_MOD_RGBA
#define DRAW_SETPIXEL_MOD_RGB888
#define DRAW_SETPIXEL_BLEND_RGBA
#define DRAW_SETPIXELXY_ADD_RGB565(x, y)
#define DRAW_SETPIXELXY2_MOD_RGB(x, y)