66 x = this_proj -> curves[rid][cid] -> legend_pos[0] *
resol[0];
67 y = this_proj -> curves[rid][cid] -> legend_pos[1] *
resol[1];
69 pango_layout_set_font_description (
layout, pango_font_description_from_string (this_proj -> curves[rid][cid] -> legend_font));
71 ctmp = this_proj -> curves[rid][cid] -> extrac -> first;
72 for ( j=this_proj -> curves[rid][cid] -> extrac -> extras ; j >= 0 ; j-- )
75 if (this_proj -> curves[rid][cid] -> draw_id == j)
77 if (this_proj -> curves[rid][cid] ->
layout -> dash > 0)
80 cairo_set_dash(cr, dasht ->
a, dasht ->
b, 0.0);
81 cairo_set_source_rgba (cr, this_proj -> curves[rid][cid] ->
layout -> datacolor.red,
82 this_proj -> curves[rid][cid] ->
layout -> datacolor.green,
83 this_proj -> curves[rid][cid] ->
layout -> datacolor.blue,
84 this_proj -> curves[rid][cid] ->
layout -> datacolor.alpha);
85 cairo_set_line_width (cr, this_proj -> curves[rid][cid] ->
layout -> thickness);
86 cairo_move_to (cr,
x-5,
y);
87 cairo_line_to (cr,
x+20,
y);
93 this_proj -> curves[rid][cid] ->
layout -> datacolor,
94 this_proj -> curves[rid][cid] ->
layout -> gsize);
97 this_proj -> curves[rid][cid] ->
layout -> datacolor,
98 this_proj -> curves[rid][cid] ->
layout -> gsize);
99 cairo_set_source_rgba (cr, this_proj -> curves[rid][cid] -> legend_color.red,
100 this_proj -> curves[rid][cid] -> legend_color.green,
101 this_proj -> curves[rid][cid] -> legend_color.blue,
102 this_proj -> curves[rid][cid] -> legend_color.alpha);
103 str = g_strdup_printf (
"%s - %s",
prepare_for_title(this_proj -> name), this_proj -> curves[rid][cid] -> name);
111 cairo_set_dash(cr, dasht ->
a, dasht ->
b, 0.0);
112 cairo_set_source_rgba (cr, lay -> datacolor.red,
113 lay -> datacolor.green,
114 lay -> datacolor.blue,
115 lay -> datacolor.alpha);
116 cairo_set_line_width (cr, lay -> thickness);
117 cairo_move_to (cr,
x-5,
y);
118 cairo_line_to (cr,
x+20,
y);
123 draw_glyph (cr, lay -> glyph,
z,
y, lay -> datacolor, lay -> gsize);
125 draw_glyph (cr, lay -> glyph,
z,
y, lay -> datacolor, lay -> gsize);
126 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_text (
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_proj -> curves[rid][cid] -> show_legend_box)
148 dasht =
selectdash (this_proj -> curves[rid][cid] -> legend_box_dash);
149 cairo_set_dash(cr, dasht ->
a, dasht ->
b, 0.0);
150 cairo_set_source_rgba (cr, this_proj -> curves[rid][cid] -> legend_box_color.red,
151 this_proj -> curves[rid][cid] -> legend_box_color.green,
152 this_proj -> curves[rid][cid] -> legend_box_color.blue,
153 this_proj -> curves[rid][cid] -> legend_box_color.alpha);
154 cairo_set_line_width (cr, this_proj -> curves[rid][cid] -> legend_box_thickness);
155 x = this_proj -> curves[rid][cid] -> legend_pos[0] *
resol[0] - 25;
156 th = ih + fh + (
y - this_proj -> curves[rid][cid] -> legend_pos[1] *
resol[1]);
157 y = this_proj -> curves[rid][cid] -> legend_pos[1] *
resol[1] - ih;
159 cairo_rectangle (cr,
x,
y, tw, th);