diff options
author | Tiago Conceição <Tiago_caza@hotmail.com> | 2021-09-13 04:01:40 +0300 |
---|---|---|
committer | Tiago Conceição <Tiago_caza@hotmail.com> | 2021-09-13 04:01:40 +0300 |
commit | 00e0d4c9ff98dec651bb0fa2c3d96cae05142288 (patch) | |
tree | b2d896e16fa28b71c8543182abd16ab6991a8150 /UVtools.WPF/UserSettings.cs | |
parent | 43a3031af28f46c0c94dbd1e1d7ecec68adc792e (diff) |
Prepare UI for suction cup configuration
Diffstat (limited to 'UVtools.WPF/UserSettings.cs')
-rw-r--r-- | UVtools.WPF/UserSettings.cs | 53 |
1 files changed, 52 insertions, 1 deletions
diff --git a/UVtools.WPF/UserSettings.cs b/UVtools.WPF/UserSettings.cs index 4af050a..b834deb 100644 --- a/UVtools.WPF/UserSettings.cs +++ b/UVtools.WPF/UserSettings.cs @@ -226,7 +226,9 @@ namespace UVtools.WPF private Color _overhangColor = new(255, 255, 105, 180); private Color _overhangHighlightColor = new(255, 255, 20, 147); private Color _resinTrapColor = new(255, 255, 165, 0); - private Color _resinTrapHighlightColor = new(255, 244, 164, 96); + private Color _resinTrapHighlightColor = new(255, 244, 164, 96); + private Color _suctionCupColor = new(255, 229, 248, 255); + private Color _suctionCupHighlightColor = new(255, 189, 237, 255); private Color _touchingBoundsColor = new(255, 255, 0, 0); private Color _crosshairColor = new(255, 255, 0, 0); private bool _zoomToFitPrintVolumeBounds = true; @@ -608,6 +610,41 @@ namespace UVtools.WPF get => new(_resinTrapHighlightColor.ToAvalonia()); set => ResinTrapHighlightColor = new Color(value); } + + public Color SuctionCupColor + { + get => _suctionCupColor; + set + { + RaiseAndSetIfChanged(ref _suctionCupColor, value); + RaisePropertyChanged(nameof(SuctionCupBrush)); + } + } + + [XmlIgnore] + public SolidColorBrush SuctionCupBrush + { + get => new(_suctionCupColor.ToAvalonia()); + set => SuctionCupColor = new Color(value); + } + + public Color SuctionCupHighlightColor + { + get => _suctionCupHighlightColor; + set + { + RaiseAndSetIfChanged(ref _suctionCupHighlightColor, value); + RaisePropertyChanged(nameof(SuctionCupHighlightBrush)); + } + } + + [XmlIgnore] + public SolidColorBrush SuctionCupHighlightBrush + { + get => new(_suctionCupHighlightColor.ToAvalonia()); + set => SuctionCupHighlightColor = new Color(value); + } + public Color TouchingBoundsColor { get => _touchingBoundsColor; @@ -726,6 +763,7 @@ namespace UVtools.WPF private bool _computeIslands = true; private bool _computeOverhangs = true; private bool _computeResinTraps = true; + private bool _computeSuctionCups = true; private bool _computeTouchingBounds = true; private bool _computePrintHeight = true; private bool _computeEmptyLayers = true; @@ -743,6 +781,7 @@ namespace UVtools.WPF private byte _resinTrapRequiredAreaToProcessCheck = 17; private byte _resinTrapRequiredBlackPixelsToDrain = 10; private byte _resinTrapMaximumPixelBrightnessToDrain = 30; + private uint _suctionCupRequiredAreaToConsider = 1000; private byte _touchingBoundMinimumPixelBrightness = 127; private byte _touchingBoundMarginLeft = 5; private byte _touchingBoundMarginTop = 5; @@ -787,6 +826,12 @@ namespace UVtools.WPF set => RaiseAndSetIfChanged(ref _computeResinTraps, value); } + public bool ComputeSuctionCups + { + get => _computeSuctionCups; + set => RaiseAndSetIfChanged(ref _computeSuctionCups, value); + } + public bool ComputeTouchingBounds { get => _computeTouchingBounds; @@ -889,6 +934,12 @@ namespace UVtools.WPF set => RaiseAndSetIfChanged(ref _resinTrapMaximumPixelBrightnessToDrain, value); } + public uint SuctionCupRequiredAreaToConsider + { + get => _suctionCupRequiredAreaToConsider; + set => RaiseAndSetIfChanged(ref _suctionCupRequiredAreaToConsider, value); + } + public byte TouchingBoundMinimumPixelBrightness { get => _touchingBoundMinimumPixelBrightness; |