~ubuntu-branches/ubuntu/oneiric/tuxguitar/oneiric

« back to all changes in this revision

Viewing changes to TuxGuitar/src/org/herac/tuxguitar/gui/editors/tab/painters/TGTempoPainter.java

  • Committer: Bazaar Package Importer
  • Author(s): Philippe Coval
  • Date: 2008-06-19 00:30:30 UTC
  • mto: (5.1.2 sid)
  • mto: This revision was merged to the branch mainline in revision 3.
  • Revision ID: james.westby@ubuntu.com-20080619003030-h719szrhsngou7c6
Tags: upstream-1.0
ImportĀ upstreamĀ versionĀ 1.0

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
package org.herac.tuxguitar.gui.editors.tab.painters;
 
2
 
 
3
import org.herac.tuxguitar.gui.editors.TGPainter;
 
4
 
 
5
public class TGTempoPainter {
 
6
        
 
7
        public static void paintTempo(TGPainter painter, int x, int y,float scale) {
 
8
                int width = Math.round(scale * 1.33f);
 
9
                int height = Math.round(scale * (1.0f + 2.5f));
 
10
                
 
11
                painter.initPath(TGPainter.PATH_FILL);
 
12
                TGNotePainter.paintNote(painter,x + (width - (scale * 1.33f)),y + ( height - (1.0f * scale) ), scale );
 
13
                painter.closePath();
 
14
                
 
15
                painter.initPath();
 
16
                painter.moveTo(x + width,y);
 
17
                painter.lineTo(x + width,y + (height - (0.66f * scale)) );
 
18
                painter.closePath();
 
19
        }
 
20
}