59#define M_PI 3.141592654
62#define PREAMBLE(scaling, line_scaling, x_offset, y_offset) { \
64 cairo_set_line_cap(cr, CAIRO_LINE_CAP_ROUND); \
65 const float s = ((w < h) ? w : h) * scaling; \
66 cairo_translate(cr, x + (w / 2.0) - (s / 2.0), y + (h / 2.0) - (s / 2.0)); \
67 cairo_scale(cr, s, s); \
68 cairo_translate(cr, x_offset, y_offset); \
69 cairo_matrix_t matrix; \
70 cairo_get_matrix(cr, &matrix); \
71 cairo_set_line_width(cr, 1. / hypot(matrix.xx, matrix.yy)); }
73#define FINISH { cairo_identity_matrix(cr); \
245 0.5 -
C * 0.5 +
S * 0.5,
246 0.5 -
S * 0.5 -
C * 0.5);
355 double C =
cosf(-1.570796327f),
S =
sinf(-1.570796327f);
382 cairo_arc(cr, 0.5, 0.5, 0.46, 0, 6.2832);
416 cairo_arc(cr, 0.5, 0.5, 0.46, (-50 * 3.145 / 180), (230 * 3.145 / 180));
431 const double bar_y = 0.08;
432 const double bar_h = 0.84;
433 const double radius =
bar_w * 0.5;
462 cairo_arc(cr, 0.5, 0.5, 0.46, (-50 * 3.145 / 180), (230 * 3.145 / 180));
763 double r = 0.7,
g = 0.7, b = 0.7, a = 1.0;
787 const double angle = -
M_PI_4;
809 double pattern[2] = {0.1f, 0.2f};
833 const double nodes[5][2] =
847 cairo_curve_to(cr, 0.95, 0.60, 0.75, 0.90, nodes[3][0], nodes[3][1]);
848 cairo_curve_to(cr, 0.60, 0.7, 0.5, 0.75, nodes[4][0], nodes[4][1]);
849 cairo_curve_to(cr, 0.05, 0.70, 0.05, 0.80, nodes[0][0], nodes[0][1]);
852 for (
int i = 0;
i < 5;
i++)
854 const float radius = 0.075;
857 const float length = radius * 0.7071f;
858 cairo_rectangle(cr, nodes[
i][0] - length, nodes[
i][1] - length, 2 * length, 2 * length);
926 const double nodes[3][2] = {{0.1, 0.90},
931 cairo_curve_to(cr, 0.00, 0.75, 0.1, 0.18, nodes[1][0], nodes[1][1]);
932 cairo_curve_to(cr, 0.82, 0.7, 0.8, 0.2, nodes[2][0], nodes[2][1]);
935 for(
int i = 0;
i < 3;
i++)
1029 _gradient_arc(cr, 0.125, 16, 0.5, 0.5, 0.5, -
M_PI / 3.0,
M_PI +
M_PI / 3.0, start,
r, a);
1057 _gradient_arc(cr, 0.125, 16, 0.75, 0.6, 0.4, -
M_PI / 3.0,
M_PI +
M_PI / 3.0, start,
r, a);
1109 for(
int i = 0;
i < 4;
i++)
1110 for(
int j = 0;
j < 4;
j++)
1124 cairo_arc(cr, 0.3, 0.3, 0.3, 0, 6.2832);
1151 const float r =
fminf(w / 3.6, h / 2.0) * 0.95;
1164 const float r =
fminf(w / 3.6, h / 2.0) * 0.95;
1193 const float r =
fminf(w / 3.6, h / 2.0) * 0.95;
1218 const float r =
fminf(w / 3.6, h / 2.0) * 0.95;
1263 const double offset = 0.17;
1265 cairo_arc(cr, 0.5, 0.5 + 0.3, 0.6, (1.0 + offset) *
M_PI, (2.0 - offset) *
M_PI);
1272 const double iris_y = 0.45;
1295 cairo_arc(cr, 0.5, 0.5, 0.5, (-80 * 3.145 / 180), (150 * 3.145 / 180));
1339 const double center = 0.5;
1340 const double width = 1.;
1346 const double radius = 0.1;
1348 const double left = center -
offset_w;
1349 const double right = center +
offset_w;
1351 const double bottom = center +
offset_h;
1694 cairo_arc(cr, 0.5, 0.5, 0.35, (-80 * 3.145 / 180), (220 * 3.145 / 180));
1704 if((
flags & 3) == 1)
1713 else if((
flags & 3) == 2)
1722 else if((
flags & 3) == 3)
1806 cairo_arc(cr, 0.5, 0.5, 0.45, (-80 * 3.145 / 180), (220 * 3.145 / 180));
1814 PREAMBLE(0.5 * 1.1, 1, 0.5 + 0.06, 0.5 -0.10)
1885 const double r = 0.5;
1971 GdkRGBA *
bgc = (GdkRGBA *)data;
1998 GdkRGBA *
bgc = (GdkRGBA *)data;
2139 const float r = 0.18;
2221 const float x1 = 0.5f -
top_width * 0.5f;
2222 const float y1 = 0.0f;
2232 const float radius = 0.035f;
2250 const float center_y = 0.6f;
2251 const float offset_y = 0.088f;
2304 cairo_arc(cr, 0.08, 1. - 0.15 + 0.1926, 0.090666667, -0.49, 3.63);
2356 const float big_r = 1.f;
2357 const float tin_r = 0.8f;
2359 for(
int i = 0;
i < 12;
i++)
2361 const float radius = (
i % 2 == 0) ?
big_r :
tin_r;
2730 cairo_curve_to(cr, 0.32, 1 - 1.08, 0.69, 1 - 0.63, 0.97, 1 - 0.32);
2752 const double icon_max = 1.0 - inset;
2848 cairo_arc(cr, 0.5, 0.5, 0.40, (-50 * 3.145 / 180), (230 * 3.145 / 180));
2860 const float r1 = 0.2;
2861 const float r2 = 0.4;
2862 const float d = 2.0 *
M_PI * 0.1f;
2868 for(
int k = 1;
k < 10;
k++)
2886 double na = a * 0.7;
3108 cairo_arc(cr, 0.05, 0.5, 0.55, -0.6107259643892086, 0.6107259643892086);
3109 cairo_arc(cr, 0.95, 0.5, 0.55, 2.5308666892005847, 3.7523186179790016);
3286 const int steps = 4;
3293 if(x1 > .9) x1 = .9;
3342 const double a =
size / 2.0;
3343 const double b =
size / 10.0;
3597 const double kheight = .73-.27;
3598 const double kwidth = .9 - .1;
3607 for(
int i=0;
i < 7;
i++)
3616 for(
int i=0;
i < 6;
i++)
3661 const double radius = 0.20;
3662 const double offset = 0.24;
3663 const double height = (radius + offset) * 2.0;
3665 const double angle =
M_PI / 4.0;
3704 const double width = 0.25;
3705 const double height = 0.25;
3706 const double margin = 0.05;
3709 const double left = margin;
3710 const double top = margin;
3711 const double right = 1.0 - margin -
width;
3712 const double bottom = 1.0 - margin -
height;
3713 const double center_x = margin +
width * 0.5;
3739 const gint
flags,
void *data)
3748 const gint
flags,
void *data)
3758 const gint
flags,
void *data)
static const float const float C
static void dt_draw_rounded_rectangle_path(cairo_t *cr, float x, float y, float width, float height, float radius)
static void dt_draw_plus_sign(cairo_t *cr, float x, float y, float size, float line_width_scale)
static void set_color(cairo_t *cr, GdkRGBA color)
static void dt_draw_star(cairo_t *cr, float x, float y, float r1, float r2)
float *const restrict const size_t k
dt_mipmap_buffer_dsc_flags flags
typedef double((*spd)(unsigned long int wavelength, double TempK))