SDL  2.0
SDL_draw.h File Reference
+ Include dependency graph for SDL_draw.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define DRAW_MUL(_a, _b)   (((unsigned)(_a)*(_b))/255)
 
#define DRAW_FASTSETPIXEL(type)   *pixel = (type) color
 
#define DRAW_FASTSETPIXEL1   DRAW_FASTSETPIXEL(Uint8)
 
#define DRAW_FASTSETPIXEL2   DRAW_FASTSETPIXEL(Uint16)
 
#define DRAW_FASTSETPIXEL4   DRAW_FASTSETPIXEL(Uint32)
 
#define DRAW_FASTSETPIXELXY(x, y, type, bpp, color)
 
#define DRAW_FASTSETPIXELXY1(x, y)   DRAW_FASTSETPIXELXY(x, y, Uint8, 1, color)
 
#define DRAW_FASTSETPIXELXY2(x, y)   DRAW_FASTSETPIXELXY(x, y, Uint16, 2, color)
 
#define DRAW_FASTSETPIXELXY4(x, y)   DRAW_FASTSETPIXELXY(x, y, Uint32, 4, color)
 
#define DRAW_SETPIXEL(setpixel)
 
#define DRAW_SETPIXEL_BLEND(getpixel, setpixel)
 
#define DRAW_SETPIXEL_ADD(getpixel, setpixel)
 
#define DRAW_SETPIXEL_MOD(getpixel, setpixel)
 
#define DRAW_SETPIXEL_MUL(getpixel, setpixel)
 
#define DRAW_SETPIXELXY(x, y, type, bpp, op)
 
#define DRAW_SETPIXEL_RGB555   DRAW_SETPIXEL(RGB555_FROM_RGB(*pixel, sr, sg, sb))
 
#define DRAW_SETPIXEL_BLEND_RGB555
 
#define DRAW_SETPIXEL_ADD_RGB555
 
#define DRAW_SETPIXEL_MOD_RGB555
 
#define DRAW_SETPIXEL_MUL_RGB555
 
#define DRAW_SETPIXELXY_RGB555(x, y)   DRAW_SETPIXELXY(x, y, Uint16, 2, DRAW_SETPIXEL_RGB555)
 
#define DRAW_SETPIXELXY_BLEND_RGB555(x, y)   DRAW_SETPIXELXY(x, y, Uint16, 2, DRAW_SETPIXEL_BLEND_RGB555)
 
#define DRAW_SETPIXELXY_ADD_RGB555(x, y)   DRAW_SETPIXELXY(x, y, Uint16, 2, DRAW_SETPIXEL_ADD_RGB555)
 
#define DRAW_SETPIXELXY_MOD_RGB555(x, y)   DRAW_SETPIXELXY(x, y, Uint16, 2, DRAW_SETPIXEL_MOD_RGB555)
 
#define DRAW_SETPIXELXY_MUL_RGB555(x, y)   DRAW_SETPIXELXY(x, y, Uint16, 2, DRAW_SETPIXEL_MUL_RGB555)
 
#define DRAW_SETPIXEL_RGB565   DRAW_SETPIXEL(RGB565_FROM_RGB(*pixel, sr, sg, sb))
 
#define DRAW_SETPIXEL_BLEND_RGB565
 
#define DRAW_SETPIXEL_ADD_RGB565
 
#define DRAW_SETPIXEL_MOD_RGB565
 
#define DRAW_SETPIXEL_MUL_RGB565
 
#define DRAW_SETPIXELXY_RGB565(x, y)   DRAW_SETPIXELXY(x, y, Uint16, 2, DRAW_SETPIXEL_RGB565)
 
#define DRAW_SETPIXELXY_BLEND_RGB565(x, y)   DRAW_SETPIXELXY(x, y, Uint16, 2, DRAW_SETPIXEL_BLEND_RGB565)
 
#define DRAW_SETPIXELXY_ADD_RGB565(x, y)   DRAW_SETPIXELXY(x, y, Uint16, 2, DRAW_SETPIXEL_ADD_RGB565)
 
#define DRAW_SETPIXELXY_MOD_RGB565(x, y)   DRAW_SETPIXELXY(x, y, Uint16, 2, DRAW_SETPIXEL_MOD_RGB565)
 
#define DRAW_SETPIXELXY_MUL_RGB565(x, y)   DRAW_SETPIXELXY(x, y, Uint16, 2, DRAW_SETPIXEL_MUL_RGB565)
 
#define DRAW_SETPIXEL_RGB888   DRAW_SETPIXEL(RGB888_FROM_RGB(*pixel, sr, sg, sb))
 
#define DRAW_SETPIXEL_BLEND_RGB888
 
#define DRAW_SETPIXEL_ADD_RGB888
 
#define DRAW_SETPIXEL_MOD_RGB888
 
#define DRAW_SETPIXEL_MUL_RGB888
 
#define DRAW_SETPIXELXY_RGB888(x, y)   DRAW_SETPIXELXY(x, y, Uint32, 4, DRAW_SETPIXEL_RGB888)
 
#define DRAW_SETPIXELXY_BLEND_RGB888(x, y)   DRAW_SETPIXELXY(x, y, Uint32, 4, DRAW_SETPIXEL_BLEND_RGB888)
 
#define DRAW_SETPIXELXY_ADD_RGB888(x, y)   DRAW_SETPIXELXY(x, y, Uint32, 4, DRAW_SETPIXEL_ADD_RGB888)
 
#define DRAW_SETPIXELXY_MOD_RGB888(x, y)   DRAW_SETPIXELXY(x, y, Uint32, 4, DRAW_SETPIXEL_MOD_RGB888)
 
#define DRAW_SETPIXELXY_MUL_RGB888(x, y)   DRAW_SETPIXELXY(x, y, Uint32, 4, DRAW_SETPIXEL_MUL_RGB888)
 
#define DRAW_SETPIXEL_ARGB8888   DRAW_SETPIXEL(ARGB8888_FROM_RGBA(*pixel, sr, sg, sb, sa))
 
#define DRAW_SETPIXEL_BLEND_ARGB8888
 
#define DRAW_SETPIXEL_ADD_ARGB8888
 
#define DRAW_SETPIXEL_MOD_ARGB8888
 
#define DRAW_SETPIXEL_MUL_ARGB8888
 
