ResidualVM logo ResidualVM website - Forums - Contact us BuildBot - Doxygen - Wiki curved edge

VectorRendererSpec.cpp File Reference

#include "common/util.h"
#include "common/system.h"
#include "common/frac.h"
#include "graphics/surface.h"
#include "graphics/transparent_surface.h"
#include "graphics/nine_patch.h"
#include "graphics/colormasks.h"
#include "gui/ThemeEngine.h"
#include "graphics/VectorRenderer.h"
#include "graphics/VectorRendererSpec.h"
Include dependency graph for VectorRendererSpec.cpp:

Go to the source code of this file.

Namespaces

namespace  Graphics

Defines

#define VECTOR_RENDERER_FAST_TRIANGLES
#define BE_ALGORITHM()
#define BE_DRAWCIRCLE_TOP(ptr1, ptr2, x, y, px, py)
#define BE_DRAWCIRCLE_BOTTOM(ptr3, ptr4, x, y, px, py)
#define BE_DRAWCIRCLE(ptr1, ptr2, ptr3, ptr4, x, y, px, py)
#define BE_DRAWCIRCLE_TOP_CLIP(ptr1, ptr2, x, y, px, py, realX1, realY1, realX2, realY2)
#define BE_DRAWCIRCLE_BOTTOM_CLIP(ptr3, ptr4, x, y, px, py, realX3, realY3, realX4, realY4)
#define BE_DRAWCIRCLE_CLIP(ptr1, ptr2, ptr3, ptr4, x, y, px, py, realX1, realY1, realX2, realY2, realX3, realY3, realX4, realY4)
#define BE_DRAWCIRCLE_BCOLOR(ptr1, ptr2, ptr3, ptr4, x, y, px, py)
#define BE_DRAWCIRCLE_BCOLOR_CLIP(ptr1, ptr2, ptr3, ptr4, x, y, px, py, realX1, realY1, realX2, realY2, realX3, realY3, realX4, realY4)
#define BE_DRAWCIRCLE_BCOLOR_TR_CW(ptr, x, y, px, py, a)
#define BE_DRAWCIRCLE_BCOLOR_TR_CCW(ptr, x, y, px, py, a)
#define BE_DRAWCIRCLE_BCOLOR_TR_CW_CLIP(ptr, x, y, px, py, a, realX, realY)
#define BE_DRAWCIRCLE_BCOLOR_TR_CCW_CLIP(ptr, x, y, px, py, a, realX, realY)
#define BE_DRAWCIRCLE_BCOLOR_TL_CW(ptr, x, y, px, py, a)
#define BE_DRAWCIRCLE_BCOLOR_TL_CCW(ptr, x, y, px, py, a)
#define BE_DRAWCIRCLE_BCOLOR_TL_CW_CLIP(ptr, x, y, px, py, a, realX, realY)
#define BE_DRAWCIRCLE_BCOLOR_TL_CCW_CLIP(ptr, x, y, px, py, a, realX, realY)
#define BE_DRAWCIRCLE_BCOLOR_BL_CW(ptr, x, y, px, py, a)
#define BE_DRAWCIRCLE_BCOLOR_BL_CCW(ptr, x, y, px, py, a)
#define BE_DRAWCIRCLE_BCOLOR_BL_CW_CLIP(ptr, x, y, px, py, a, realX, realY)
#define BE_DRAWCIRCLE_BCOLOR_BL_CCW_CLIP(ptr, x, y, px, py, a, realX, realY)
#define BE_DRAWCIRCLE_BCOLOR_BR_CW(ptr, x, y, px, py, a)
#define BE_DRAWCIRCLE_BCOLOR_BR_CCW(ptr, x, y, px, py, a)
#define BE_DRAWCIRCLE_BCOLOR_BR_CW_CLIP(ptr, x, y, px, py, a, realX, realY)
#define BE_DRAWCIRCLE_BCOLOR_BR_CCW_CLIP(ptr, x, y, px, py, a, realX, realY)
#define BE_DRAWCIRCLE_XCOLOR_TOP(ptr1, ptr2, x, y, px, py)
#define BE_DRAWCIRCLE_XCOLOR_BOTTOM(ptr3, ptr4, x, y, px, py)
#define BE_DRAWCIRCLE_XCOLOR(ptr1, ptr2, ptr3, ptr4, x, y, px, py)
#define IS_IN_CLIP(x, y)
#define BE_DRAWCIRCLE_XCOLOR_TOP_CLIP(ptr1, ptr2, x, y, px, py, realX1, realY1, realX2, realY2)
#define BE_DRAWCIRCLE_XCOLOR_BOTTOM_CLIP(ptr3, ptr4, x, y, px, py, realX3, realY3, realX4, realY4)
#define BE_DRAWCIRCLE_XCOLOR_CLIP(ptr1, ptr2, ptr3, ptr4, x, y, px, py, realX1, realY1, realX2, realY2, realX3, realY3, realX4, realY4)
#define BE_RESET()
#define TRIANGLE_MAINX()
#define TRIANGLE_MAINY()
#define WU_DRAWCIRCLE_TOP(ptr1, ptr2, x, y, px, py, a)
 HELPER MACROS for WU's circle drawing algorithm.
