File tree Expand file tree Collapse file tree 4 files changed +22
-2
lines changed
app/display/model/src/main
java/org/csstudio/display/builder/model Expand file tree Collapse file tree 4 files changed +22
-2
lines changed Original file line number Diff line number Diff line change @@ -37,6 +37,9 @@ public class Preferences
3737 @ Preference (name ="macros" ) private static String macro_spec ;
3838 /** Preference setting */
3939 @ Preference public static boolean enable_saved_on_comments ;
40+ /** Preference setting */
41+ @ Preference public static boolean enable_svg_rendering_resolution_factor ;
42+
4043 private static Macros macros ;
4144
4245 static
Original file line number Diff line number Diff line change 1515import java .util .List ;
1616
1717import org .csstudio .display .builder .model .Messages ;
18+ import org .csstudio .display .builder .model .Preferences ;
1819import org .csstudio .display .builder .model .Version ;
1920import org .csstudio .display .builder .model .Widget ;
2021import org .csstudio .display .builder .model .WidgetCategory ;
@@ -134,7 +135,10 @@ protected void defineProperties(final List<WidgetProperty<?>> properties)
134135 properties .add (stretch_image = propStretch .createProperty (this , false ));
135136 properties .add (rotation = propRotation .createProperty (this , 0.0 ));
136137 properties .add (opacity = propOpacity .createProperty (this , 1.0 ));
137- properties .add (svgRenderingResolutionFactor = propSVGRenderingResolutionFactor .createProperty (this , 1.0 ));
138+ svgRenderingResolutionFactor = propSVGRenderingResolutionFactor .createProperty (this , 1.0 );
139+ if (Preferences .enable_svg_rendering_resolution_factor ) {
140+ properties .add (svgRenderingResolutionFactor );
141+ }
138142 }
139143
140144 /** @return 'rotation' property */
Original file line number Diff line number Diff line change 2525
2626import org .csstudio .display .builder .model .ArrayWidgetProperty ;
2727import org .csstudio .display .builder .model .Messages ;
28+ import org .csstudio .display .builder .model .Preferences ;
2829import org .csstudio .display .builder .model .Version ;
2930import org .csstudio .display .builder .model .Widget ;
3031import org .csstudio .display .builder .model .WidgetCategory ;
@@ -252,7 +253,12 @@ protected void defineProperties ( final List<WidgetProperty<?>> properties ) {
252253 properties .add (enabled = propEnabled .createProperty (this , true ));
253254 properties .add (preserve_ratio = propPreserveRatio .createProperty (this , true ));
254255 properties .add (fallbackSymbol = propFallbackSymbol .createProperty (this , DEFAULT_SYMBOL ));
255- properties .add (svgRenderingResolutionFactor = propSVGRenderingResolutionFactor .createProperty (this , 1.0 ));
256+
257+ svgRenderingResolutionFactor = propSVGRenderingResolutionFactor .createProperty (this , 1.0 );
258+ if (Preferences .enable_svg_rendering_resolution_factor ) {
259+ properties .add (svgRenderingResolutionFactor );
260+ }
261+
256262 WidgetColor alarmInvalidColor =
257263 WidgetColorService .getColor (NamedWidgetColors .ALARM_INVALID );
258264 WidgetColor defaultDisconnectedOverlayColor =
Original file line number Diff line number Diff line change @@ -88,3 +88,10 @@ skip_defaults=true
8888
8989# Add a comment containing the date, time, and username when saving an OPI in the Display Editor.
9090enable_saved_on_comments =true
91+
92+ # Enable the "SVG Rendering Resolution Factor" widget property to the Symbol and Picture widgets.
93+ # This functionality can enable a sharper image when zooming in, at the expense of a quadratic
94+ # increase in memory consumption. E.g., by setting the SVG rendering resolution factor to 2.0, an
95+ # SVG can be rendered at twice the width and twice the height, but the memory required to
96+ # represent the image grows by a factor of four.
97+ org.csstudio.display.builder.model/enable_svg_rendering_resolution_factor =false
You can’t perform that action at this time.
0 commit comments