#define DRAW_SETPIXELXY_ARGB8888(x, y)   DRAW_SETPIXELXY(x, y, Uint32, 4, DRAW_SETPIXEL_ARGB8888)
 
#define DRAW_SETPIXELXY_BLEND_ARGB8888(x, y)   DRAW_SETPIXELXY(x, y, Uint32, 4, DRAW_SETPIXEL_BLEND_ARGB8888)
 
#define DRAW_SETPIXELXY_ADD_ARGB8888(x, y)   DRAW_SETPIXELXY(x, y, Uint32, 4, DRAW_SETPIXEL_ADD_ARGB8888)
 
#define DRAW_SETPIXELXY_MOD_ARGB8888(x, y)   DRAW_SETPIXELXY(x, y, Uint32, 4, DRAW_SETPIXEL_MOD_ARGB8888)
 
#define DRAW_SETPIXELXY_MUL_ARGB8888(x, y)   DRAW_SETPIXELXY(x, y, Uint32, 4, DRAW_SETPIXEL_MUL_ARGB8888)
 
#define DRAW_SETPIXEL_RGB   DRAW_SETPIXEL(PIXEL_FROM_RGB(*pixel, fmt, sr, sg, sb))
 
#define DRAW_SETPIXEL_BLEND_RGB
 
#define DRAW_SETPIXEL_ADD_RGB
 
#define DRAW_SETPIXEL_MOD_RGB
 
#define DRAW_SETPIXEL_MUL_RGB
 
#define DRAW_SETPIXELXY2_RGB(x, y)   DRAW_SETPIXELXY(x, y, Uint16, 2, DRAW_SETPIXEL_RGB)
 
#define DRAW_SETPIXELXY4_RGB(x, y)   DRAW_SETPIXELXY(x, y, Uint32, 4, DRAW_SETPIXEL_RGB)
 
#define DRAW_SETPIXELXY2_BLEND_RGB(x, y)   DRAW_SETPIXELXY(x, y, Uint16, 2, DRAW_SETPIXEL_BLEND_RGB)
 
#define DRAW_SETPIXELXY4_BLEND_RGB(x, y)   DRAW_SETPIXELXY(x, y, Uint32, 4, DRAW_SETPIXEL_BLEND_RGB)
 
#define DRAW_SETPIXELXY2_ADD_RGB(x, y)   DRAW_SETPIXELXY(x, y, Uint16, 2, DRAW_SETPIXEL_ADD_RGB)
 
#define DRAW_SETPIXELXY4_ADD_RGB(x, y)   DRAW_SETPIXELXY(x, y, Uint32, 4, DRAW_SETPIXEL_ADD_RGB)
 
#define DRAW_SETPIXELXY2_MOD_RGB(x, y)   DRAW_SETPIXELXY(x, y, Uint16, 2, DRAW_SETPIXEL_MOD_RGB)
 
#define DRAW_SETPIXELXY4_MOD_RGB(x, y)   DRAW_SETPIXELXY(x, y, Uint32, 4, DRAW_SETPIXEL_MOD_RGB)
 
#define DRAW_SETPIXELXY2_MUL_RGB(x, y)   DRAW_SETPIXELXY(x, y, Uint16, 2, DRAW_SETPIXEL_MUL_RGB)
 
#define DRAW_SETPIXELXY4_MUL_RGB(x, y)   DRAW_SETPIXELXY(x, y, Uint32, 4, DRAW_SETPIXEL_MUL_RGB)
 
#define DRAW_SETPIXEL_RGBA   DRAW_SETPIXEL(PIXEL_FROM_RGBA(*pixel, fmt, sr, sg, sb, sa))
 
#define DRAW_SETPIXEL_BLEND_RGBA
 
#define DRAW_SETPIXEL_ADD_RGBA
 
#define DRAW_SETPIXEL_MOD_RGBA
 
#define DRAW_SETPIXEL_MUL_RGBA
 
#define DRAW_SETPIXELXY4_RGBA(x, y)   DRAW_SETPIXELXY(x, y, Uint32, 4, DRAW_SETPIXEL_RGBA)
 
#define DRAW_SETPIXELXY4_BLEND_RGBA(x, y)   DRAW_SETPIXELXY(x, y, Uint32, 4, DRAW_SETPIXEL_BLEND_RGBA)
 
#define DRAW_SETPIXELXY4_ADD_RGBA(x, y)   DRAW_SETPIXELXY(x, y, Uint32, 4, DRAW_SETPIXEL_ADD_RGBA)
 
#define DRAW_SETPIXELXY4_MOD_RGBA(x, y)   DRAW_SETPIXELXY(x, y, Uint32, 4, DRAW_SETPIXEL_MOD_RGBA)
 
#define DRAW_SETPIXELXY4_MUL_RGBA(x, y)   DRAW_SETPIXELXY(x, y, Uint32, 4, DRAW_SETPIXEL_MUL_RGBA)
 
#define ABS(_x)   ((_x) < 0 ? -(_x) : (_x))
 
#define HLINE(type, op, draw_end)
 
#define VLINE(type, op, draw_end)
 
#define DLINE(type, op, draw_end)
 
#define BLINE(x1, y1, x2, y2, op, draw_end)
 
#define WULINE(x1, y1, x2, y2, opaque_op, blend_op, draw_end)
 
#define AALINE(x1, y1, x2, y2, opaque_op, blend_op, draw_end)   BLINE(x1, y1, x2, y2, opaque_op, draw_end)
 
#define FILLRECT(type, op)
 

Macro Definition Documentation

◆ AALINE

#define AALINE (   x1,
  y1,
  x2,
  y2,
  opaque_op,
  blend_op,
  draw_end 
)    BLINE(x1, y1, x2, y2, opaque_op, draw_end)

Definition at line 593 of file SDL_draw.h.

◆ ABS

#define ABS (   _x)    ((_x) < 0 ? -(_x) : (_x))

Definition at line 349 of file SDL_draw.h.

◆ BLINE

#define BLINE (   x1,
  y1,
  x2,
  y2,
  op,
  draw_end 
)

Definition at line 431 of file SDL_draw.h.

◆ DLINE

#define DLINE (   type,
  op,
  draw_end 
)

Definition at line 396 of file SDL_draw.h.

◆ DRAW_FASTSETPIXEL

#define DRAW_FASTSETPIXEL (   type)    *pixel = (type) color

Definition at line 31 of file SDL_draw.h.