#define WU_DRAWCIRCLE_BOTTOM(ptr3, ptr4, x, y, px, py, a)
#define WU_DRAWCIRCLE(ptr1, ptr2, ptr3, ptr4, x, y, px, py, a)
#define WU_DRAWCIRCLE_XCOLOR_TOP(ptr1, ptr2, x, y, px, py, a, func)
#define WU_DRAWCIRCLE_XCOLOR_BOTTOM(ptr3, ptr4, x, y, px, py, a, func)
#define WU_DRAWCIRCLE_XCOLOR(ptr1, ptr2, ptr3, ptr4, x, y, px, py, a, func)
#define WU_DRAWCIRCLE_BCOLOR(ptr1, ptr2, ptr3, ptr4, x, y, px, py, a)
#define WU_DRAWCIRCLE_BCOLOR_TR_CW(ptr, x, y, px, py, a)
#define WU_DRAWCIRCLE_BCOLOR_TR_CCW(ptr, x, y, px, py, a)
#define WU_DRAWCIRCLE_BCOLOR_TL_CW(ptr, x, y, px, py, a)
#define WU_DRAWCIRCLE_BCOLOR_TL_CCW(ptr, x, y, px, py, a)
#define WU_DRAWCIRCLE_BCOLOR_BL_CW(ptr, x, y, px, py, a)
#define WU_DRAWCIRCLE_BCOLOR_BL_CCW(ptr, x, y, px, py, a)
#define WU_DRAWCIRCLE_BCOLOR_BR_CW(ptr, x, y, px, py, a)
#define WU_DRAWCIRCLE_BCOLOR_BR_CCW(ptr, x, y, px, py, a)
#define WU_ALGORITHM()
#define FIXED_POINT   1
 VERTICAL TRIANGLE DRAWING ALGORITHM.
#define ipart(x)   ((x) & ~0xFF)
#define rfpart(x)   ((0x100 - ((x) & 0xFF)) * 100 >> 8)

Functions

frac_t fp_sqroot (uint32 x)
 Fixed point SQUARE ROOT.
template<typename PixelType >
void Graphics::colorFill (PixelType *first, PixelType *last, PixelType color)
 Fills several pixels in a row with a given color.
template<typename PixelType >
void Graphics::colorFillClip (PixelType *first, PixelType *last, PixelType color, int realX, int realY, Common::Rect &clippingArea)
VectorRenderer * Graphics::createRenderer (int mode)

Define Documentation

#define BE_ALGORITHM (  ) 
Value:
do { \
    if (f >= 0) { \
        y--; \
        ddF_y += 2; \
        f += ddF_y; \
        py -= pitch; \
    } \
    px += pitch; \
    ddF_x += 2; \
    f += ddF_x + 1; \
} while(0)

Definition at line 82 of file VectorRendererSpec.cpp.

#define BE_DRAWCIRCLE (   ptr1,
  ptr2,
  ptr3,
  ptr4,
  x,
  y,
  px,
  py 
)
Value:
do { \
    BE_DRAWCIRCLE_TOP(ptr1,ptr2,x,y,px,py); \
    BE_DRAWCIRCLE_BOTTOM(ptr3,ptr4,x,y,px,py); \
} while (0)

