~ubuntu-branches/ubuntu/oneiric/denemo/oneiric

« back to all changes in this revision

Viewing changes to src/drawcursor.c

  • Committer: Bazaar Package Importer
  • Author(s): Alessio Treglia
  • Date: 2010-10-27 08:00:18 UTC
  • mfrom: (1.3.3 upstream)
  • mto: This revision was merged to the branch mainline in revision 15.
  • Revision ID: james.westby@ubuntu.com-20101027080018-tuekd0869v8ptnqv
Tags: upstream-0.8.16
ImportĀ upstreamĀ versionĀ 0.8.16

Show diffs side-by-side

added added

removed removed

Lines of Context:
19
19
 *
20
20
 */
21
21
void
22
 
draw_cursor (GdkPixmap * pixmap, DenemoScore * si,
 
22
draw_cursor (cairo_t *cr, DenemoScore * si,
23
23
             gint xx, gint y, input_mode mode, gint dclef)
24
24
{
25
25
  gint height = calculateheight (si->cursor_y, dclef);
45
45
  paintgc = (mode & INPUTREST) ? graygc :
46
46
    (mode & INPUTBLANK) ? bluegc :
47
47
    (mode & INPUTEDIT) ? purplegc : si->cursoroffend ? redgc : greengc;
48
 
  gdk_draw_rectangle (pixmap, paintgc, TRUE, xx, height + y - CURSOR_MINUS,
49
 
                      CURSOR_WIDTH, CURSOR_HEIGHT);
 
48
 
 
49
  cairo_save( cr );
 
50
  setcairocolor( cr, paintgc );
 
51
  cairo_rectangle( cr, xx, height + y - CURSOR_MINUS, CURSOR_WIDTH, CURSOR_HEIGHT );
 
52
  cairo_fill( cr );
 
53
  cairo_restore( cr );
50
54
 
51
55
  /* Now draw ledgers if necessary and we're done */
52
 
  draw_ledgers (pixmap, blackgc, height, height, xx, y, CURSOR_WIDTH);
 
56
  draw_ledgers (cr, height, height, xx, y, CURSOR_WIDTH);
53
57
}