LMMS
Loading...
Searching...
No Matches
lice_arc.cpp File Reference
#include "lice.h"
#include "lice_combine.h"
#include <math.h>

Classes

class  _LICE_CircleDrawer< COMBFUNC >

Macros

#define WDL_NO_DEFINE_MINMAX
#define _PI   3.141592653589793238f
#define IGNORE_SCALING(mode)
#define A(x)
#define AF(x)
#define DEF_ALPHAS(dim)
#define __ALPHAS__(B)
#define __ALPHAS__(B)
#define __ALPHAS__(B)
#define __ALPHAS__(B)
#define __ALPHAS__(B)
#define __ALPHAS__(B)
#define __ALPHAS__(B)
#define __ALPHAS__(B)
#define __ALPHAS__(B)
#define __ALPHAS__(B)
#define __ALPHAS__(B)
#define __ALPHAS__(B)
#define __ALPHAS__(B)
#define __ALPHAS__(B)
#define __ALPHAS__(B)
#define __LICE__ACTION(COMBFUNC)
#define __LICE__ACTION(COMBFUNC)

Functions

template<class T>
void _SWAP (T &a, T &b)
static bool CachedCircle (LICE_IBitmap *dest, float cx, float cy, float r, LICE_pixel color, float alpha, int mode, bool aa, bool fill)
static void __DrawCircleClipped (LICE_IBitmap *dest, float cx, float cy, float rad, LICE_pixel color, int ia, bool aa, bool filled, int mode, const int *clip, bool doclip)
static void __DrawArc (int w, int h, LICE_IBitmap *dest, float cx, float cy, float rad, double anglo, double anghi, LICE_pixel color, int ialpha, bool aa, int mode)
void LICE_Arc (LICE_IBitmap *dest, float cx, float cy, float r, float minAngle, float maxAngle, LICE_pixel color, float alpha, int mode, bool aa)
void LICE_Circle (LICE_IBitmap *dest, float cx, float cy, float r, LICE_pixel color, float alpha, int mode, bool aa)
void LICE_FillCircle (LICE_IBitmap *dest, float cx, float cy, float r, LICE_pixel color, float alpha, int mode, bool aa)
void LICE_RoundRect (LICE_IBitmap *drawbm, float xpos, float ypos, float w, float h, int cornerradius, LICE_pixel col, float alpha, int mode, bool aa)

Macro Definition Documentation

◆ __ALPHAS__ [1/15]