◆ DRAW_FASTSETPIXEL1

#define DRAW_FASTSETPIXEL1   DRAW_FASTSETPIXEL(Uint8)

Definition at line 34 of file SDL_draw.h.

◆ DRAW_FASTSETPIXEL2

#define DRAW_FASTSETPIXEL2   DRAW_FASTSETPIXEL(Uint16)

Definition at line 35 of file SDL_draw.h.

◆ DRAW_FASTSETPIXEL4

#define DRAW_FASTSETPIXEL4   DRAW_FASTSETPIXEL(Uint32)

Definition at line 36 of file SDL_draw.h.

◆ DRAW_FASTSETPIXELXY

#define DRAW_FASTSETPIXELXY (   x,
  y,
  type,
  bpp,
  color 
)
Value:
*(type *)((Uint8 *)dst->pixels + (y) * dst->pitch \
+ (x) * bpp) = (type) color

Definition at line 38 of file SDL_draw.h.

◆ DRAW_FASTSETPIXELXY1

#define DRAW_FASTSETPIXELXY1 (   x,
  y 
)    DRAW_FASTSETPIXELXY(x, y, Uint8, 1, color)

Definition at line 42 of file SDL_draw.h.

◆ DRAW_FASTSETPIXELXY2

#define DRAW_FASTSETPIXELXY2 (   x,
  y 
)    DRAW_FASTSETPIXELXY(x, y, Uint16, 2, color)

Definition at line 43 of file SDL_draw.h.

◆ DRAW_FASTSETPIXELXY4

#define DRAW_FASTSETPIXELXY4 (   x,
  y 
)    DRAW_FASTSETPIXELXY(x, y, Uint32, 4, color)

Definition at line 44 of file SDL_draw.h.

◆ DRAW_MUL

#define DRAW_MUL (   _a,
  _b 
)    (((unsigned)(_a)*(_b))/255)

Definition at line 29 of file SDL_draw.h.

◆ DRAW_SETPIXEL

#define DRAW_SETPIXEL (   setpixel)
Value:
do { \
unsigned sr = r, sg = g, sb = b, sa = a; (void) sa; \
setpixel; \
} while (0)

Definition at line 46 of file SDL_draw.h.

◆ DRAW_SETPIXEL_ADD

#define DRAW_SETPIXEL_ADD (   getpixel,
  setpixel 
)
Value:
do { \
unsigned sr, sg, sb, sa; (void) sa; \
getpixel; \
sr += r; if (sr > 0xff) sr = 0xff; \
sg += g; if (sg > 0xff) sg = 0xff; \
sb += b; if (sb > 0xff) sb = 0xff; \
setpixel; \
} while (0)

Definition at line 63 of file SDL_draw.h.

◆ DRAW_SETPIXEL_ADD_ARGB8888

#define DRAW_SETPIXEL_ADD_ARGB8888
Value:
DRAW_SETPIXEL_ADD(RGBA_FROM_ARGB8888(*pixel, sr, sg, sb, sa), \
ARGB8888_FROM_RGBA(*pixel, sr, sg, sb, sa))

Definition at line 226 of file SDL_draw.h.

◆ DRAW_SETPIXEL_ADD_RGB

#define DRAW_SETPIXEL_ADD_RGB
Value:
DRAW_SETPIXEL_ADD(RGB_FROM_PIXEL(*pixel, fmt, sr, sg, sb), \
PIXEL_FROM_RGB(*pixel, fmt, sr, sg, sb))

Definition at line 264 of file SDL_draw.h.

◆ DRAW_SETPIXEL_ADD_RGB555

#define DRAW_SETPIXEL_ADD_RGB555
Value:
DRAW_SETPIXEL_ADD(RGB_FROM_RGB555(*pixel, sr, sg, sb), \
RGB555_FROM_RGB(*pixel, sr, sg, sb))

Definition at line 112 of file SDL_draw.h.

◆ DRAW_SETPIXEL_ADD_RGB565

#define DRAW_SETPIXEL_ADD_RGB565
Value:
DRAW_SETPIXEL_ADD(RGB_FROM_RGB565(*pixel, sr, sg, sb), \
RGB565_FROM_RGB(*pixel, sr, sg, sb))

Definition at line 150 of file SDL_draw.h.

◆ DRAW_SETPIXEL_ADD_RGB888

#define DRAW_SETPIXEL_ADD_RGB888
Value:
DRAW_SETPIXEL_ADD(RGB_FROM_RGB888(*pixel, sr, sg, sb), \
RGB888_FROM_RGB(*pixel, sr, sg, sb))

Definition at line 188 of file SDL_draw.h.

◆ DRAW_SETPIXEL_ADD_RGBA

#define DRAW_SETPIXEL_ADD_RGBA
Value:
DRAW_SETPIXEL_ADD(RGBA_FROM_PIXEL(*pixel, fmt, sr, sg, sb, sa), \
PIXEL_FROM_RGBA(*pixel, fmt, sr, sg, sb, sa))

Definition at line 318 of file SDL_draw.h.

◆ DRAW_SETPIXEL_ARGB8888

#define DRAW_SETPIXEL_ARGB8888   DRAW_SETPIXEL(ARGB8888_FROM_RGBA(*pixel, sr, sg, sb, sa))

Definition at line 219 of file SDL_draw.h.

◆ DRAW_SETPIXEL_BLEND

#define DRAW_SETPIXEL_BLEND (   getpixel,
  setpixel 
)
Value:
do { \
unsigned sr, sg, sb, sa = 0xFF; \
getpixel; \
sr = DRAW_MUL(inva, sr) + r; \
sg = DRAW_MUL(inva, sg) + g; \
sb = DRAW_MUL(inva, sb) + b; \
sa = DRAW_MUL(inva, sa) + a; \
setpixel; \
} while (0)

Definition at line 52 of file SDL_draw.h.

◆ DRAW_SETPIXEL_BLEND_ARGB8888

#define DRAW_SETPIXEL_BLEND_ARGB8888
Value:
DRAW_SETPIXEL_BLEND(RGBA_FROM_ARGB8888(*pixel, sr, sg, sb, sa), \
ARGB8888_FROM_RGBA(*pixel, sr, sg, sb, sa))

Definition at line 222 of file SDL_draw.h.

◆ DRAW_SETPIXEL_BLEND_RGB

