Added the RenderPreference LINE_DASH_IMPROVEMENT_FACTOR
authorDaniel Kirschten <daniel.kirschten@gmx.de>
Mon, 18 May 2020 14:35:25 +0000 (16:35 +0200)
committerDaniel Kirschten <daniel.kirschten@gmx.de>
Mon, 18 May 2020 14:35:25 +0000 (16:35 +0200)
SWTHelper/bundles
plugins/net.mograsim.logic.model/src/net/mograsim/logic/model/LogicUICanvas.java
plugins/net.mograsim.logic.model/src/net/mograsim/logic/model/preferences/DefaultRenderPreferences.java [changed mode: 0755->0644]
plugins/net.mograsim.logic.model/src/net/mograsim/logic/model/preferences/RenderPreferences.java [changed mode: 0755->0644]

index 42cb88f..981a12a 160000 (submodule)
@@ -1 +1 @@
-Subproject commit 42cb88fa0fb6535fe86fa82663047c2fa49ca0f5
+Subproject commit 981a12a39592317688792fd06c7342203e051b8b
index aabe019..3af6c89 100644 (file)
@@ -4,7 +4,8 @@ import static net.mograsim.logic.model.preferences.RenderPreferences.ACTION_BUTT
 import static net.mograsim.logic.model.preferences.RenderPreferences.BACKGROUND_COLOR;
 import static net.mograsim.logic.model.preferences.RenderPreferences.DEBUG_HLSSHELL_DEPTH;
 import static net.mograsim.logic.model.preferences.RenderPreferences.DEBUG_OPEN_HLSSHELL;
-import static net.mograsim.logic.model.preferences.RenderPreferences.IMPROVE_TEXT;
+import static net.mograsim.logic.model.preferences.RenderPreferences.IMPROVE_SCALING;
+import static net.mograsim.logic.model.preferences.RenderPreferences.LINE_DASH_IMPROVEMENT_FACTOR;
 
 import java.util.ArrayList;
 import java.util.HashMap;
@@ -50,7 +51,7 @@ public class LogicUICanvas extends ZoomableCanvas
        public LogicUICanvas(Composite parent, int style, LogicModel model, RenderPreferences renderPrefs)
        {
                // TODO add a listener
-               super(parent, style, renderPrefs.getBoolean(IMPROVE_TEXT));
+               super(parent, style, renderPrefs.getBoolean(IMPROVE_SCALING), (float) renderPrefs.getDouble(LINE_DASH_IMPROVEMENT_FACTOR));
 
                this.renderPrefs = renderPrefs;
                this.model = model;
old mode 100755 (executable)
new mode 100644 (file)
index 9a97ae1..0a9e432
@@ -11,7 +11,7 @@ public class DefaultRenderPreferences extends DefaultPreferences implements Rend
        {
                switch (name)
                {
-               case IMPROVE_TEXT:
+               case IMPROVE_SCALING:
                        return true;
                case DEBUG_OPEN_HLSSHELL:
                        return false;
@@ -43,6 +43,8 @@ public class DefaultRenderPreferences extends DefaultPreferences implements Rend
        {
                switch (name)
                {
+               case LINE_DASH_IMPROVEMENT_FACTOR:
+                       return 100.0;
                case DEFAULT_LINE_WIDTH:
                        return 0.5;
                case WIRE_WIDTH_SINGLEBIT:
old mode 100755 (executable)
new mode 100644 (file)
index fd325c3..7f90988
@@ -6,7 +6,8 @@ public interface RenderPreferences extends Preferences
 {
        public static final String PREFIX = "net.mograsim.logic.model.";
 
-       public static final String IMPROVE_TEXT = PREFIX + "improvetext";
+       public static final String IMPROVE_SCALING = PREFIX + "improvescaling.enable";
+       public static final String LINE_DASH_IMPROVEMENT_FACTOR = PREFIX + "improvescaling.factor";
        public static final String TEXT_COLOR = PREFIX + "color.text";
        public static final String FOREGROUND_COLOR = PREFIX + "color.foreground";
        public static final String BACKGROUND_COLOR = PREFIX + "color.background";