#define __ALPHAS__ ( B)
Value:
A(0.00), A(0.00), A(0.00), A(0.00), A(0.33), A(0.71), A(0.93), A(1.00), A(0.93), A(0.71), A(0.33), A(0.00), A(0.00), A(0.00), A(0.00), \
A(0.00), A(0.00), A(0.00), A(0.75), A(0.68), B(0.29), B(0.07), B(0.00), B(0.07), B(0.29), A(0.68), A(0.75), A(0.00), A(0.00), A(0.00), \
A(0.00), A(0.00), A(0.90), B(0.26), B(0.00), B(0.00), B(0.00), B(0.00), B(0.00), B(0.00), B(0.00), B(0.34), A(0.90), A(0.00), A(0.00), \
A(0.00), A(0.75), B(0.34), B(0.00), B(0.00), B(0.00), B(0.00), B(0.00), B(0.00), B(0.00), B(0.00), B(0.00), B(0.26), A(0.75), A(0.00), \
A(0.33), A(0.68), B(0.00), B(0.00), B(0.00), B(0.00), B(0.00), B(0.00), B(0.00), B(0.00), B(0.00), B(0.00), B(0.00), A(0.68), A(0.33), \
A(0.71), B(0.29), B(0.00), B(0.00), B(0.00), B(0.00), B(0.00), B(0.00), B(0.00), B(0.00), B(0.00), B(0.00), B(0.00), B(0.29), A(0.71), \
A(0.93), B(0.07), B(0.00), B(0.00), B(0.00), B(0.00), B(0.00), B(0.00), B(0.00), B(0.00), B(0.00), B(0.00), B(0.00), B(0.07), A(0.93), \
A(1.00), B(0.00), B(0.00), B(0.00), B(0.00), B(0.00), B(0.00), B(0.00), B(0.00), B(0.00), B(0.00), B(0.00), B(0.00), B(0.00), A(1.00), \
A(0.93), B(0.07), B(0.00), B(0.00), B(0.00), B(0.00), B(0.00), B(0.00), B(0.00), B(0.00), B(0.00), B(0.00), B(0.00), B(0.07), A(0.93), \
A(0.71), B(0.29), B(0.00), B(0.00), B(0.00), B(0.00), B(0.00), B(0.00), B(0.00), B(0.00), B(0.00), B(0.00), B(0.00), B(0.29), A(0.71), \
A(0.33), A(0.68), B(0.00), B(0.00), B(0.00), B(0.00), B(0.00), B(0.00), B(0.00), B(0.00), B(0.00), B(0.00), B(0.00), A(0.68), A(0.33), \
A(0.00), A(0.75), B(0.34), B(0.00), B(0.00), B(0.00), B(0.00), B(0.00), B(0.00), B(0.00), B(0.00), B(0.00), B(0.26), A(0.75), A(0.00), \
A(0.00), A(0.00), A(0.90), B(0.26), B(0.00), B(0.00), B(0.00), B(0.00), B(0.00), B(0.00), B(0.00), B(0.34), A(0.90), A(0.00), A(0.00), \
A(0.00), A(0.00), A(0.00), A(0.75), A(0.68), B(0.29), B(0.07), B(0.00), B(0.07), B(0.29), A(0.68), A(0.75), A(0.00), A(0.00), A(0.00), \
A(0.00), A(0.00), A(0.00), A(0.00), A(0.33), A(0.71), A(0.93), A(1.00), A(0.93), A(0.71), A(0.33), A(0.00), A(0.00), A(0.00), A(0.00),
#define A(x)
Definition lice_arc.cpp:13

◆ __ALPHAS__ [2/15]

#define __ALPHAS__ ( B)
Value:
A(0.00), A(0.00), A(0.00), A(0.20), A(0.66), A(0.92), A(1.00), A(0.92), A(0.66), A(0.20), A(0.00), A(0.00), A(0.00), \
A(0.00), A(0.00), A(0.47), A(0.81), B(0.35), B(0.09), B(0.00), B(0.09), B(0.35), A(0.81), A(0.47), A(0.00), A(0.00), \
A(0.00), A(0.47), B(0.53), B(0.00), B(0.00), B(0.00), B(0.00), B(0.00), B(0.00), B(0.00), B(0.53), A(0.47), A(0.00), \
A(0.20), A(0.81), B(0.00), B(0.00), B(0.00), B(0.00), B(0.00), B(0.00), B(0.00), B(0.00), B(0.00), A(0.81), A(0.20), \
A(0.66), B(0.35), B(0.00), B(0.00), B(0.00), B(0.00), B(0.00), B(0.00), B(0.00), B(0.00), B(0.00), B(0.35), A(0.66), \
A(0.92), B(0.09), B(0.00), B(0.00), B(0.00), B(0.00), B(0.00), B(0.00), B(0.00), B(0.00), B(0.00), B(0.09), A(0.92), \
A(1.00), B(0.00), B(0.00), B(0.00), B(0.00), B(0.00), B(0.00), B(0.00), B(0.00), B(0.00), B(0.00), B(0.00), A(1.00), \
A(0.92), B(0.09), B(0.00), B(0.00), B(0.00), B(0.00), B(0.00), B(0.00), B(0.00), B(0.00), B(0.00), B(0.09), A(0.92), \
A(0.66), B(0.35), B(0.00), B(0.00), B(0.00), B(0.00), B(0.00), B(0.00), B(0.00), B(0.00), B(0.00), B(0.35), A(0.66), \
A(0.20), A(0.81), B(0.00), B(0.00), B(0.00), B(0.00), B(0.00), B(0.00), B(0.00), B(0.00), B(0.00), A(0.81), A(0.20), \
A(0.00), A(0.47), B(0.53), B(0.00), B(0.00), B(0.00), B(0.00), B(0.00), B(0.00), B(0.00), B(0.53), A(0.47), A(0.00), \
A(0.00), A(0.00), A(0.47), A(0.81), B(0.35), B(0.09), B(0.00), B(0.09), B(0.35), A(0.81), A(0.47), A(0.00), A(0.00), \
A(0.00), A(0.00), A(0.00), A(0.20), A(0.66), A(0.92), A(1.00), A(0.92), A(0.66), A(0.20), A(0.00), A(0.00), A(0.00),