#define DRAW_SETPIXEL_BLEND_RGB
Value:
DRAW_SETPIXEL_BLEND(RGB_FROM_PIXEL(*pixel, fmt, sr, sg, sb), \
PIXEL_FROM_RGB(*pixel, fmt, sr, sg, sb))

Definition at line 260 of file SDL_draw.h.

◆ DRAW_SETPIXEL_BLEND_RGB555

#define DRAW_SETPIXEL_BLEND_RGB555
Value:
DRAW_SETPIXEL_BLEND(RGB_FROM_RGB555(*pixel, sr, sg, sb), \
RGB555_FROM_RGB(*pixel, sr, sg, sb))

Definition at line 108 of file SDL_draw.h.

◆ DRAW_SETPIXEL_BLEND_RGB565

#define DRAW_SETPIXEL_BLEND_RGB565
Value:
DRAW_SETPIXEL_BLEND(RGB_FROM_RGB565(*pixel, sr, sg, sb), \
RGB565_FROM_RGB(*pixel, sr, sg, sb))

Definition at line 146 of file SDL_draw.h.

◆ DRAW_SETPIXEL_BLEND_RGB888

#define DRAW_SETPIXEL_BLEND_RGB888
Value:
DRAW_SETPIXEL_BLEND(RGB_FROM_RGB888(*pixel, sr, sg, sb), \
RGB888_FROM_RGB(*pixel, sr, sg, sb))

Definition at line 184 of file SDL_draw.h.

◆ DRAW_SETPIXEL_BLEND_RGBA

#define DRAW_SETPIXEL_BLEND_RGBA
Value:
DRAW_SETPIXEL_BLEND(RGBA_FROM_PIXEL(*pixel, fmt, sr, sg, sb, sa), \
PIXEL_FROM_RGBA(*pixel, fmt, sr, sg, sb, sa))

Definition at line 314 of file SDL_draw.h.

◆ DRAW_SETPIXEL_MOD

#define DRAW_SETPIXEL_MOD (   getpixel,
  setpixel 
)
Value:
do { \
unsigned sr, sg, sb, sa; (void) sa; \
getpixel; \
sr = DRAW_MUL(sr, r); \
sg = DRAW_MUL(sg, g); \
sb = DRAW_MUL(sb, b); \
setpixel; \
} while (0)

Definition at line 73 of file SDL_draw.h.

◆ DRAW_SETPIXEL_MOD_ARGB8888

#define DRAW_SETPIXEL_MOD_ARGB8888
Value:
DRAW_SETPIXEL_MOD(RGBA_FROM_ARGB8888(*pixel, sr, sg, sb, sa), \
ARGB8888_FROM_RGBA(*pixel, sr, sg, sb, sa))

Definition at line 230 of file SDL_draw.h.

◆ DRAW_SETPIXEL_MOD_RGB

#define DRAW_SETPIXEL_MOD_RGB
Value:
DRAW_SETPIXEL_MOD(RGB_FROM_PIXEL(*pixel, fmt, sr, sg, sb), \
PIXEL_FROM_RGB(*pixel, fmt, sr, sg, sb))

Definition at line 268 of file SDL_draw.h.

◆ DRAW_SETPIXEL_MOD_RGB555

#define DRAW_SETPIXEL_MOD_RGB555
Value:
DRAW_SETPIXEL_MOD(RGB_FROM_RGB555(*pixel, sr, sg, sb), \
RGB555_FROM_RGB(*pixel, sr, sg, sb))

Definition at line 116 of file SDL_draw.h.

◆ DRAW_SETPIXEL_MOD_RGB565

#define DRAW_SETPIXEL_MOD_RGB565
Value:
DRAW_SETPIXEL_MOD(RGB_FROM_RGB565(*pixel, sr, sg, sb), \
RGB565_FROM_RGB(*pixel, sr, sg, sb))

Definition at line 154 of file SDL_draw.h.

◆ DRAW_SETPIXEL_MOD_RGB888

#define DRAW_SETPIXEL_MOD_RGB888
Value:
DRAW_SETPIXEL_MOD(RGB_FROM_RGB888(*pixel, sr, sg, sb), \
RGB888_FROM_RGB(*pixel, sr, sg, sb))

Definition at line 192 of file SDL_draw.h.

◆ DRAW_SETPIXEL_MOD_RGBA

#define DRAW_SETPIXEL_MOD_RGBA
Value:
DRAW_SETPIXEL_MOD(RGBA_FROM_PIXEL(*pixel, fmt, sr, sg, sb, sa), \
PIXEL_FROM_RGBA(*pixel, fmt, sr, sg, sb, sa))

Definition at line 322 of file SDL_draw.h.

◆ DRAW_SETPIXEL_MUL

#define DRAW_SETPIXEL_MUL (   getpixel,
  setpixel 
)
Value:
do { \
unsigned sr, sg, sb, sa; sa = 0xFF; \
getpixel; \
sr = DRAW_MUL(sr, r) + DRAW_MUL(inva, sr); if (sr > 0xff) sr = 0xff; \
sg = DRAW_MUL(sg, g) + DRAW_MUL(inva, sg); if (sg > 0xff) sg = 0xff; \
sb = DRAW_MUL(sb, b) + DRAW_MUL(inva, sb); if (sb > 0xff) sb = 0xff; \
sa = DRAW_MUL(sa, a) + DRAW_MUL(inva, sa); if (sa > 0xff) sa = 0xff; \
setpixel; \
} while (0)

Definition at line 83 of file SDL_draw.h.

◆ DRAW_SETPIXEL_MUL_ARGB8888

#define DRAW_SETPIXEL_MUL_ARGB8888
Value:
DRAW_SETPIXEL_MUL(RGBA_FROM_ARGB8888(*pixel, sr, sg, sb, sa), \
ARGB8888_FROM_RGBA(*pixel, sr, sg, sb, sa))

Definition at line 234 of file SDL_draw.h.

◆ DRAW_SETPIXEL_MUL_RGB

#define DRAW_SETPIXEL_MUL_RGB
Value:
DRAW_SETPIXEL_MUL(RGB_FROM_PIXEL(*pixel, fmt, sr, sg, sb), \
PIXEL_FROM_RGB(*pixel, fmt, sr, sg, sb))

Definition at line 272 of file SDL_draw.h.

◆ DRAW_SETPIXEL_MUL_RGB555

