1
package org.herac.tuxguitar.gui.editors.tab.painters;
3
import org.herac.tuxguitar.gui.editors.TGPainter;
5
public class TGTripletFeelPainter {
7
public static void paintTripletFeel8(TGPainter painter, int x, int y,float scale) {
8
float topSpacing = (1.0f * scale);
9
float horizontalSpacing = (1.5f * scale);
10
float verticalSpacing = (2.5f * scale);
11
float ovalWidth = (1.33f * scale);
13
painter.initPath(TGPainter.PATH_FILL);
14
TGNotePainter.paintNote(painter,x, y + (topSpacing + verticalSpacing) , scale );
18
painter.moveTo( x + Math.round(ovalWidth) ,y + Math.round(topSpacing + verticalSpacing + (0.33f * scale)) );
19
painter.lineTo( x + Math.round(ovalWidth) ,y + topSpacing);
22
painter.initPath(TGPainter.PATH_FILL);
23
TGNotePainter.paintNote(painter,x + horizontalSpacing,y + (topSpacing + verticalSpacing) , scale );
27
painter.moveTo(x + Math.round(ovalWidth + horizontalSpacing) ,y +Math.round(topSpacing + verticalSpacing + (0.33f * scale)) );
28
painter.lineTo(x + Math.round(ovalWidth + horizontalSpacing) ,y +topSpacing);
31
painter.initPath(TGPainter.PATH_FILL);
32
TGNotePainter.paintFooter(painter,x + Math.round(ovalWidth + horizontalSpacing),y + (topSpacing + (scale * 2.3f)), -1 , scale);
36
painter.moveTo( x, y + (1 * scale) );
37
painter.cubicTo( x, y + (1 * scale), x + ( ( (ovalWidth * 2f) + horizontalSpacing) / 2f),y + (-1 * scale) ,x + ( (ovalWidth * 2f) + horizontalSpacing),y + (1 * scale));
41
public static void paintTripletFeelNone8(TGPainter painter, int x, int y,float scale) {
42
float horizontalSpacing = (1.5f * scale);
43
float verticalSpacing = (2.5f * scale);
44
float ovalWidth = (1.33f * scale);
46
painter.initPath(TGPainter.PATH_FILL);
47
TGNotePainter.paintNote(painter,x, y + verticalSpacing , scale );
51
painter.moveTo( x + Math.round(ovalWidth) ,y + Math.round(verticalSpacing + (0.33f * scale)) );
52
painter.lineTo( x + Math.round(ovalWidth) ,y);
53
painter.lineTo( x + Math.round(ovalWidth + horizontalSpacing) ,y);
54
painter.lineTo( x + Math.round(ovalWidth + horizontalSpacing) ,y + Math.round(verticalSpacing + (0.33f * scale)) );
57
painter.initPath(TGPainter.PATH_FILL);
58
TGNotePainter.paintNote(painter,x + horizontalSpacing,y + verticalSpacing , scale );
62
public static int paintTripletFeel16(TGPainter painter, int x, int y,float scale) {
63
float topSpacing = (1.0f * scale);
64
float horizontalSpacing = (1.5f * scale);
65
float verticalSpacing = (2.5f * scale);
66
float ovalWidth = (1.33f * scale);
68
painter.initPath(TGPainter.PATH_FILL);
69
TGNotePainter.paintNote(painter,x,y + (topSpacing + verticalSpacing) , scale );
73
painter.moveTo(x + Math.round(ovalWidth) ,y + Math.round(topSpacing + verticalSpacing + (0.33f * scale)) );
74
painter.lineTo(x + Math.round(ovalWidth) ,y + topSpacing);
75
painter.lineTo(x + Math.round(ovalWidth + horizontalSpacing) ,y + topSpacing);
76
painter.lineTo(x + Math.round(ovalWidth + horizontalSpacing) ,y + Math.round(topSpacing + verticalSpacing + (0.33f * scale)) );
77
painter.moveTo(x + Math.round(ovalWidth + horizontalSpacing - (0.55f * scale) ) ,y + Math.round(topSpacing + (0.5f * scale)));
78
painter.lineTo(x + Math.round(ovalWidth + horizontalSpacing) ,y + Math.round(topSpacing + (0.5f * scale)));
81
painter.initPath(TGPainter.PATH_FILL);
82
TGNotePainter.paintNote(painter,x + horizontalSpacing,y + (topSpacing + verticalSpacing) , scale );
86
painter.moveTo( x,y + (1 * scale) );
87
painter.cubicTo( x,y + (1 * scale),x + ( ( (ovalWidth * 2f) + horizontalSpacing) / 2f),y + (-1*scale) ,x + ( (ovalWidth * 2f) + horizontalSpacing),y + (1 * scale));
90
return Math.round( (ovalWidth * 2f) + horizontalSpacing );
93
public static int paintTripletFeelNone16(TGPainter painter, int x, int y,float scale) {
94
float horizontalSpacing = (1.5f * scale);
95
float verticalSpacing = (2.5f * scale);
96
float ovalWidth = (1.33f * scale);
98
painter.initPath(TGPainter.PATH_FILL);
99
TGNotePainter.paintNote(painter,x,y + verticalSpacing , scale );
103
painter.moveTo(x + Math.round(ovalWidth) ,y + Math.round(verticalSpacing + (0.33f * scale)) );
104
painter.lineTo(x + Math.round(ovalWidth) ,y);
105
painter.lineTo(x + Math.round(ovalWidth + horizontalSpacing) ,y);
106
painter.lineTo(x + Math.round(ovalWidth + horizontalSpacing) ,y + Math.round(verticalSpacing + (0.33f * scale)) );
107
painter.moveTo(x + Math.round(ovalWidth) ,y + Math.round(0.5f * scale));
108
painter.lineTo(x + Math.round(ovalWidth + horizontalSpacing) ,y + Math.round(0.5f * scale));
111
painter.initPath(TGPainter.PATH_FILL);
112
TGNotePainter.paintNote(painter,x + horizontalSpacing,y + verticalSpacing , scale );
115
return Math.round( ovalWidth + horizontalSpacing );