◆ __ALPHAS__ [3/15]

#define __ALPHAS__ ( B)
Value:
A(0.00), A(0.00), A(0.00), A(0.58), A(0.90), A(1.00), A(0.90), A(0.58), A(0.00), A(0.00), A(0.00), \
A(0.00), A(0.00), A(1.00), B(0.42), B(0.10), B(0.00), B(0.10), B(0.42), A(1.00), A(0.00), A(0.00), \
A(0.00), A(1.00), B(0.00), B(0.00), B(0.00), B(0.00), B(0.00), B(0.00), B(0.00), A(1.00), A(0.00), \
A(0.58), B(0.42), B(0.00), B(0.00), B(0.00), B(0.00), B(0.00), B(0.00), B(0.00), B(0.42), A(0.58), \
A(0.90), B(0.10), B(0.00), B(0.00), B(0.00), B(0.00), B(0.00), B(0.00), B(0.00), B(0.10), A(0.90), \
A(1.00), B(0.00), B(0.00), B(0.00), B(0.00), B(0.00), B(0.00), B(0.00), B(0.00), B(0.00), A(1.00), \
A(0.90), B(0.10), B(0.00), B(0.00), B(0.00), B(0.00), B(0.00), B(0.00), B(0.00), B(0.10), A(0.90), \
A(0.58), B(0.42), B(0.00), B(0.00), B(0.00), B(0.00), B(0.00), B(0.00), B(0.00), B(0.42), A(0.58), \
A(0.00), A(1.00), B(0.00), B(0.00), B(0.00), B(0.00), B(0.00), B(0.00), B(0.00), A(1.00), A(0.00), \
A(0.00), A(0.00), A(1.00), B(0.42), B(0.10), B(0.00), B(0.10), B(0.42), A(1.00), A(0.00), A(0.00), \
A(0.00), A(0.00), A(0.00), A(0.58), A(0.90), A(1.00), A(0.90), A(0.58), A(0.00), A(0.00), A(0.00)

◆ __ALPHAS__ [4/15]

#define __ALPHAS__ ( B)
Value:
A(0.00), A(0.00), A(1.00), A(1.00), A(1.00), A(1.00), A(1.00), A(0.00), A(0.00), \
A(0.00), A(1.00), A(1.00), B(0.00), B(0.00), B(0.00), A(1.00), A(1.00), A(0.00), \
A(1.00), A(1.00), B(0.00), B(0.00), B(0.00), B(0.00), B(0.00), A(1.00), A(1.00), \
A(1.00), B(0.00), B(0.00), B(0.00), B(0.00), B(0.00), B(0.00), B(0.00), A(1.00), \
A(1.00), B(0.00), B(0.00), B(0.00), B(0.00), B(0.00), B(0.00), B(0.00), A(1.00), \
A(1.00), B(0.00), B(0.00), B(0.00), B(0.00), B(0.00), B(0.00), B(0.00), A(1.00), \
A(1.00), A(1.00), B(0.00), B(0.00), B(0.00), B(0.00), B(0.00), A(1.00), A(1.00), \
A(0.00), A(1.00), A(1.00), B(0.00), B(0.00), B(0.00), A(1.00), A(1.00), A(0.00), \
A(0.00), A(0.00), A(1.00), A(1.00), A(1.00), A(1.00), A(1.00), A(0.00), A(0.00)

◆ __ALPHAS__ [5/15]