#define DRAW_SETPIXEL_MUL_RGB555
Value:
DRAW_SETPIXEL_MUL(RGB_FROM_RGB555(*pixel, sr, sg, sb), \
RGB555_FROM_RGB(*pixel, sr, sg, sb))

Definition at line 120 of file SDL_draw.h.

◆ DRAW_SETPIXEL_MUL_RGB565

#define DRAW_SETPIXEL_MUL_RGB565
Value:
DRAW_SETPIXEL_MUL(RGB_FROM_RGB565(*pixel, sr, sg, sb), \
RGB565_FROM_RGB(*pixel, sr, sg, sb))

Definition at line 158 of file SDL_draw.h.

◆ DRAW_SETPIXEL_MUL_RGB888

#define DRAW_SETPIXEL_MUL_RGB888
Value:
DRAW_SETPIXEL_MUL(RGB_FROM_RGB888(*pixel, sr, sg, sb), \
RGB888_FROM_RGB(*pixel, sr, sg, sb))

Definition at line 196 of file SDL_draw.h.

◆ DRAW_SETPIXEL_MUL_RGBA

#define DRAW_SETPIXEL_MUL_RGBA
Value:
DRAW_SETPIXEL_MUL(RGBA_FROM_PIXEL(*pixel, fmt, sr, sg, sb, sa), \
PIXEL_FROM_RGBA(*pixel, fmt, sr, sg, sb, sa))

Definition at line 326 of file SDL_draw.h.

◆ DRAW_SETPIXEL_RGB

#define DRAW_SETPIXEL_RGB   DRAW_SETPIXEL(PIXEL_FROM_RGB(*pixel, fmt, sr, sg, sb))

Definition at line 257 of file SDL_draw.h.

◆ DRAW_SETPIXEL_RGB555

#define DRAW_SETPIXEL_RGB555   DRAW_SETPIXEL(RGB555_FROM_RGB(*pixel, sr, sg, sb))

Definition at line 105 of file SDL_draw.h.

◆ DRAW_SETPIXEL_RGB565

#define DRAW_SETPIXEL_RGB565   DRAW_SETPIXEL(RGB565_FROM_RGB(*pixel, sr, sg, sb))

Definition at line 143 of file SDL_draw.h.

◆ DRAW_SETPIXEL_RGB888

#define DRAW_SETPIXEL_RGB888   DRAW_SETPIXEL(RGB888_FROM_RGB(*pixel, sr, sg, sb))

Definition at line 181 of file SDL_draw.h.

◆ DRAW_SETPIXEL_RGBA

#define DRAW_SETPIXEL_RGBA   DRAW_SETPIXEL(PIXEL_FROM_RGBA(*pixel, fmt, sr, sg, sb, sa))

Definition at line 311 of file SDL_draw.h.

◆ DRAW_SETPIXELXY

#define DRAW_SETPIXELXY (   x,
  y,
  type,
  bpp,
  op 
)
Value:
do { \
type *pixel = (type *)((Uint8 *)dst->pixels + (y) * dst->pitch \
+ (x) * bpp); \
op; \
} while (0)

Definition at line 94 of file SDL_draw.h.

◆ DRAW_SETPIXELXY2_ADD_RGB

#define DRAW_SETPIXELXY2_ADD_RGB (   x,
  y 
)    DRAW_SETPIXELXY(x, y, Uint16, 2, DRAW_SETPIXEL_ADD_RGB)

Definition at line 288 of file SDL_draw.h.

◆ DRAW_SETPIXELXY2_BLEND_RGB

#define DRAW_SETPIXELXY2_BLEND_RGB (   x,
  y 
)    DRAW_SETPIXELXY(x, y, Uint16, 2, DRAW_SETPIXEL_BLEND_RGB)

Definition at line 282 of file SDL_draw.h.

◆ DRAW_SETPIXELXY2_MOD_RGB

#define DRAW_SETPIXELXY2_MOD_RGB (   x,
  y 
)    DRAW_SETPIXELXY(x, y, Uint16, 2, DRAW_SETPIXEL_MOD_RGB)

Definition at line 294 of file SDL_draw.h.

◆ DRAW_SETPIXELXY2_MUL_RGB

#define DRAW_SETPIXELXY2_MUL_RGB (   x,
  y 
)    DRAW_SETPIXELXY(x, y, Uint16, 2, DRAW_SETPIXEL_MUL_RGB)

Definition at line 300 of file SDL_draw.h.

◆ DRAW_SETPIXELXY2_RGB

#define DRAW_SETPIXELXY2_RGB (   x,
  y 
)    DRAW_SETPIXELXY(x, y, Uint16, 2, DRAW_SETPIXEL_RGB)

Definition at line 276 of file SDL_draw.h.

◆ DRAW_SETPIXELXY4_ADD_RGB

#define DRAW_SETPIXELXY4_ADD_RGB (   x,
  y 
)    DRAW_SETPIXELXY(x, y, Uint32, 4, DRAW_SETPIXEL_ADD_RGB)

Definition at line 291 of file SDL_draw.h.

◆ DRAW_SETPIXELXY4_ADD_RGBA

#define DRAW_SETPIXELXY4_ADD_RGBA (   x,
  y 
)    DRAW_SETPIXELXY(x, y, Uint32, 4, DRAW_SETPIXEL_ADD_RGBA)

Definition at line 336 of file SDL_draw.h.

◆ DRAW_SETPIXELXY4_BLEND_RGB

#define DRAW_SETPIXELXY4_BLEND_RGB (   x,
  y 
)    DRAW_SETPIXELXY(x, y, Uint32, 4, DRAW_SETPIXEL_BLEND_RGB)

Definition at line 285 of file SDL_draw.h.

◆ DRAW_SETPIXELXY4_BLEND_RGBA

#define DRAW_SETPIXELXY4_BLEND_RGBA (   x,
  y 
)    DRAW_SETPIXELXY(x, y, Uint32, 4, DRAW_SETPIXEL_BLEND_RGBA)

Definition at line 333 of file SDL_draw.h.

◆ DRAW_SETPIXELXY4_MOD_RGB

#define DRAW_SETPIXELXY4_MOD_RGB (   x,
  y 
)    DRAW_SETPIXELXY(x, y, Uint32, 4, DRAW_SETPIXEL_MOD_RGB)

Definition at line 297 of file SDL_draw.h.

◆ DRAW_SETPIXELXY4_MOD_RGBA