Definition at line 108 of file VectorRendererSpec.cpp.

#define BE_DRAWCIRCLE_BCOLOR (   ptr1,
  ptr2,
  ptr3,
  ptr4,
  x,
  y,
  px,
  py 
)
Value:
do { \
    *(ptr1 + (y) - (px)) = color1; \
    *(ptr1 + (x) - (py)) = color1; \
    *(ptr2 - (x) - (py)) = color1; \
    *(ptr2 - (y) - (px)) = color1; \
    *(ptr3 - (y) + (px)) = color1; \
    *(ptr3 - (x) + (py)) = color1; \
    *(ptr4 + (x) + (py)) = color2; \
    *(ptr4 + (y) + (px)) = color2; \
} while (0)

Definition at line 140 of file VectorRendererSpec.cpp.

#define BE_DRAWCIRCLE_BCOLOR_BL_CCW (   ptr,
  x,
  y,
  px,
  py,
  a 
)
Value:
do { \
    this->blendPixelPtr(ptr - (x) + (py), color, a); \
} while (0)

Definition at line 210 of file VectorRendererSpec.cpp.

#define BE_DRAWCIRCLE_BCOLOR_BL_CCW_CLIP (   ptr,
  x,
  y,
  px,
  py,
  a,
  realX,
  realY 
)
Value:
do { \
    if (IS_IN_CLIP((realX) - (x), (realY) + (y))) \
        this->blendPixelPtr(ptr - (x) + (py), color, a); \
} while (0)

Definition at line 219 of file VectorRendererSpec.cpp.

#define BE_DRAWCIRCLE_BCOLOR_BL_CW (   ptr,
  x,
  y,
  px,
  py,
  a 
)
Value:
do { \
    this->blendPixelPtr(ptr - (y) + (px), color, a); \
} while (0)

Definition at line 206 of file VectorRendererSpec.cpp.

#define BE_DRAWCIRCLE_BCOLOR_BL_CW_CLIP (   ptr,
  x,
  y,
  px,
  py,
  a,
  realX,
  realY 
)
Value:
do { \
    if (IS_IN_CLIP((realX) - (y), (realY) + (x))) \
        this->blendPixelPtr(ptr - (y) + (px), color, a); \
} while (0)

Definition at line 214 of file VectorRendererSpec.cpp.

#define BE_DRAWCIRCLE_BCOLOR_BR_CCW (   ptr,
  x,
  y,
  px,
  py,
  a 
)
Value:
do { \
    this->blendPixelPtr(ptr + (y) + (px), color, a); \
} while (0)

Definition at line 228 of file VectorRendererSpec.cpp.

#define BE_DRAWCIRCLE_BCOLOR_BR_CCW_CLIP (   ptr,
  x,
  y,
  px,
  py,
  a,
  realX,
  realY 
)
Value:
do { \
    if (IS_IN_CLIP((realX) + (y), (realY) + (x))) \
        this->blendPixelPtr(ptr + (y) + (px), color, a); \
} while (0)

Definition at line 237 of file VectorRendererSpec.cpp.

#define BE_DRAWCIRCLE_BCOLOR_BR_CW (   ptr,
  x,
  y,
  px,
  py,
  a 
)
Value:
do { \
    this->blendPixelPtr(ptr + (x) + (py), color, a); \
} while (0)

Definition at line 224 of file VectorRendererSpec.cpp.

#define BE_DRAWCIRCLE_BCOLOR_BR_CW_CLIP (   ptr,
  x,
  y,
  px,
  py,
  a,
  realX,
  realY 
)
Value:
do { \
    if (IS_IN_CLIP((realX) + (x), (realY) + (y))) \
        this->blendPixelPtr(ptr + (x) + (py), color, a); \
} while (0)

Definition at line 232 of file VectorRendererSpec.cpp.

