Go to the source code of this file.
|
typedef 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) |
|
|
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) |
|
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) |
|
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) |
|
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) |
|
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) |
|
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) |
|
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 BlendLineFunc | SDL_CalculateBlendLineFunc (const SDL_PixelFormat *fmt) |
|
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) |
|
int | SDL_BlendLines (SDL_Surface *dst, const SDL_Point *points, int count, SDL_BlendMode blendMode, Uint8 r, Uint8 g, Uint8 b, Uint8 a) |
|
◆ BlendLineFunc
typedef 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) |
◆ SDL_BlendLine()
Definition at line 708 of file SDL_blendline.c.
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);
References blendMode, SDL_CalculateBlendLineFunc(), SDL_IntersectRectAndLine, SDL_SetError, and SDL_TRUE.
◆ SDL_BlendLine_ARGB8888()
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 |
Definition at line 580 of file SDL_blendline.c.
584 unsigned r,
g,
b,
a, inva;
614 }
else if (
x1 ==
x2) {
References AALINE, ABS, blendMode, DLINE, DRAW_MUL, DRAW_SETPIXEL_ADD_ARGB8888, DRAW_SETPIXEL_ARGB8888, DRAW_SETPIXEL_BLEND_ARGB8888, DRAW_SETPIXEL_MOD_ARGB8888, DRAW_SETPIXELXY_ADD_ARGB8888, DRAW_SETPIXELXY_ARGB8888, DRAW_SETPIXELXY_BLEND_ARGB8888, DRAW_SETPIXELXY_MOD_ARGB8888, HLINE, SDL_BLENDMODE_ADD, SDL_BLENDMODE_BLEND, SDL_BLENDMODE_MOD, and VLINE.
Referenced by SDL_CalculateBlendLineFunc().
◆ SDL_BlendLine_RGB2()
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 |
|
) |
| |
|
static |
Definition at line 31 of file SDL_blendline.c.
36 unsigned r,
g,
b,
a, inva;
66 }
else if (
x1 ==
x2) {
References AALINE, ABS, blendMode, DLINE, DRAW_MUL, DRAW_SETPIXEL_ADD_RGB, DRAW_SETPIXEL_BLEND_RGB, DRAW_SETPIXEL_MOD_RGB, DRAW_SETPIXEL_RGB, DRAW_SETPIXELXY2_ADD_RGB, DRAW_SETPIXELXY2_BLEND_RGB, DRAW_SETPIXELXY2_MOD_RGB, DRAW_SETPIXELXY2_RGB, SDL_PixelFormat::format, HLINE, SDL_BLENDMODE_ADD, SDL_BLENDMODE_BLEND, SDL_BLENDMODE_MOD, and VLINE.
Referenced by SDL_CalculateBlendLineFunc().
◆ SDL_BlendLine_RGB4()
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 |
|
) |
| |
|
static |
Definition at line 305 of file SDL_blendline.c.
310 unsigned r,
g,
b,
a, inva;
340 }
else if (
x1 ==
x2) {
References AALINE, ABS, blendMode, DLINE, DRAW_MUL, DRAW_SETPIXEL_ADD_RGB, DRAW_SETPIXEL_BLEND_RGB, DRAW_SETPIXEL_MOD_RGB, DRAW_SETPIXEL_RGB, DRAW_SETPIXELXY4_ADD_RGB, DRAW_SETPIXELXY4_BLEND_RGB, DRAW_SETPIXELXY4_MOD_RGB, DRAW_SETPIXELXY4_RGB, SDL_PixelFormat::format, HLINE, SDL_BLENDMODE_ADD, SDL_BLENDMODE_BLEND, SDL_BLENDMODE_MOD, and VLINE.
Referenced by SDL_CalculateBlendLineFunc().
◆ SDL_BlendLine_RGB555()
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 |
|
) |
| |
|
static |
Definition at line 123 of file SDL_blendline.c.
127 unsigned r,
g,
b,
a, inva;
157 }
else if (
x1 ==
x2) {
References AALINE, ABS, blendMode, DLINE, DRAW_MUL, DRAW_SETPIXEL_ADD_RGB555, DRAW_SETPIXEL_BLEND_RGB555, DRAW_SETPIXEL_MOD_RGB555, DRAW_SETPIXEL_RGB555, DRAW_SETPIXELXY_ADD_RGB555, DRAW_SETPIXELXY_BLEND_RGB555, DRAW_SETPIXELXY_MOD_RGB555, DRAW_SETPIXELXY_RGB555, HLINE, SDL_BLENDMODE_ADD, SDL_BLENDMODE_BLEND, SDL_BLENDMODE_MOD, and VLINE.
Referenced by SDL_CalculateBlendLineFunc().
◆ SDL_BlendLine_RGB565()
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 |
|
) |
| |
|
static |
Definition at line 214 of file SDL_blendline.c.
218 unsigned r,
g,
b,
a, inva;
248 }
else if (
x1 ==
x2) {
References AALINE, ABS, blendMode, DLINE, DRAW_MUL, DRAW_SETPIXEL_ADD_RGB565, DRAW_SETPIXEL_BLEND_RGB565, DRAW_SETPIXEL_MOD_RGB565, DRAW_SETPIXEL_RGB565, DRAW_SETPIXELXY_ADD_RGB565, DRAW_SETPIXELXY_BLEND_RGB565, DRAW_SETPIXELXY_MOD_RGB565, DRAW_SETPIXELXY_RGB565, HLINE, SDL_BLENDMODE_ADD, SDL_BLENDMODE_BLEND, SDL_BLENDMODE_MOD, and VLINE.
Referenced by SDL_CalculateBlendLineFunc().
◆ SDL_BlendLine_RGB888()
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 |
|
) |
| |
|
static |
Definition at line 489 of file SDL_blendline.c.
493 unsigned r,
g,
b,
a, inva;
523 }
else if (
x1 ==
x2) {
References AALINE, ABS, blendMode, DLINE, DRAW_MUL, DRAW_SETPIXEL_ADD_RGB888, DRAW_SETPIXEL_BLEND_RGB888, DRAW_SETPIXEL_MOD_RGB888, DRAW_SETPIXEL_RGB888, DRAW_SETPIXELXY_ADD_RGB888, DRAW_SETPIXELXY_BLEND_RGB888, DRAW_SETPIXELXY_MOD_RGB888, DRAW_SETPIXELXY_RGB888, HLINE, SDL_BLENDMODE_ADD, SDL_BLENDMODE_BLEND, SDL_BLENDMODE_MOD, and VLINE.
Referenced by SDL_CalculateBlendLineFunc().
◆ SDL_BlendLine_RGBA4()
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 |
|
) |
| |
|
static |
Definition at line 397 of file SDL_blendline.c.
402 unsigned r,
g,
b,
a, inva;
432 }
else if (
x1 ==
x2) {
References AALINE, ABS, blendMode, DLINE, DRAW_MUL, DRAW_SETPIXEL_ADD_RGBA, DRAW_SETPIXEL_BLEND_RGBA, DRAW_SETPIXEL_MOD_RGBA, DRAW_SETPIXEL_RGBA, DRAW_SETPIXELXY4_ADD_RGBA, DRAW_SETPIXELXY4_BLEND_RGBA, DRAW_SETPIXELXY4_MOD_RGBA, DRAW_SETPIXELXY4_RGBA, SDL_PixelFormat::format, HLINE, SDL_BLENDMODE_ADD, SDL_BLENDMODE_BLEND, SDL_BLENDMODE_MOD, and VLINE.
Referenced by SDL_CalculateBlendLineFunc().
◆ SDL_BlendLines()
Definition at line 733 of file SDL_blendline.c.
743 return SDL_SetError(
"SDL_BlendLines(): Passed NULL destination surface");
748 return SDL_SetError(
"SDL_BlendLines(): Unsupported surface format");
766 func(
dst,
x1,
y1,
x2,
y2,
blendMode,
r,
g,
b,
a, draw_end);
References blendMode, i, SDL_BlendPoint(), SDL_CalculateBlendLineFunc(), SDL_IntersectRectAndLine, and SDL_SetError.
Referenced by SW_RenderDrawLines().
◆ SDL_CalculateBlendLineFunc()
Definition at line 677 of file SDL_blendline.c.
681 if (fmt->
Rmask == 0x7C00) {
683 }
else if (fmt->
Rmask == 0xF800) {
690 if (fmt->
Rmask == 0x00FF0000) {
References SDL_PixelFormat::Amask, SDL_PixelFormat::BytesPerPixel, NULL, SDL_PixelFormat::Rmask, SDL_BlendLine_ARGB8888(), SDL_BlendLine_RGB2(), SDL_BlendLine_RGB4(), SDL_BlendLine_RGB555(), SDL_BlendLine_RGB565(), SDL_BlendLine_RGB888(), and SDL_BlendLine_RGBA4().
Referenced by SDL_BlendLine(), and SDL_BlendLines().
#define DLINE(type, op, draw_end)
GLfixed GLfixed GLint GLint GLfixed points
#define DRAW_SETPIXEL_ARGB8888
static SDL_BlendMode blendMode
#define DRAW_SETPIXELXY_ARGB8888(x, y)
#define DRAW_SETPIXEL_RGB
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)
GLboolean GLboolean GLboolean b
#define DRAW_SETPIXELXY4_BLEND_RGBA(x, y)
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)
GLuint GLuint GLsizei count
#define DRAW_SETPIXEL_BLEND_ARGB8888
#define DRAW_SETPIXEL_BLEND_RGB888
#define DRAW_SETPIXELXY4_RGB(x, y)
#define DRAW_SETPIXELXY2_ADD_RGB(x, y)
GLdouble GLdouble GLdouble r
#define DRAW_SETPIXEL_BLEND_RGB555
#define DRAW_SETPIXEL_BLEND_RGB565
#define DRAW_SETPIXELXY2_RGB(x, y)
#define DRAW_SETPIXEL_RGB555
GLuint GLfloat GLfloat GLfloat x1
GLboolean GLboolean GLboolean GLboolean a
#define DRAW_SETPIXEL_BLEND_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_SETPIXELXY_RGB888(x, y)
#define DRAW_SETPIXEL_ADD_RGB
#define DRAW_SETPIXEL_MOD_ARGB8888
#define DRAW_SETPIXELXY_ADD_RGB555(x, y)
#define DRAW_SETPIXEL_MOD_RGB888
#define DRAW_SETPIXELXY_ADD_RGB565(x, y)
#define DRAW_SETPIXELXY2_MOD_RGB(x, y)
GLint GLint GLint GLint GLint x
#define VLINE(type, op, draw_end)
#define DRAW_SETPIXELXY4_MOD_RGBA(x, y)
#define AALINE(x1, y1, x2, y2, opaque_op, blend_op, draw_end)
#define DRAW_SETPIXEL_RGB565
#define DRAW_SETPIXELXY_MOD_RGB888(x, y)
#define DRAW_SETPIXEL_ADD_RGB888
#define DRAW_SETPIXELXY4_ADD_RGB(x, y)
#define DRAW_SETPIXELXY_MOD_ARGB8888(x, y)
int SDL_BlendPoint(SDL_Surface *dst, int x, int y, SDL_BlendMode blendMode, Uint8 r, Uint8 g, Uint8 b, Uint8 a)
#define DRAW_SETPIXEL_ADD_RGB565
#define DRAW_SETPIXELXY_BLEND_ARGB8888(x, y)
#define DRAW_SETPIXEL_MOD_RGB
#define DRAW_SETPIXELXY_ADD_ARGB8888(x, y)
#define DRAW_SETPIXEL_ADD_RGBA
#define DRAW_SETPIXEL_MOD_RGB565
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_BLEND_RGB565(x, y)
#define DRAW_SETPIXELXY_RGB555(x, y)
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_BLEND_RGB
#define DRAW_SETPIXELXY4_RGBA(x, y)
#define DRAW_SETPIXELXY2_BLEND_RGB(x, y)
#define DRAW_SETPIXELXY_MOD_RGB565(x, y)
GLint GLint GLint GLint GLint GLint y
#define DRAW_SETPIXELXY4_MOD_RGB(x, y)
#define DRAW_SETPIXEL_ADD_ARGB8888
#define DRAW_SETPIXEL_MOD_RGBA
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)
#define DRAW_SETPIXELXY_MOD_RGB555(x, y)
#define DRAW_SETPIXELXY_BLEND_RGB888(x, y)
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_BLEND_RGB(x, y)
#define DRAW_SETPIXELXY_BLEND_RGB555(x, y)
#define DRAW_SETPIXEL_RGBA
GLfixed GLfixed GLfixed y2
#define DRAW_SETPIXELXY_RGB565(x, y)
static BlendLineFunc SDL_CalculateBlendLineFunc(const SDL_PixelFormat *fmt)
#define DRAW_SETPIXELXY_ADD_RGB888(x, y)
#define HLINE(type, op, draw_end)
#define SDL_IntersectRectAndLine
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 DRAW_SETPIXEL_RGB888
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)
#define DRAW_SETPIXELXY4_ADD_RGBA(x, y)
#define DRAW_SETPIXEL_MOD_RGB555
#define DRAW_SETPIXEL_ADD_RGB555