65 Curve * this_curve = this_proj -> analysis[rid] -> curves[cid];
67 x = this_curve -> legend_pos[0] *
resol[0];
68 y = this_curve -> legend_pos[1] *
resol[1];
70 pango_layout_set_font_description (
layout, pango_font_description_from_string (this_curve -> legend_font));
72 ctmp = this_curve -> extrac -> first;
73 for ( j=this_curve -> extrac -> extras ; j >= 0 ; j-- )
76 if (this_curve -> draw_id == j)
78 if (this_curve ->
layout -> dash > 0)
81 cairo_set_dash(cr, dasht -> a, dasht -> b, 0.0);
82 cairo_set_source_rgba (cr, this_curve ->
layout -> datacolor.red,
83 this_curve ->
layout -> datacolor.green,
84 this_curve ->
layout -> datacolor.blue,
85 this_curve ->
layout -> datacolor.alpha);
86 cairo_set_line_width (cr, this_curve ->
layout -> thickness);
87 cairo_move_to (cr,
x-5,
y);
88 cairo_line_to (cr,
x+20,
y);
94 this_curve ->
layout -> datacolor,
95 this_curve ->
layout -> gsize);
98 this_curve ->
layout -> datacolor,
99 this_curve ->
layout -> gsize);
100 cairo_set_source_rgba (cr, this_curve -> legend_color.red,
101 this_curve -> legend_color.green,
102 this_curve -> legend_color.blue,
103 this_curve -> legend_color.alpha);
104 str = g_strdup_printf (
"%s - %s",
prepare_for_title(this_proj -> name), this_curve -> name);
112 cairo_set_dash(cr, dasht -> a, dasht -> b, 0.0);
113 cairo_set_source_rgba (cr, lay -> datacolor.red,
114 lay -> datacolor.green,
115 lay -> datacolor.blue,
116 lay -> datacolor.alpha);
117 cairo_set_line_width (cr, lay -> thickness);
118 cairo_move_to (cr,
x-5,
y);
119 cairo_line_to (cr,
x+20,
y);
124 draw_glyph (cr, lay -> glyph,
z,
y, lay -> datacolor, lay -> gsize);
126 draw_glyph (cr, lay -> glyph,
z,
y, lay -> datacolor, lay -> gsize);
127 cairo_set_source_rgba (cr, 0.0, 0.0, 0.0, 1.0);
132 if (ctmp -> next != NULL) ctmp = ctmp -> next;
134 pango_layout_set_markup (
layout, str, -1);
135 pango_layout_get_size (
layout, & w, & h);
136 z = (double) h / PANGO_SCALE;
139 tw =
max(tw, (
double) w / PANGO_SCALE);
140 cairo_move_to (cr,
x + 35.0,
y -
z/2);
141 pango_cairo_update_layout (cr,
layout);
142 pango_cairo_show_layout (cr,
layout);
146 if (this_curve -> show_legend_box)
148 dasht =
selectdash (this_curve -> legend_box_dash);
149 cairo_set_dash(cr, dasht -> a, dasht -> b, 0.0);
150 cairo_set_source_rgba (cr, this_curve -> legend_box_color.red,
151 this_curve -> legend_box_color.green,
152 this_curve -> legend_box_color.blue,
153 this_curve -> legend_box_color.alpha);
154 cairo_set_line_width (cr, this_curve -> legend_box_thickness);
155 x = this_curve -> legend_pos[0] *
resol[0] - 25;
156 th = ih + fh + (
y - this_curve -> legend_pos[1] *
resol[1]);
157 y = this_curve -> legend_pos[1] *
resol[1] - ih;
159 cairo_rectangle (cr,
x,
y, tw, th);