Fix 1px gap appearing in notes of certain lengths

This commit is contained in:
Jiiniasu committed 2016-04-12 21:19:42 +02:00
1 parent 989c7af2d2
commit 01e1ead0a4
1 file changed
+6 -1
+6 -1
View File
@@ -258,9 +258,14 @@ namespace VocaluxeLib.Menu.SingNotes
SRectF lastMidRect = new SRectF(middleRect.X + midCount * midW, noteRect.Y, middleRect.W - (midCount * midW), noteRect.H, noteRect.Z);
//gapAdjust fixes 1px empty gap appearing with certain note lengths.
float gapAdjust = 0f;
if (lastMidRect.W < 1)
gapAdjust = lastMidRect.W;
CBase.Drawing.DrawTexture(noteMiddle, new SRectF(middleRect.X + (midCount * midW), middleRect.Y, midW, middleRect.H, middleRect.Z), color, lastMidRect);
CBase.Drawing.DrawTexture(noteEnd, new SRectF(noteRect.X + noteRect.W - endsW, noteRect.Y, endsW, noteRect.H, noteRect.Z), color);
CBase.Drawing.DrawTexture(noteEnd, new SRectF(noteRect.X + noteRect.W - endsW - gapAdjust, noteRect.Y, endsW, noteRect.H, noteRect.Z), color);
}
private void _DrawNoteBase(SRectF rect, SColorF color, float factor)