#define __ALPHAS__ ( B)
Value:
A(0.00), A(0.12), A(0.69), A(1.00), A(1.00), A(1.00), A(0.69), A(0.12), A(0.00), \
A(0.12), A(0.94), A(0.82), B(0.31), B(0.25), B(0.31), A(0.82), A(0.94), A(0.12), \
A(0.69), A(0.82), B(0.06), B(0.00), B(0.00), B(0.00), B(0.06), A(0.82), A(0.69), \
A(1.00), B(0.31), B(0.00), B(0.00), B(0.00), B(0.00), B(0.00), B(0.31), A(1.00), \
A(1.00), B(0.19), B(0.00), B(0.00), B(0.00), B(0.00), B(0.00), B(0.19), A(1.00), \
A(1.00), B(0.31), B(0.00), B(0.00), B(0.00), B(0.00), B(0.00), B(0.31), A(1.00), \
A(0.69), A(0.82), B(0.06), B(0.00), B(0.00), B(0.00), B(0.06), A(0.82), A(0.69), \
A(0.12), A(0.94), A(0.82), B(0.31), B(0.25), B(0.31), A(0.82), A(0.94), A(0.12), \
A(0.00), A(0.12), A(0.69), A(1.00), A(1.00), A(1.00), A(0.69), A(0.12), A(0.00)

◆ __ALPHAS__ [6/15]

#define __ALPHAS__ ( B)
Value:
A(0.00), A(0.00), A(1.00), A(1.00), A(1.00), A(1.00), A(0.00), A(0.00), \
A(0.00), A(1.00), A(1.00), B(0.00), B(0.00), A(1.00), A(1.00), A(0.00), \
A(1.00), A(1.00), B(0.00), B(0.00), B(0.00), B(0.00), A(1.00), A(1.00), \
A(1.00), B(0.00), B(0.00), B(0.00), B(0.00), B(0.00), B(0.00), A(1.00), \
A(1.00), B(0.00), B(0.00), B(0.00), B(0.00), B(0.00), B(0.00), A(1.00), \
A(1.00), A(1.00), B(0.00), B(0.00), B(0.00), B(0.00), A(1.00), A(1.00), \
A(0.00), A(1.00), A(1.00), B(0.00), B(0.00), A(1.00), A(1.00), A(0.00), \
A(0.00), A(0.00), A(1.00), A(1.00), A(1.00), A(1.00), A(0.00), A(0.00)

◆ __ALPHAS__ [7/15]

#define __ALPHAS__ ( B)
Value:
A(0.00), A(0.31), A(0.87), A(1.00), A(1.00), A(0.87), A(0.31), A(0.00), \
A(0.31), A(1.00), A(0.69), B(0.25), B(0.25), A(0.69), A(1.00), A(0.31), \
A(0.87), A(0.69), B(0.00), B(0.00), B(0.00), B(0.00), A(0.69), A(0.87), \
A(1.00), B(0.25), B(0.00), B(0.00), B(0.00), B(0.00), B(0.25), A(1.00), \
A(1.00), B(0.25), B(0.00), B(0.00), B(0.00), B(0.00), B(0.25), A(1.00), \
A(0.87), A(0.69), B(0.00), B(0.00), B(0.00), B(0.00), A(0.69), A(0.87), \
A(0.31), A(1.00), A(0.69), B(0.25), B(0.25), A(0.69), A(1.00), A(0.31), \
A(0.00), A(0.31), A(0.87), A(1.00), A(1.00), A(0.87), A(0.31), A(0.00)

◆ __ALPHAS__ [8/15]

#define __ALPHAS__ ( B)
Value:
A(0.00), A(0.00), A(1.00), A(1.00), A(1.00), A(0.00), A(0.00), \
A(0.00), A(1.00), B(0.00), B(0.00), B(0.00), A(1.00), A(0.00), \
A(1.00), B(0.00), B(0.00), B(0.00), B(0.00), B(0.00), A(1.00), \
A(1.00), B(0.00), B(0.00), B(0.00), B(0.00), B(0.00), A(1.00), \
A(1.00), B(0.00), B(0.00), B(0.00), B(0.00), B(0.00), A(1.00), \
A(0.00), A(1.00), B(0.00), B(0.00), B(0.00), A(1.00), A(0.00), \
A(0.00), A(0.00), A(1.00), A(1.00), A(1.00), A(0.00), A(0.00)

