• R/O
  • HTTP
  • SSH
  • HTTPS

Commit

Tags
No Tags

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

作図ソフト dia の改良版


Commit MetaInfo

Revisiondab616aa9f1f2179f18c66ff0bde4253b4a4f02c (tree)
Time2014-10-04 18:43:26
AuthorHans Breuer <hans@breu...>
CommiterHans Breuer

Log Message

[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,

Change Summary

Incremental Difference

--- a/plug-ins/metapost/render_metapost.c
+++ b/plug-ins/metapost/render_metapost.c
@@ -805,8 +805,9 @@ draw_string(DiaRenderer *self,
805805 }
806806
807807 static void
808-draw_text(DiaRenderer *self,
809- Text *text) {
808+draw_text (DiaRenderer *self,
809+ Text *text)
810+{
810811 Point pos;
811812 int i;
812813 pos = text->position;
@@ -827,45 +828,6 @@ draw_text(DiaRenderer *self,
827828 }
828829
829830 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
869831 draw_image(DiaRenderer *self,
870832 Point *point,
871833 real width, real height,