#define BE_DRAWCIRCLE_BCOLOR_CLIP (   ptr1,
  ptr2,
  ptr3,
  ptr4,
  x,
  y,
  px,
  py,
  realX1,
  realY1,
  realX2,
  realY2,
  realX3,
  realY3,
  realX4,
  realY4 
)
Value:
do { \
    if (IS_IN_CLIP((realX1) + (y), (realY1) - (x))) \
        *(ptr1 + (y) - (px)) = color1; \
    if (IS_IN_CLIP((realX1) + (x), (realY1) - (y))) \
        *(ptr1 + (x) - (py)) = color1; \
    if (IS_IN_CLIP((realX2) - (x), (realY2) - (y))) \
        *(ptr2 - (x) - (py)) = color1; \
    if (IS_IN_CLIP((realX2) - (y), (realY2) - (x))) \
        *(ptr2 - (y) - (px)) = color1; \
    if (IS_IN_CLIP((realX3) - (y), (realY3) + (x))) \
        *(ptr3 - (y) + (px)) = color1; \
    if (IS_IN_CLIP((realX3) - (x), (realY3) + (y))) \
        *(ptr3 - (x) + (py)) = color1; \
    if (IS_IN_CLIP((realX4) + (x), (realY4) + (y))) \
        *(ptr4 + (x) + (py)) = color2; \
    if (IS_IN_CLIP((realX4) + (y), (realY4) + (x))) \
        *(ptr4 + (y) + (px)) = color2; \
} while (0)

Definition at line 151 of file VectorRendererSpec.cpp.

#define BE_DRAWCIRCLE_BCOLOR_TL_CCW (   ptr,
  x,
  y,
  px,
  py,
  a 
)
Value:
do { \
    this->blendPixelPtr(ptr - (y) - (px), color, a); \
} while (0)

Definition at line 192 of file VectorRendererSpec.cpp.

#define BE_DRAWCIRCLE_BCOLOR_TL_CCW_CLIP (   ptr,
  x,
  y,
  px,
  py,
  a,
  realX,
  realY 
)
Value:
do { \
    if (IS_IN_CLIP((realX) - (y), (realY) - (x))) \
        this->blendPixelPtr(ptr - (y) - (px), color, a); \
} while (0)

Definition at line 201 of file VectorRendererSpec.cpp.

#define BE_DRAWCIRCLE_BCOLOR_TL_CW (   ptr,
  x,
  y,
  px,
  py,
  a 
)
Value:
do { \
    this->blendPixelPtr(ptr - (x) - (py), color, a); \
} while (0)

Definition at line 188 of file VectorRendererSpec.cpp.

#define BE_DRAWCIRCLE_BCOLOR_TL_CW_CLIP (   ptr,
  x,
  y,
  px,
  py,
  a,
  realX,
  realY 
)
Value:
do { \
    if (IS_IN_CLIP((realX) - (x), (realY) - (y))) \
        this->blendPixelPtr(ptr - (x) - (py), color, a); \
} while (0)

Definition at line 196 of file VectorRendererSpec.cpp.

#define BE_DRAWCIRCLE_BCOLOR_TR_CCW (   ptr,
  x,
  y,
  px,
  py,
  a 
)
Value:
do { \
    this->blendPixelPtr(ptr + (x) - (py), color, a); \
} while (0)

Definition at line 174 of file VectorRendererSpec.cpp.

#define BE_DRAWCIRCLE_BCOLOR_TR_CCW_CLIP (   ptr,
  x,
  y,
  px,
  py,
  a,
  realX,
  realY 
)
Value:
do { \
    if (IS_IN_CLIP((realX) + (x), (realY) - (y))) \
        this->blendPixelPtr(ptr + (x) - (py), color, a); \
} while (0)

Definition at line 183 of file VectorRendererSpec.cpp.

#define BE_DRAWCIRCLE_BCOLOR_TR_CW (   ptr,
  x,
  y,
  px,
  py,
  a 
)
Value:
do { \
    this->blendPixelPtr(ptr + (y) - (px), color, a); \
} while (0)

Definition at line 170 of file VectorRendererSpec.cpp.

#define BE_DRAWCIRCLE_BCOLOR_TR_CW_CLIP (   ptr,
  x,
  y,
  px,
  py,
  a,
  realX,
  realY 
)
Value:
do { \
    if (IS_IN_CLIP((realX) + (y), (realY) - (x))) \
        this->blendPixelPtr(ptr + (y) - (px), color, a); \
} while (0)