◆ __ALPHAS__ [9/15]

#define __ALPHAS__ ( B)
Value:
A(0.00), A(0.56), A(1.00), A(1.00), A(1.00), A(0.56), A(0.00), \
A(0.56), A(1.00), B(0.38), B(0.25), B(0.38), A(1.00), A(0.56), \
A(1.00), B(0.44), B(0.00), B(0.00), B(0.00), B(0.44), A(1.00), \
A(1.00), B(0.19), B(0.00), B(0.00), B(0.00), B(0.19), A(1.00), \
A(1.00), B(0.44), B(0.00), B(0.00), B(0.00), B(0.44), A(1.00), \
A(0.56), A(1.00), B(0.38), B(0.25), B(0.38), A(1.00), A(0.56), \
A(0.00), A(0.56), A(1.00), A(1.00), A(1.00), A(0.56), A(0.00)

◆ __ALPHAS__ [10/15]

#define __ALPHAS__ ( B)
Value:
A(0.00), A(0.00), A(1.00), A(1.00), A(0.00), A(0.00), \
A(0.00), A(1.00), B(0.00), B(0.00), A(1.00), A(0.00), \
A(1.00), B(0.00), B(0.00), B(0.00), B(0.00), A(1.00), \
A(1.00), B(0.00), B(0.00), B(0.00), B(0.00), A(1.00), \
A(0.00), A(1.00), B(0.00), B(0.00), A(1.00), A(0.00), \
A(0.00), A(0.00), A(1.00), A(1.00), A(0.00), A(0.00)

◆ __ALPHAS__ [11/15]

#define __ALPHAS__ ( B)
Value:
A(0.06), A(0.75), A(1.00), A(1.00), A(0.75), A(0.06), \
A(0.75), A(0.82), B(0.31), B(0.31), A(0.82), A(0.75), \
A(1.00), B(0.31), B(0.00), B(0.00), B(0.31), A(1.00), \
A(1.00), B(0.31), B(0.00), B(0.00), B(0.31), A(1.00), \
A(0.75), A(0.82), B(0.31), B(0.31), A(0.82), A(0.75), \
A(0.06), A(0.75), A(1.00), A(1.00), A(0.75), A(0.06)

◆ __ALPHAS__ [12/15]

#define __ALPHAS__ ( B)
Value:
A(0.00), A(0.00), A(1.00), A(0.00), A(0.00), \
A(0.00), A(1.00), B(0.00), A(1.00), A(0.00), \
A(1.00), B(0.00), B(0.00), B(0.00), A(1.00), \
A(0.00), A(1.00), B(0.00), A(1.00), A(0.00), \
A(0.00), A(0.00), A(1.00), A(0.00), A(0.00)

◆ __ALPHAS__ [13/15]

#define __ALPHAS__ ( B)
Value:
A(0.06), A(0.75), A(1.00), A(0.75), A(0.06), \
A(0.75), A(0.82), B(0.31), A(0.82), A(0.75), \
A(1.00), B(0.31), B(0.00), B(0.31), A(1.00), \
A(0.75), A(0.82), B(0.31), A(0.82), A(0.75), \
A(0.06), A(0.75), A(1.00), A(0.75), A(0.06)

◆ __ALPHAS__ [14/15]

#define __ALPHAS__ ( B)
Value:
A(0.00), A(1.00), A(1.00), A(0.00), \
A(1.00), B(0.00), B(0.00), A(1.00), \
A(1.00), B(0.00), B(0.00), A(1.00), \
A(0.00), A(1.00), A(1.00), A(0.00),

◆ __ALPHAS__ [15/15]

#define __ALPHAS__ ( B)
Value:
A(0.31), A(1.00), A(1.00), A(0.31), \
A(1.00), B(0.06), B(0.06), A(1.00), \
A(1.00), B(0.06), B(0.06), A(1.00), \
A(0.31), A(1.00), A(1.00), A(0.31),

◆ __LICE__ACTION [1/2]

