[chronojump] Encoder secondary variable circle diameter shorter on small drawingarea
- From: Xavier de Blas <xaviblas src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [chronojump] Encoder secondary variable circle diameter shorter on small drawingarea
- Date: Thu, 20 Feb 2020 12:33:23 +0000 (UTC)
commit e149815b179d3bc850bf1631d981059a94efbcd2
Author: Xavier de Blas <xaviblas gmail com>
Date: Thu Feb 20 11:13:08 2020 +0100
Encoder secondary variable circle diameter shorter on small drawingarea
src/gui/encoderGraphObjects.cs | 11 +++++++++--
1 file changed, 9 insertions(+), 2 deletions(-)
---
diff --git a/src/gui/encoderGraphObjects.cs b/src/gui/encoderGraphObjects.cs
index 84a2c736..ba682994 100644
--- a/src/gui/encoderGraphObjects.cs
+++ b/src/gui/encoderGraphObjects.cs
@@ -800,10 +800,17 @@ public class EncoderGraphDoPlot
//plot the secondary variable stuff
foreach(EncoderBarsSecondaryLine ebsl in encoderBarsSecondaryLine_l)
{
+ //12 is nice for 1920*1080, but for small screens that radius is too high
+ int diameter = 12;
+ if(graphWidth * graphHeight < 1000000)
+ diameter = 9;
+
+ //circle
pixmap.DrawArc(pen_yellow_encoder_capture, true,
- ebsl.current.X -6, ebsl.current.Y -6,
- 12, 12, 90 * 64, 360 * 64);
+ ebsl.current.X -diameter/2, ebsl.current.Y -diameter/2,
+ diameter, diameter, 90 * 64, 360 * 64);
+ //line
if(ebsl.pre.X != 0 && ebsl.pre.Y != 0)
pixmap.DrawLine(pen_yellow_encoder_capture, ebsl.pre.X, ebsl.pre.Y,
ebsl.current.X, ebsl.current.Y);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]