mirror of
https://github.com/DarthAffe/KeyboardAudioVisualizer.git
synced 2026-11-09 12:06:26 +00:00
Fixed a render bug in the gradient editor
This commit is contained in:
1 parent
940d2eb631
commit
1cef641c62
1 file changed
+3
-2
@@ -171,8 +171,9 @@ namespace KeyboardAudioVisualizer.Controls
|
|||||||
Color.FromArgb(endColor.A, endColor.R, endColor.G, endColor.B),
|
Color.FromArgb(endColor.A, endColor.R, endColor.G, endColor.B),
|
||||||
new Point(0, 0.5), new Point(1, 0.5));
|
new Point(0, 0.5), new Point(1, 0.5));
|
||||||
|
|
||||||
Canvas.SetLeft(rect, referenceWidth * from.Clamp(0, 1));
|
//DarthAffe 09.02.2018: Forced rounding to prevent render issues on resize
|
||||||
rect.Width = referenceWidth * (to.Clamp(0, 1) - from.Clamp(0, 1));
|
Canvas.SetLeft(rect, Math.Floor(referenceWidth * from.Clamp(0, 1)));
|
||||||
|
rect.Width = Math.Ceiling(referenceWidth * (to.Clamp(0, 1) - from.Clamp(0, 1)));
|
||||||
|
|
||||||
Canvas.SetTop(rect, 0);
|
Canvas.SetTop(rect, 0);
|
||||||
rect.Height = referenceHeight;
|
rect.Height = referenceHeight;
|
||||||
|
|||||||
Reference in new issue
Block a user