#define __LICE__ACTION ( COMBFUNC)
Value:
_LICE_CircleDrawer<COMBFUNC>::DrawClippedCircle(dest, cx, cy, rad, clip, color, ia, filled, doclip)
static void DrawClippedCircle(LICE_IBitmap *dest, float cx, float cy, float rad, const int *clip, LICE_pixel color, int ai, bool filled, bool doclip)
Definition lice_arc.cpp:426

◆ __LICE__ACTION [2/2]

#define __LICE__ACTION ( COMBFUNC)
Value:
_LICE_CircleDrawer<COMBFUNC>::DrawClippedCircleAA(dest, cx, cy, rad, clip, color, ia, filled, doclip)
static void DrawClippedCircleAA(LICE_IBitmap *dest, float cx, float cy, float rad, const int *clip, LICE_pixel color, int ai, bool filled, bool doclip)
Definition lice_arc.cpp:338

◆ _PI

#define _PI   3.141592653589793238f

◆ A

#define A ( x)
Value:
((LICE_pixel_chan)((x)*255.0+0.5))
unsigned x[BMAX+1]
Definition inflate.c:1586
unsigned char LICE_pixel_chan
Definition lice.h:55

◆ AF

#define AF ( x)
Value:
(255)

◆ DEF_ALPHAS

#define DEF_ALPHAS ( dim)
Value:
static const LICE_pixel_chan alphas_unfill[] = { __ALPHAS__(A) }; \
static const LICE_pixel_chan alphas_fill[] = { __ALPHAS__(AF) }; \
const LICE_pixel_chan * const alphas = fill ? alphas_fill : alphas_unfill; \
((void)sizeof(char[1 - 2*(sizeof(alphas_unfill) != dim*dim)])); \
((void)sizeof(char[1 - 2*(sizeof(alphas_fill) != dim*dim)]));
#define __ALPHAS__(B)
#define AF(x)
Definition lice_arc.cpp:14
void fill(Buf &buf, T value)
Definition buffer.h:50
#define void
Definition unzip.h:396

◆ IGNORE_SCALING

#define IGNORE_SCALING ( mode)
Value:
#define LICE_BLIT_IGNORE_SCALING
Definition lice.h:328
png_structrp int mode
Definition png.h:1139

◆ WDL_NO_DEFINE_MINMAX

#define WDL_NO_DEFINE_MINMAX

Function Documentation

◆ __DrawArc()

void __DrawArc ( int w,
int h,
LICE_IBitmap * dest,
float cx,
float cy,
float rad,
double anglo,
double anghi,
LICE_pixel color,
int ialpha,
bool aa,
int mode )
static

◆ __DrawCircleClipped()

void __DrawCircleClipped ( LICE_IBitmap * dest,
float cx,
float cy,
float rad,
LICE_pixel color,
int ia,
bool aa,
bool filled,
int mode,
const int * clip,
bool doclip )
static

◆ _SWAP()

template<class T>
void _SWAP ( T & a,
T & b )
inline

◆ CachedCircle()

bool CachedCircle ( LICE_IBitmap * dest,
float cx,
float cy,
float r,
LICE_pixel color,
float alpha,
int mode,
bool aa,
bool fill )
static

◆ LICE_Arc()

void LICE_Arc ( LICE_IBitmap * dest,
float cx,
float cy,
float r,
float minAngle,
float maxAngle,
LICE_pixel color,
float alpha,
int mode,
bool aa )

◆ LICE_Circle()

void LICE_Circle ( LICE_IBitmap * dest,
float cx,
float cy,
float r,
LICE_pixel color,
float alpha,
int mode,
bool aa )

◆ LICE_FillCircle()

void LICE_FillCircle ( LICE_IBitmap * dest,
float cx,
float cy,
float r,
LICE_pixel color,
float alpha,
int mode,
bool aa )

◆ LICE_RoundRect()

void LICE_RoundRect ( LICE_IBitmap * drawbm,
float xpos,
float ypos,
float w,
float h,
int cornerradius,
LICE_pixel col,
float alpha,
int mode,
bool aa )