Definition at line 178 of file VectorRendererSpec.cpp.

#define BE_DRAWCIRCLE_BOTTOM (   ptr3,
  ptr4,
  x,
  y,
  px,
  py 
)
Value:
do { \
    *(ptr3 - (y) + (px)) = color; \
    *(ptr3 - (x) + (py)) = color; \
    *(ptr4 + (x) + (py)) = color; \
    *(ptr4 + (y) + (px)) = color; \
} while (0)

Definition at line 101 of file VectorRendererSpec.cpp.

#define BE_DRAWCIRCLE_BOTTOM_CLIP (   ptr3,
  ptr4,
  x,
  y,
  px,
  py,
  realX3,
  realY3,
  realX4,
  realY4 
)
Value:
do { \
    if (IS_IN_CLIP((realX3) - (y), (realY3) + (x))) \
        *(ptr3 - (y) + (px)) = color; \
    if (IS_IN_CLIP((realX3) - (x), (realY3) + (y))) \
        *(ptr3 - (x) + (py)) = color; \
    if (IS_IN_CLIP((realX4) + (x), (realY4) + (y))) \
        *(ptr4 + (x) + (py)) = color; \
    if (IS_IN_CLIP((realX4) + (y), (realY4) + (x))) \
        *(ptr4 + (y) + (px)) = color; \
} while (0)

Definition at line 124 of file VectorRendererSpec.cpp.

#define BE_DRAWCIRCLE_CLIP (   ptr1,
  ptr2,
  ptr3,
  ptr4,
  x,
  y,
  px,
  py,
  realX1,
  realY1,
  realX2,
  realY2,
  realX3,
  realY3,
  realX4,
  realY4 
)
Value:
do { \
    BE_DRAWCIRCLE_TOP_CLIP(ptr1,ptr2,x,y,px,py,realX1,realY1,realX2,realY2); \
    BE_DRAWCIRCLE_BOTTOM_CLIP(ptr3,ptr4,x,y,px,py,realX3,realY3,realX4,realY4); \
} while (0)

Definition at line 135 of file VectorRendererSpec.cpp.

#define BE_DRAWCIRCLE_TOP (   ptr1,
  ptr2,
  x,
  y,
  px,
  py 
)
Value:
do { \
    *(ptr1 + (y) - (px)) = color; \
    *(ptr1 + (x) - (py)) = color; \
    *(ptr2 - (x) - (py)) = color; \
    *(ptr2 - (y) - (px)) = color; \
} while (0)

Definition at line 94 of file VectorRendererSpec.cpp.

#define BE_DRAWCIRCLE_TOP_CLIP (   ptr1,
  ptr2,
  x,
  y,
  px,
  py,
  realX1,
  realY1,
  realX2,
  realY2 
)
Value:
do { \
    if (IS_IN_CLIP((realX1) + (y), (realY1) - (x))) \
        *(ptr1 + (y) - (px)) = color; \
    if (IS_IN_CLIP((realX1) + (x), (realY1) - (y))) \
        *(ptr1 + (x) - (py)) = color; \
    if (IS_IN_CLIP((realX2) - (x), (realY2) - (y))) \
        *(ptr2 - (x) - (py)) = color; \
    if (IS_IN_CLIP((realX2) - (y), (realY2) - (x))) \
        *(ptr2 - (y) - (px)) = color; \
} while (0)

Definition at line 113 of file VectorRendererSpec.cpp.

#define BE_DRAWCIRCLE_XCOLOR (   ptr1,
  ptr2,
  ptr3,
  ptr4,
  x,
  y,
  px,
  py 
)
Value:
do { \
    BE_DRAWCIRCLE_XCOLOR_TOP(ptr1,ptr2,x,y,px,py); \
    BE_DRAWCIRCLE_XCOLOR_BOTTOM(ptr3,ptr4,x,y,px,py); \
} while (0)

Definition at line 256 of file VectorRendererSpec.cpp.

#define BE_DRAWCIRCLE_XCOLOR_BOTTOM (   ptr3,
  ptr4,
  x,
  y,
  px,
  py 
)
Value:
do { \
    *(ptr3 - (y) + (px)) = color3; \
    *(ptr3 - (x) + (py)) = color4; \
    *(ptr4 + (x) + (py)) = color4; \
    *(ptr4 + (y) + (px)) = color3; \
} while (0)

