作図ソフト dia の改良版
Revision | dab616aa9f1f2179f18c66ff0bde4253b4a4f02c (tree) |
---|---|
Time | 2014-10-04 18:43:26 |
Author | Hans Breuer <hans@breu...> |
Commiter | Hans Breuer |
[warningectomy] unused function 'draw_text_line' (removed)
render_metapost.c:830:1: warning: unused function 'draw_text_line' [-Wunused-function]
draw_text_line(DiaRenderer *self, TextLine *text_line,
@@ -805,8 +805,9 @@ draw_string(DiaRenderer *self, | ||
805 | 805 | } |
806 | 806 | |
807 | 807 | static void |
808 | -draw_text(DiaRenderer *self, | |
809 | - Text *text) { | |
808 | +draw_text (DiaRenderer *self, | |
809 | + Text *text) | |
810 | +{ | |
810 | 811 | Point pos; |
811 | 812 | int i; |
812 | 813 | pos = text->position; |
@@ -827,45 +828,6 @@ draw_text(DiaRenderer *self, | ||
827 | 828 | } |
828 | 829 | |
829 | 830 | static void |
830 | -draw_text_line(DiaRenderer *self, TextLine *text_line, | |
831 | - Point *pos, Alignment alignment, Color *color) | |
832 | -{ | |
833 | - MetapostRenderer *renderer = METAPOST_RENDERER (self); | |
834 | - gchar height_buf[DTOSTR_BUF_SIZE]; | |
835 | - gchar px_buf[DTOSTR_BUF_SIZE]; | |
836 | - gchar py_buf[DTOSTR_BUF_SIZE]; | |
837 | - gchar red_buf[DTOSTR_BUF_SIZE]; | |
838 | - gchar green_buf[DTOSTR_BUF_SIZE]; | |
839 | - gchar blue_buf[DTOSTR_BUF_SIZE]; | |
840 | - | |
841 | - /* real width = text_line_get_width(text_line); */ | |
842 | - | |
843 | - set_line_color(renderer,color); | |
844 | - | |
845 | - /* Ideally, we would be able to use the "infont" macro to print this label | |
846 | - * in the proper font. Unfortunately, though, metapost is in the habit of | |
847 | - * converting spaces into visible spaces, which looks rather yucky. So we | |
848 | - * embed some TeX with \usefont commands instead. */ | |
849 | - /* Scale text by multiplying text by variable t in metapost */ | |
850 | - fprintf(renderer->file, | |
851 | - "draw btex {\\usefont{OT1}{%s}{%s}{%s} %s} etex scaled %st,(%sx,%sy)", | |
852 | - renderer->mp_font, renderer->mp_weight, renderer->mp_slant, | |
853 | - text_line_get_string(text_line), | |
854 | - g_ascii_formatd(height_buf, sizeof(height_buf), "%g", renderer->mp_font_height), | |
855 | - mp_dtostr(px_buf, pos->x - text_line_get_alignment_adjustment (text_line, alignment)), | |
856 | - mp_dtostr(py_buf, pos->y) ); | |
857 | - | |
858 | - if (!color_equals(&renderer->color, &color_black)) | |
859 | - fprintf(renderer->file, "\n withcolor (%s, %s, %s)", | |
860 | - g_ascii_formatd(red_buf, sizeof(red_buf), "%5.4f", (gdouble) renderer->color.red), | |
861 | - g_ascii_formatd(green_buf, sizeof(green_buf), "%5.4f", (gdouble) renderer->color.green), | |
862 | - g_ascii_formatd(blue_buf, sizeof(blue_buf), "%5.4f", (gdouble) renderer->color.blue) ); | |
863 | - | |
864 | - fprintf(renderer->file,";\n"); | |
865 | -} | |
866 | - | |
867 | - | |
868 | -static void | |
869 | 831 | draw_image(DiaRenderer *self, |
870 | 832 | Point *point, |
871 | 833 | real width, real height, |