#define DRAW_SETPIXELXY4_MOD_RGBA (   x,
  y 
)    DRAW_SETPIXELXY(x, y, Uint32, 4, DRAW_SETPIXEL_MOD_RGBA)

Definition at line 339 of file SDL_draw.h.

◆ DRAW_SETPIXELXY4_MUL_RGB

#define DRAW_SETPIXELXY4_MUL_RGB (   x,
  y 
)    DRAW_SETPIXELXY(x, y, Uint32, 4, DRAW_SETPIXEL_MUL_RGB)

Definition at line 303 of file SDL_draw.h.

◆ DRAW_SETPIXELXY4_MUL_RGBA

#define DRAW_SETPIXELXY4_MUL_RGBA (   x,
  y 
)    DRAW_SETPIXELXY(x, y, Uint32, 4, DRAW_SETPIXEL_MUL_RGBA)

Definition at line 342 of file SDL_draw.h.

◆ DRAW_SETPIXELXY4_RGB

#define DRAW_SETPIXELXY4_RGB (   x,
  y 
)    DRAW_SETPIXELXY(x, y, Uint32, 4, DRAW_SETPIXEL_RGB)

Definition at line 279 of file SDL_draw.h.

◆ DRAW_SETPIXELXY4_RGBA

#define DRAW_SETPIXELXY4_RGBA (   x,
  y 
)    DRAW_SETPIXELXY(x, y, Uint32, 4, DRAW_SETPIXEL_RGBA)

Definition at line 330 of file SDL_draw.h.

◆ DRAW_SETPIXELXY_ADD_ARGB8888

#define DRAW_SETPIXELXY_ADD_ARGB8888 (   x,
  y 
)    DRAW_SETPIXELXY(x, y, Uint32, 4, DRAW_SETPIXEL_ADD_ARGB8888)

Definition at line 244 of file SDL_draw.h.

◆ DRAW_SETPIXELXY_ADD_RGB555

#define DRAW_SETPIXELXY_ADD_RGB555 (   x,
  y 
)    DRAW_SETPIXELXY(x, y, Uint16, 2, DRAW_SETPIXEL_ADD_RGB555)

Definition at line 130 of file SDL_draw.h.

◆ DRAW_SETPIXELXY_ADD_RGB565

#define DRAW_SETPIXELXY_ADD_RGB565 (   x,
  y 
)    DRAW_SETPIXELXY(x, y, Uint16, 2, DRAW_SETPIXEL_ADD_RGB565)

Definition at line 168 of file SDL_draw.h.

◆ DRAW_SETPIXELXY_ADD_RGB888

#define DRAW_SETPIXELXY_ADD_RGB888 (   x,
  y 
)    DRAW_SETPIXELXY(x, y, Uint32, 4, DRAW_SETPIXEL_ADD_RGB888)

Definition at line 206 of file SDL_draw.h.

◆ DRAW_SETPIXELXY_ARGB8888

#define DRAW_SETPIXELXY_ARGB8888 (   x,
  y 
)    DRAW_SETPIXELXY(x, y, Uint32, 4, DRAW_SETPIXEL_ARGB8888)

Definition at line 238 of file SDL_draw.h.

◆ DRAW_SETPIXELXY_BLEND_ARGB8888

#define DRAW_SETPIXELXY_BLEND_ARGB8888 (   x,
  y 
)    DRAW_SETPIXELXY(x, y, Uint32, 4, DRAW_SETPIXEL_BLEND_ARGB8888)

Definition at line 241 of file SDL_draw.h.

◆ DRAW_SETPIXELXY_BLEND_RGB555

#define DRAW_SETPIXELXY_BLEND_RGB555 (   x,
  y 
)    DRAW_SETPIXELXY(x, y, Uint16, 2, DRAW_SETPIXEL_BLEND_RGB555)

Definition at line 127 of file SDL_draw.h.

◆ DRAW_SETPIXELXY_BLEND_RGB565

#define DRAW_SETPIXELXY_BLEND_RGB565 (   x,
  y 
)    DRAW_SETPIXELXY(x, y, Uint16, 2, DRAW_SETPIXEL_BLEND_RGB565)

Definition at line 165 of file SDL_draw.h.

◆ DRAW_SETPIXELXY_BLEND_RGB888

#define DRAW_SETPIXELXY_BLEND_RGB888 (   x,
  y 
)    DRAW_SETPIXELXY(x, y, Uint32, 4, DRAW_SETPIXEL_BLEND_RGB888)

Definition at line 203 of file SDL_draw.h.

◆ DRAW_SETPIXELXY_MOD_ARGB8888

#define DRAW_SETPIXELXY_MOD_ARGB8888 (   x,
  y 
)    DRAW_SETPIXELXY(x, y, Uint32, 4, DRAW_SETPIXEL_MOD_ARGB8888)

Definition at line 247 of file SDL_draw.h.

◆ DRAW_SETPIXELXY_MOD_RGB555

#define DRAW_SETPIXELXY_MOD_RGB555 (   x,
  y 
)    DRAW_SETPIXELXY(x, y, Uint16, 2, DRAW_SETPIXEL_MOD_RGB555)

Definition at line 133 of file SDL_draw.h.

◆ DRAW_SETPIXELXY_MOD_RGB565

#define DRAW_SETPIXELXY_MOD_RGB565 (   x,
  y 
)    DRAW_SETPIXELXY(x, y, Uint16, 2, DRAW_SETPIXEL_MOD_RGB565)

Definition at line 171 of file SDL_draw.h.

◆ DRAW_SETPIXELXY_MOD_RGB888

#define DRAW_SETPIXELXY_MOD_RGB888 (   x,
  y 
)    DRAW_SETPIXELXY(x, y, Uint32, 4, DRAW_SETPIXEL_MOD_RGB888)

Definition at line 209 of file SDL_draw.h.

◆ DRAW_SETPIXELXY_MUL_ARGB8888

#define DRAW_SETPIXELXY_MUL_ARGB8888 (   x,
  y 
)    DRAW_SETPIXELXY(x, y, Uint32, 4, DRAW_SETPIXEL_MUL_ARGB8888)

Definition at line 250 of file SDL_draw.h.

◆ DRAW_SETPIXELXY_MUL_RGB555

#define DRAW_SETPIXELXY_MUL_RGB555 (   x,
  y 
)    DRAW_SETPIXELXY(x, y, Uint16, 2, DRAW_SETPIXEL_MUL_RGB555)