Definition at line 249 of file VectorRendererSpec.cpp.

#define BE_DRAWCIRCLE_XCOLOR_BOTTOM_CLIP (   ptr3,
  ptr4,
  x,
  y,
  px,
  py,
  realX3,
  realY3,
  realX4,
  realY4 
)
Value:
do { \
    if (IS_IN_CLIP((realX3) - (y), (realY3) + (x))) \
        *(ptr3 - (y) + (px)) = color3; \
\
    if (IS_IN_CLIP((realX3) - (x), (realY3) + (y))) \
        *(ptr3 - (x) + (py)) = color4; \
\
    if (IS_IN_CLIP((realX4) + (x), (realY4) + (y))) \
        *(ptr4 + (x) + (py)) = color4; \
\
    if (IS_IN_CLIP((realX4) + (y), (realY4) + (x))) \
        *(ptr4 + (y) + (px)) = color3; \
} while (0)

Definition at line 278 of file VectorRendererSpec.cpp.

#define BE_DRAWCIRCLE_XCOLOR_CLIP (   ptr1,
  ptr2,
  ptr3,
  ptr4,
  x,
  y,
  px,
  py,
  realX1,
  realY1,
  realX2,
  realY2,
  realX3,
  realY3,
  realX4,
  realY4 
)
Value:
do { \
    BE_DRAWCIRCLE_XCOLOR_TOP_CLIP(ptr1,ptr2,x,y,px,py,realX1,realY1,realX2,realY2); \
    BE_DRAWCIRCLE_XCOLOR_BOTTOM_CLIP(ptr3,ptr4,x,y,px,py,realX3,realY3,realX4,realY4); \
} while (0)

Definition at line 292 of file VectorRendererSpec.cpp.

#define BE_DRAWCIRCLE_XCOLOR_TOP (   ptr1,
  ptr2,
  x,
  y,
  px,
  py 
)
Value:
do { \
    *(ptr1 + (y) - (px)) = color1; \
    *(ptr1 + (x) - (py)) = color2; \
    *(ptr2 - (x) - (py)) = color2; \
    *(ptr2 - (y) - (px)) = color1; \
} while (0)

Definition at line 242 of file VectorRendererSpec.cpp.

#define BE_DRAWCIRCLE_XCOLOR_TOP_CLIP (   ptr1,
  ptr2,
  x,
  y,
  px,
  py,
  realX1,
  realY1,
  realX2,
  realY2 
)
Value:
do { \
    if (IS_IN_CLIP((realX1) + (y), (realY1) - (x))) \
        *(ptr1 + (y) - (px)) = color1; \
\
    if (IS_IN_CLIP((realX1) + (x), (realY1) - (y))) \
        *(ptr1 + (x) - (py)) = color2; \
\
    if (IS_IN_CLIP((realX2) - (x), (realY2) - (y))) \
        *(ptr2 - (x) - (py)) = color2; \
\
    if (IS_IN_CLIP((realX2) - (y), (realY2) - (x))) \
        *(ptr2 - (y) - (px)) = color1; \
} while (0)

Definition at line 264 of file VectorRendererSpec.cpp.

#define BE_RESET (  ) 
Value:
do { \
    f = 1 - r; \
    ddF_x = 0; ddF_y = -2 * r; \
    x = 0; y = r; px = 0; py = pitch * r; \
} while (0)

Definition at line 298 of file VectorRendererSpec.cpp.

#define FIXED_POINT   1

VERTICAL TRIANGLE DRAWING ALGORITHM.

FIXED POINT ARITHMETIC

Definition at line 2197 of file VectorRendererSpec.cpp.

#define ipart (   x  )     ((x) & ~0xFF)

Definition at line 2200 of file VectorRendererSpec.cpp.

#define IS_IN_CLIP (   x,
  y 
)
Value:
(_clippingArea.left <= (x) && (x) < _clippingArea.right \
    && _clippingArea.top <= (y) && (y) < _clippingArea.bottom)

Definition at line 261 of file VectorRendererSpec.cpp.

