]> ruin.nu Git - moosique.git/blobdiff - MooTrackView.java
no message
[moosique.git] / MooTrackView.java
index f7e8335bf365748478972feff97c7ce4fb879f53..0c48df37ad736b7ccc2d2dbc6c3c9545c498f7d4 100644 (file)
@@ -132,8 +132,10 @@ public class MooTrackView extends JPanel {
 
                // Calculates coordinates.
                x = insets.left;
-               y = insets.top + Math.round(mn.getTick() / ticksPerSixteenth) * NOTE_HEIGHT;
-               height = (mn.getDuration() / ticksPerSixteenth) * NOTE_HEIGHT;
+               y = insets.top + (int)((mn.getTick() * NOTE_HEIGHT) / ticksPerSixteenth);
+               height = (mn.getDuration() * NOTE_HEIGHT) / ticksPerSixteenth;
+               System.out.println("y=i(" + insets.top + ")+t(" + mn.getTick() + ")/s(" + ticksPerSixteenth + ") *n(" + NOTE_HEIGHT + ") = " + y);
+               System.out.println("h=t(" + mn.getDuration() + ")/s(" + ticksPerSixteenth + ") *n(" + NOTE_HEIGHT + ") = " + height);
                if (height == 0) height = NOTE_HEIGHT;
                r = new Rectangle(x, y, NOTE_WIDTH, height);