Go to the documentation of this file.
16 static inline unsigned char
17 lighten (
unsigned char value,
float power)
20 float t = (float) val * log10f(power) / 2.0F;
34 auto *color = (
unsigned char *) col;
35 *color =
lighten (*color, power);
37 *color =
lighten (*color, power);
39 *color =
lighten (*color, power);
41 *color =
lighten (*color, power);
49 for (
int i = 0; i < 512; i++) {
50 l[i].
x = ((float) i * rx) / 512.0F;
56 for (
int i = 0; i < 512; i++) {
57 l[i].
y = ((float) i * ry) / 512.0F;
63 for (
int i = 0; i < 512; i++) {
65 float cosa = param * cosf (l[i].angle);
66 float sina = param * sinf (l[i].angle);
67 l[i].
x = ((float) rx / 2.0F) + cosa;
68 l[i].
y = (float) ry / 2.0F + sina;
78 return (230 << (
ROUGE * 8)) | (120 << (
VERT * 8)) | (10 << (
BLEU * 8));
80 return (120 << (
VERT * 8)) | (252 << (
ROUGE * 8)) | (10 << (
BLEU * 8));
82 return (160 << (
VERT * 8)) | (236 << (
ROUGE * 8)) | (40 << (
BLEU * 8));
84 return (40 << (
BLEU * 8)) | (220 << (
ROUGE * 8)) | (140 << (
VERT * 8));
86 return (200 << (
VERT * 8)) | (80 << (
ROUGE * 8)) | (10 << (
BLEU * 8));
88 return (250 << (
BLEU * 8)) | (30 << (
VERT * 8)) | (80 << (
ROUGE * 8));
90 return 0x5 << (
BLEU * 8);
112 for (
int i = 0; i < 512; i++) {
119 auto *c1 = (
unsigned char *) &l->
color;
120 auto *c2 = (
unsigned char *) &l->
color2;
121 for (
int i = 0; i < 4; i++) {
124 *c1 = (
unsigned char) ((cc1 * 63 + cc2) >> 6);
130 if (l->
power < 1.1F) {
134 if (l->
power > 17.5F) {
144 float param,
float amplitude,
int col)
156 int IDsrc,
float paramS,
int coulS,
157 int IDdest,
float paramD,
int coulD)
172 l->amplitude = l->amplitudeF = 1.0F;
174 genline (IDsrc, paramS, l->points, rx, ry);
175 genline (IDdest, paramD, l->points2, rx, ry);
195 free ((*l)->points2);
203 if (line !=
nullptr) {
207 float cosa = cosf (pt->
angle) / 1000.0F;
208 float sina = sinf (pt->
angle) / 1000.0F;
212 int x1 = (int) (pt->
x + cosa * line->
amplitude * data[0]);
213 int y1 = (int) (pt->
y + sina * line->
amplitude * data[0]);
215 for (
int i = 1; i < 512; i++) {
218 cosa = cosf (pt->
angle) / 1000.0F;
219 sina = sinf (pt->
angle) / 1000.0F;
221 int x2 = (int) (pt->
x + cosa * line->
amplitude * data[i]);
222 int y2 = (int) (pt->
y + sina * line->
amplitude * data[i]);
std::array< int16_t, 512 > GoomSingleData
GMLine * goom_lines_init(int rx, int ry, int IDsrc, float paramS, int coulS, int IDdest, float paramD, int coulD)
static void draw_line(int *data, int x1, int y1, int x2, int y2, int col, int screenx, int screeny)
void goom_lines_switch_to(GMLine *gml, int IDdest, float param, float amplitude, int col)
void goom_lines_free(GMLine **l)
void goom_lines_set_res(GMLine *gml, int rx, int ry)
#define DRAWMETHOD_DONE()
void goom_lines_draw(GMLine *line, const GoomSingleData &data, unsigned int *p)
static void goom_lines_move(GMLine *l)
static void genline(int id, float param, GMUnitPointer *l, int rx, int ry)
#define ROUGE
position des composantes
static void lightencolor(int *col, float power)
static unsigned char lighten(unsigned char value, float power)
static guint32 getcouleur(int mode)