Definition at line 136 of file SDL_draw.h.

◆ DRAW_SETPIXELXY_MUL_RGB565

#define DRAW_SETPIXELXY_MUL_RGB565 (   x,
  y 
)    DRAW_SETPIXELXY(x, y, Uint16, 2, DRAW_SETPIXEL_MUL_RGB565)

Definition at line 174 of file SDL_draw.h.

◆ DRAW_SETPIXELXY_MUL_RGB888

#define DRAW_SETPIXELXY_MUL_RGB888 (   x,
  y 
)    DRAW_SETPIXELXY(x, y, Uint32, 4, DRAW_SETPIXEL_MUL_RGB888)

Definition at line 212 of file SDL_draw.h.

◆ DRAW_SETPIXELXY_RGB555

#define DRAW_SETPIXELXY_RGB555 (   x,
  y 
)    DRAW_SETPIXELXY(x, y, Uint16, 2, DRAW_SETPIXEL_RGB555)

Definition at line 124 of file SDL_draw.h.

◆ DRAW_SETPIXELXY_RGB565

#define DRAW_SETPIXELXY_RGB565 (   x,
  y 
)    DRAW_SETPIXELXY(x, y, Uint16, 2, DRAW_SETPIXEL_RGB565)

Definition at line 162 of file SDL_draw.h.

◆ DRAW_SETPIXELXY_RGB888

#define DRAW_SETPIXELXY_RGB888 (   x,
  y 
)    DRAW_SETPIXELXY(x, y, Uint32, 4, DRAW_SETPIXEL_RGB888)

Definition at line 200 of file SDL_draw.h.

◆ FILLRECT

#define FILLRECT (   type,
  op 
)
Value:
do { \
int width = rect->w; \
int height = rect->h; \
int pitch = (dst->pitch / dst->format->BytesPerPixel); \
int skip = pitch - width; \
type *pixel = (type *)dst->pixels + rect->y * pitch + rect->x; \
while (height--) { \
{ int n = (width+3)/4; \
switch (width & 3) { \
case 0: do { op; pixel++; /* fallthrough */ \
case 3: op; pixel++; /* fallthrough */ \
case 2: op; pixel++; /* fallthrough */ \
case 1: op; pixel++; /* fallthrough */ \
} while ( --n > 0 ); \
} \
} \
pixel += skip; \
} \
} while (0)

Definition at line 601 of file SDL_draw.h.

◆ HLINE

#define HLINE (   type,
  op,
  draw_end 
)
Value:
{ \
int length; \
int pitch = (dst->pitch / dst->format->BytesPerPixel); \
type *pixel; \
if (x1 <= x2) { \
pixel = (type *)dst->pixels + y1 * pitch + x1; \
length = draw_end ? (x2-x1+1) : (x2-x1); \
} else { \
pixel = (type *)dst->pixels + y1 * pitch + x2; \
if (!draw_end) { \
++pixel; \
} \
length = draw_end ? (x1-x2+1) : (x1-x2); \
} \
while (length--) { \
op; \
++pixel; \
} \
}

Definition at line 352 of file SDL_draw.h.

◆ VLINE

#define VLINE (   type,
  op,
  draw_end 
)
Value:
{ \
int length; \
int pitch = (dst->pitch / dst->format->BytesPerPixel); \
type *pixel; \
if (y1 <= y2) { \
pixel = (type *)dst->pixels + y1 * pitch + x1; \
length = draw_end ? (y2-y1+1) : (y2-y1); \
} else { \
pixel = (type *)dst->pixels + y2 * pitch + x1; \
if (!draw_end) { \
pixel += pitch; \
} \
length = draw_end ? (y1-y2+1) : (y1-y2); \
} \
while (length--) { \
op; \
pixel += pitch; \
} \
}

Definition at line 374 of file SDL_draw.h.

◆ WULINE

#define WULINE (   x1,
  y1,
  x2,
  y2,
  opaque_op,
  blend_op,
  draw_end 
)

Definition at line 491 of file SDL_draw.h.