#define rfpart (   x  )     ((0x100 - ((x) & 0xFF)) * 100 >> 8)

Definition at line 2202 of file VectorRendererSpec.cpp.

#define TRIANGLE_MAINX (  ) 
Value:
if (error_term >= 0) { \
            ptr_right += pitch; \
            ptr_left += pitch; \
            error_term += dysub; \
        } else { \
            error_term += ddy; \
        } \
        ptr_right++; \
        ptr_left--;

Definition at line 304 of file VectorRendererSpec.cpp.

#define TRIANGLE_MAINY (  ) 
Value:
if (error_term >= 0) { \
            ptr_right++; \
            ptr_left--; \
            error_term += dxsub; \
        } else { \
            error_term += ddx; \
        } \
        ptr_right += pitch; \
        ptr_left += pitch;

Definition at line 315 of file VectorRendererSpec.cpp.

#define VECTOR_RENDERER_FAST_TRIANGLES

Definition at line 36 of file VectorRendererSpec.cpp.

#define WU_ALGORITHM (  ) 
Value:
do { \
    oldT = T; \
    T = fp_sqroot(rsq - y*y) ^ 0xFFFF; \
    py += pitch; \
    if (T < oldT) { \
        x--; px -= pitch; \
    } \
    a2 = (T >> 8); \
    a1 = ~a2; \
} while (0)

Definition at line 414 of file VectorRendererSpec.cpp.

#define WU_DRAWCIRCLE (   ptr1,
  ptr2,
  ptr3,
  ptr4,
  x,
  y,
  px,
  py,
  a 
)
Value:
do { \
    WU_DRAWCIRCLE_TOP(ptr1,ptr2,x,y,px,py,a); \
    WU_DRAWCIRCLE_BOTTOM(ptr3,ptr4,x,y,px,py,a); \
} while (0)

Definition at line 341 of file VectorRendererSpec.cpp.

#define WU_DRAWCIRCLE_BCOLOR (   ptr1,
  ptr2,
  ptr3,
  ptr4,
  x,
  y,
  px,
  py,
  a 
)
Value:
do { \
    this->blendPixelPtr(ptr1 + (y) - (px), color1, a); \
    this->blendPixelPtr(ptr1 + (x) - (py), color1, a); \
    this->blendPixelPtr(ptr2 - (x) - (py), color1, a); \
    this->blendPixelPtr(ptr2 - (y) - (px), color1, a); \
    this->blendPixelPtr(ptr3 - (y) + (px), color1, a); \
    this->blendPixelPtr(ptr3 - (x) + (py), color1, a); \
    this->blendPixelPtr(ptr4 + (x) + (py), color2, a); \
    this->blendPixelPtr(ptr4 + (y) + (px), color2, a); \
} while (0)

Definition at line 370 of file VectorRendererSpec.cpp.

#define WU_DRAWCIRCLE_BCOLOR_BL_CCW (   ptr,
  x,
  y,
  px,
  py,
  a 
)
Value:
do { \
    this->blendPixelPtr(ptr - (x) + (py), color, a); \
} while (0)

Definition at line 401 of file VectorRendererSpec.cpp.

#define WU_DRAWCIRCLE_BCOLOR_BL_CW (   ptr,
  x,
  y,
  px,
  py,
  a 
)
Value:
do { \
    this->blendPixelPtr(ptr - (y) + (px), color, a); \
} while (0)

Definition at line 397 of file VectorRendererSpec.cpp.

#define WU_DRAWCIRCLE_BCOLOR_BR_CCW (   ptr,
  x,
  y,
  px,
  py,
  a 
)
Value:
do { \
    this->blendPixelPtr(ptr + (y) + (px), color, a); \
} while (0)

Definition at line 409 of file VectorRendererSpec.cpp.

#define WU_DRAWCIRCLE_BCOLOR_BR_CW (   ptr,
  x,
  y,
  px,
  py,
  a 
)
Value:
do { \
    this->blendPixelPtr(ptr + (x) + (py), color, a); \
} while (0)

Definition at line 405 of file VectorRendererSpec.cpp.

#define WU_DRAWCIRCLE_BCOLOR_TL_CCW (   ptr,
  x,
  y,
  px,
  py,
  a 
)
Value:
do { \
    this->blendPixelPtr(ptr - (y) - (px), color, a); \
} while (0)

