File: drawstemdir.c

package info (click to toggle)
denemo 0.5.9-2
  • links: PTS
  • area: main
  • in suites: woody
  • size: 2,500 kB
  • ctags: 2,415
  • sloc: ansic: 23,057; sh: 3,321; yacc: 1,737; makefile: 449; lex: 376
file content (41 lines) | stat: -rw-r--r-- 1,021 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
/* drawstemdir.c
 *
 * Functions for drawing stemming directives
 *
 * for Denemo, a gtk+ frontend to GNU Lilypond
 * (c) 1999, 2000, 2001 Matthew Hiller
 */

#include "utils.h"		/* Includes <gdk.h> */
#include "datastructures.h"

void
draw_stem_directive (GdkPixmap * pixmap, GdkGC * gc, GdkFont * font,
		     gint xx, gint y, mudelaobject * theobj)
{
  static GdkFont *stem_directive_font = NULL;

  if (!stem_directive_font)
    {
      stem_directive_font =
	gdk_fontset_load
	("-*-helvetica-medium-r-normal-*-12-*-*-*-*-*-iso8859-*");
      if (!stem_directive_font)
	stem_directive_font = font;
    }
  switch (theobj->u.stemval.type)
    {
    case STEMUP:
      gdk_draw_text (pixmap, stem_directive_font, gc, xx, y - 4,
		     _("stemup"), 6);
      break;
    case STEMBOTH:
      gdk_draw_text (pixmap, stem_directive_font, gc, xx, y - 4,
		     _("stemboth"), 8);
      break;
    case STEMDOWN:
      gdk_draw_text (pixmap, stem_directive_font, gc, xx, y - 4,
		     _("stemdown"), 8);
      break;
    }
}