RGB_FROM_RGB555
#define RGB_FROM_RGB555(Pixel, r, g, b)
Definition: SDL_blit.h:135
if
set set set set set set set macro pixldst1 abits if abits op else op endif endm macro pixldst2 abits if abits op else op endif endm macro pixldst4 abits if abits op else op endif endm macro pixldst0 abits op endm macro pixldst3 mem_operand op endm macro pixldst30 mem_operand op endm macro pixldst abits if abits elseif abits elseif abits elseif abits elseif abits pixldst0 abits else pixldst0 abits pixldst0 abits pixldst0 abits pixldst0 abits endif elseif abits else pixldst0 abits pixldst0 abits endif elseif abits else error unsupported bpp *numpix else pixst endif endm macro pixld1_s mem_operand if asr adds SRC_WIDTH_FIXED bpl add asl mov asr adds SRC_WIDTH_FIXED bpl add asl mov asr adds SRC_WIDTH_FIXED bpl add asl mov asr adds SRC_WIDTH_FIXED bpl add asl elseif asr adds SRC_WIDTH_FIXED bpl add asl mov asr adds SRC_WIDTH_FIXED bpl add asl else error unsupported endif endm macro pixld2_s mem_operand if mov asr add asl add asl mov asr sub UNIT_X add asl mov asr add asl add asl mov asr add UNIT_X add asl else pixld1_s mem_operand pixld1_s mem_operand endif endm macro pixld0_s mem_operand if asr adds SRC_WIDTH_FIXED bpl add asl elseif asr adds SRC_WIDTH_FIXED bpl add asl endif endm macro pixld_s_internal mem_operand if mem_operand pixld2_s mem_operand pixdeinterleave basereg elseif mem_operand elseif mem_operand elseif mem_operand elseif mem_operand pixld0_s mem_operand else pixld0_s mem_operand pixld0_s mem_operand pixld0_s mem_operand pixld0_s mem_operand endif elseif mem_operand else pixld0_s mem_operand pixld0_s mem_operand endif elseif mem_operand else error unsupported mem_operand if bpp mem_operand endif endm macro vuzp8 reg2 vuzp d d &reg2 endm macro vzip8 reg2 vzip d d &reg2 endm macro pixdeinterleave basereg basereg basereg basereg basereg endif endm macro pixinterleave basereg basereg basereg basereg basereg endif endm macro PF boost_increment endif if endif PF tst PF addne PF subne PF cmp ORIG_W if endif if endif if endif PF subge ORIG_W PF subges if endif if endif if endif endif endm macro cache_preload_simple endif if dst_r_bpp pld[DST_R, #(PREFETCH_DISTANCE_SIMPLE *dst_r_bpp/8)] endif if mask_bpp pld if[MASK, #(PREFETCH_DISTANCE_SIMPLE *mask_bpp/8)] endif endif endm macro fetch_mask_pixblock pixld mask_basereg pixblock_size MASK endm macro ensure_destination_ptr_alignment process_pixblock_tail_head if beq irp skip1(dst_w_bpp<=(lowbit *8)) &&((lowbit *8)<(pixblock_size *dst_w_bpp)) .if lowbit< 16 tst DST_R
Definition: pixman-arm-neon-asm.h:469
PIXEL_FROM_RGBA
#define PIXEL_FROM_RGBA(Pixel, fmt, r, g, b, a)
Definition: SDL_blit.h:396
op
set set set set set set set macro pixldst1 op
Definition: pixman-arm-neon-asm.h:76
b
GLboolean GLboolean GLboolean b
Definition: SDL_opengl_glext.h:1112
width
GLint GLint GLsizei width
Definition: SDL_opengl.h:1572
g
GLboolean GLboolean g
Definition: SDL_opengl_glext.h:1112
RGB888_FROM_RGB
#define RGB888_FROM_RGB(Pixel, r, g, b)
Definition: SDL_blit.h:234
r
GLdouble GLdouble GLdouble r
Definition: SDL_opengl.h:2079
x1
GLuint GLfloat GLfloat GLfloat x1
Definition: SDL_opengl_glext.h:8586
a
GLboolean GLboolean GLboolean GLboolean a
Definition: SDL_opengl_glext.h:1112
length
GLuint GLsizei GLsizei * length
Definition: SDL_opengl_glext.h:672
SDL_Rect::x
int x
Definition: SDL_rect.h:79
SDL_Rect::w
int w
Definition: SDL_rect.h:80
n
GLdouble n
Definition: SDL_opengl_glext.h:1955
dst
GLenum GLenum dst
Definition: SDL_opengl_glext.h:1740
DRAW_SETPIXEL_ADD
#define DRAW_SETPIXEL_ADD(getpixel, setpixel)
Definition: SDL_draw.h:63
x
GLint GLint GLint GLint GLint x
Definition: SDL_opengl.h:1574
color
GLuint color
Definition: SDL_opengl_glext.h:1151
SDL_Rect::y
int y
Definition: SDL_rect.h:79
SDL_Rect::h
int h
Definition: SDL_rect.h:80
height
GLint GLint GLsizei GLsizei height
Definition: SDL_opengl.h:1572
rect
SDL_Rect rect
Definition: testrelative.c:27
RGB565_FROM_RGB
#define RGB565_FROM_RGB(Pixel, r, g, b)
Definition: SDL_blit.h:226
RGB555_FROM_RGB
#define RGB555_FROM_RGB(Pixel, r, g, b)
Definition: SDL_blit.h:230
DRAW_MUL
#define DRAW_MUL(_a, _b)
Definition: SDL_draw.h:29
y
GLint GLint GLint GLint GLint GLint y
Definition: SDL_opengl.h:1574
bpp
set set set set set set set macro pixldst1 abits if abits op else op endif endm macro pixldst2 abits if abits op else op endif endm macro pixldst4 abits if abits op else op endif endm macro pixldst0 abits op endm macro pixldst3 mem_operand op endm macro pixldst30 mem_operand op endm macro pixldst abits if abits elseif abits elseif abits elseif abits elseif abits pixldst0 abits else pixldst0 abits pixldst0 abits pixldst0 abits pixldst0 abits endif elseif abits else pixldst0 abits pixldst0 abits endif elseif abits else error unsupported bpp
Definition: pixman-arm-neon-asm.h:146
RGB_FROM_RGB565
#define RGB_FROM_RGB565(Pixel, r, g, b)
Definition: SDL_blit.h:129
DRAW_SETPIXEL_BLEND
#define DRAW_SETPIXEL_BLEND(getpixel, setpixel)
Definition: SDL_draw.h:52
x2
GLfixed GLfixed x2
Definition: SDL_opengl_glext.h:4586
PIXEL_FROM_RGB
#define PIXEL_FROM_RGB(Pixel, fmt, r, g, b)
Definition: SDL_blit.h:219
ARGB8888_FROM_RGBA
#define ARGB8888_FROM_RGBA(Pixel, r, g, b, a)
Definition: SDL_blit.h:238
y1
GLfixed y1
Definition: SDL_opengl_glext.h:4586
DRAW_SETPIXEL_MOD
#define DRAW_SETPIXEL_MOD(getpixel, setpixel)
Definition: SDL_draw.h:73
RGB_FROM_RGB888
#define RGB_FROM_RGB888(Pixel, r, g, b)
Definition: SDL_blit.h:141
y2
GLfixed GLfixed GLfixed y2
Definition: SDL_opengl_glext.h:4586
DRAW_SETPIXEL_MUL
#define DRAW_SETPIXEL_MUL(getpixel, setpixel)
Definition: SDL_draw.h:83
RGB_FROM_PIXEL
#define RGB_FROM_PIXEL(Pixel, fmt, r, g, b)
Definition: SDL_blit.h:123
void
const SDL_PRINTF_FORMAT_STRING char int const SDL_PRINTF_FORMAT_STRING char int const SDL_PRINTF_FORMAT_STRING char int const SDL_PRINTF_FORMAT_STRING char const char const SDL_SCANF_FORMAT_STRING char return SDL_ThreadFunction const char void return Uint32 return Uint32 void
Definition: SDL_dynapi_procs.h:89
type
GLuint GLuint GLsizei GLenum type
Definition: SDL_opengl.h:1571
RGBA_FROM_PIXEL
#define RGBA_FROM_PIXEL(Pixel, fmt, r, g, b, a)
Definition: SDL_blit.h:305
RGBA_FROM_ARGB8888
#define RGBA_FROM_ARGB8888(Pixel, r, g, b, a)
Definition: SDL_blit.h:326
Uint8
uint8_t Uint8
Definition: SDL_stdinc.h:179