Definition at line 393 of file VectorRendererSpec.cpp.

#define WU_DRAWCIRCLE_BCOLOR_TL_CW (   ptr,
  x,
  y,
  px,
  py,
  a 
)
Value:
do { \
    this->blendPixelPtr(ptr - (x) - (py), color, a); \
} while (0)

Definition at line 389 of file VectorRendererSpec.cpp.

#define WU_DRAWCIRCLE_BCOLOR_TR_CCW (   ptr,
  x,
  y,
  px,
  py,
  a 
)
Value:
do { \
    this->blendPixelPtr(ptr + (x) - (py), color, a); \
} while (0)

Definition at line 385 of file VectorRendererSpec.cpp.

#define WU_DRAWCIRCLE_BCOLOR_TR_CW (   ptr,
  x,
  y,
  px,
  py,
  a 
)
Value:
do { \
    this->blendPixelPtr(ptr + (y) - (px), color, a); \
} while (0)

Definition at line 381 of file VectorRendererSpec.cpp.

#define WU_DRAWCIRCLE_BOTTOM (   ptr3,
  ptr4,
  x,
  y,
  px,
  py,
  a 
)
Value:
do { \
    this->blendPixelPtr(ptr3 - (y) + (px), color, a); \
    this->blendPixelPtr(ptr3 - (x) + (py), color, a); \
    this->blendPixelPtr(ptr4 + (x) + (py), color, a); \
    this->blendPixelPtr(ptr4 + (y) + (px), color, a); \
} while (0)

Definition at line 334 of file VectorRendererSpec.cpp.

#define WU_DRAWCIRCLE_TOP (   ptr1,
  ptr2,
  x,
  y,
  px,
  py,
  a 
)
Value:
do { \
    this->blendPixelPtr(ptr1 + (y) - (px), color, a); \
    this->blendPixelPtr(ptr1 + (x) - (py), color, a); \
    this->blendPixelPtr(ptr2 - (x) - (py), color, a); \
    this->blendPixelPtr(ptr2 - (y) - (px), color, a); \
} while (0)

HELPER MACROS for WU's circle drawing algorithm.

Definition at line 327 of file VectorRendererSpec.cpp.

#define WU_DRAWCIRCLE_XCOLOR (   ptr1,
  ptr2,
  ptr3,
  ptr4,
  x,
  y,
  px,
  py,
  a,
  func 
)
Value:
do { \
    WU_DRAWCIRCLE_XCOLOR_TOP(ptr1,ptr2,x,y,px,py,a,func); \
    WU_DRAWCIRCLE_XCOLOR_BOTTOM(ptr3,ptr4,x,y,px,py,a,func); \
} while (0)

Definition at line 363 of file VectorRendererSpec.cpp.

#define WU_DRAWCIRCLE_XCOLOR_BOTTOM (   ptr3,
  ptr4,
  x,
  y,
  px,
  py,
  a,
  func 
)
Value:
do { \
    this->func(ptr3 - (y) + (px), color3, a); \
    this->func(ptr3 - (x) + (py), color4, a); \
    this->func(ptr4 + (x) + (py), color4, a); \
    this->func(ptr4 + (y) + (px), color3, a); \
} while (0)

Definition at line 356 of file VectorRendererSpec.cpp.

#define WU_DRAWCIRCLE_XCOLOR_TOP (   ptr1,
  ptr2,
  x,
  y,
  px,
  py,
  a,
  func 
)
Value:
do { \
    this->func(ptr1 + (y) - (px), color1, a); \
    this->func(ptr1 + (x) - (py), color2, a); \
    this->func(ptr2 - (x) - (py), color2, a); \
    this->func(ptr2 - (y) - (px), color1, a); \
} while (0)

Definition at line 349 of file VectorRendererSpec.cpp.


Function Documentation

frac_t fp_sqroot ( uint32  x  )  [inline]

Fixed point SQUARE ROOT.

Definition at line 39 of file VectorRendererSpec.cpp.



Generated on Sat Dec 14 2019 05:01:36 for ResidualVM by doxygen 1.7.1
curved edge   curved edge