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 806 of file SDL_blendline.c.
812 return SDL_SetError(
"SDL_BlendLine(): Passed NULL destination surface");
817 return SDL_SetError(
"SDL_BlendLine(): Unsupported surface format");
826 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 664 of file SDL_blendline.c.
668 unsigned r,
g,
b,
a, inva;
701 }
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_SETPIXEL_MUL_ARGB8888, DRAW_SETPIXELXY_ADD_ARGB8888, DRAW_SETPIXELXY_ARGB8888, DRAW_SETPIXELXY_BLEND_ARGB8888, DRAW_SETPIXELXY_MOD_ARGB8888, DRAW_SETPIXELXY_MUL_ARGB8888, HLINE, SDL_BLENDMODE_ADD, SDL_BLENDMODE_BLEND, SDL_BLENDMODE_MOD, SDL_BLENDMODE_MUL, 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;
69 }
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_MUL_RGB, DRAW_SETPIXEL_RGB, DRAW_SETPIXELXY2_ADD_RGB, DRAW_SETPIXELXY2_BLEND_RGB, DRAW_SETPIXELXY2_MOD_RGB, DRAW_SETPIXELXY2_MUL_RGB, DRAW_SETPIXELXY2_RGB, SDL_PixelFormat::format, HLINE, SDL_BLENDMODE_ADD, SDL_BLENDMODE_BLEND, SDL_BLENDMODE_MOD, SDL_BLENDMODE_MUL, 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 347 of file SDL_blendline.c.
352 unsigned r,
g,
b,
a, inva;
385 }
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_MUL_RGB, DRAW_SETPIXEL_RGB, DRAW_SETPIXELXY4_ADD_RGB, DRAW_SETPIXELXY4_BLEND_RGB, DRAW_SETPIXELXY4_MOD_RGB, DRAW_SETPIXELXY4_MUL_RGB, DRAW_SETPIXELXY4_RGB, SDL_PixelFormat::format, HLINE, SDL_BLENDMODE_ADD, SDL_BLENDMODE_BLEND, SDL_BLENDMODE_MOD, SDL_BLENDMODE_MUL, 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 137 of file SDL_blendline.c.
141 unsigned r,
g,
b,
a, inva;
174 }
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_MUL_RGB555, DRAW_SETPIXEL_RGB555, DRAW_SETPIXELXY_ADD_RGB555, DRAW_SETPIXELXY_BLEND_RGB555, DRAW_SETPIXELXY_MOD_RGB555, DRAW_SETPIXELXY_MUL_RGB555, DRAW_SETPIXELXY_RGB555, HLINE, SDL_BLENDMODE_ADD, SDL_BLENDMODE_BLEND, SDL_BLENDMODE_MOD, SDL_BLENDMODE_MUL, 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 242 of file SDL_blendline.c.
246 unsigned r,
g,
b,
a, inva;
279 }
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_MUL_RGB565, DRAW_SETPIXEL_RGB565, DRAW_SETPIXELXY_ADD_RGB565, DRAW_SETPIXELXY_BLEND_RGB565, DRAW_SETPIXELXY_MOD_RGB565, DRAW_SETPIXELXY_MUL_RGB565, DRAW_SETPIXELXY_RGB565, HLINE, SDL_BLENDMODE_ADD, SDL_BLENDMODE_BLEND, SDL_BLENDMODE_MOD, SDL_BLENDMODE_MUL, 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 559 of file SDL_blendline.c.
563 unsigned r,
g,
b,
a, inva;
596 }
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_MUL_RGB888, DRAW_SETPIXEL_RGB888, DRAW_SETPIXELXY_ADD_RGB888, DRAW_SETPIXELXY_BLEND_RGB888, DRAW_SETPIXELXY_MOD_RGB888, DRAW_SETPIXELXY_MUL_RGB888, DRAW_SETPIXELXY_RGB888, HLINE, SDL_BLENDMODE_ADD, SDL_BLENDMODE_BLEND, SDL_BLENDMODE_MOD, SDL_BLENDMODE_MUL, 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 453 of file SDL_blendline.c.
458 unsigned r,
g,
b,
a, inva;
491 }
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_MUL_RGBA, DRAW_SETPIXEL_RGBA, DRAW_SETPIXELXY4_ADD_RGBA, DRAW_SETPIXELXY4_BLEND_RGBA, DRAW_SETPIXELXY4_MOD_RGBA, DRAW_SETPIXELXY4_MUL_RGBA, DRAW_SETPIXELXY4_RGBA, SDL_PixelFormat::format, HLINE, SDL_BLENDMODE_ADD, SDL_BLENDMODE_BLEND, SDL_BLENDMODE_MOD, SDL_BLENDMODE_MUL, and VLINE.
Referenced by SDL_CalculateBlendLineFunc().
◆ SDL_BlendLines()
Definition at line 831 of file SDL_blendline.c.
841 return SDL_SetError(
"SDL_BlendLines(): Passed NULL destination surface");
846 return SDL_SetError(
"SDL_BlendLines(): Unsupported surface format");
864 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_RunCommandQueue().
◆ SDL_CalculateBlendLineFunc()
Definition at line 775 of file SDL_blendline.c.
779 if (fmt->
Rmask == 0x7C00) {
781 }
else if (fmt->
Rmask == 0xF800) {
788 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_SETPIXELXY4_MUL_RGB(x, y)
#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)
#define DRAW_SETPIXEL_MUL_RGB555
#define DRAW_SETPIXELXY2_MUL_RGB(x, y)
#define DRAW_SETPIXELXY_MUL_RGB888(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_SETPIXELXY_MUL_ARGB8888(x, y)
#define DRAW_SETPIXELXY2_ADD_RGB(x, y)
#define DRAW_SETPIXEL_MUL_RGB565
GLdouble GLdouble GLdouble r
#define DRAW_SETPIXEL_MUL_RGB888
#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_SETPIXEL_MUL_RGB
#define DRAW_SETPIXELXY_ADD_RGB555(x, y)
#define DRAW_SETPIXELXY4_MUL_RGBA(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_MUL_RGBA
#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_MUL_RGB565(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
#define DRAW_SETPIXELXY_MUL_RGB555(x, 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)
#define DRAW_SETPIXELXY4_ADD_RGBA(x, y)
#define DRAW_SETPIXEL_MOD_RGB555
#define DRAW_SETPIXEL_ADD_RGB555
#define DRAW_SETPIXEL_MUL_ARGB8888