mirror of
https://github.com/Artemis-RGB/Artemis
synced 2026-11-11 03:19:56 +00:00
Signitifantly reduced build size
Updated project folder names Show only selected layer in visualization Added rectangle support
This commit is contained in:
1 parent
8dc15f6894
commit
2f8671045c
52 files changed
+373
-633
No files matched your search
@@ -12,28 +12,11 @@
|
||||
<AssemblyName>Artemis.Core</AssemblyName>
|
||||
<TargetFrameworkVersion>v4.7.2</TargetFrameworkVersion>
|
||||
<FileAlignment>512</FileAlignment>
|
||||
<ShouldIncludeNativeSkiaSharp>false</ShouldIncludeNativeSkiaSharp>
|
||||
<NuGetPackageImportStamp>
|
||||
</NuGetPackageImportStamp>
|
||||
<TargetFrameworkProfile />
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<DebugType>full</DebugType>
|
||||
<Optimize>false</Optimize>
|
||||
<OutputPath>bin\Debug\</OutputPath>
|
||||
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<LangVersion>7</LangVersion>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<Optimize>true</Optimize>
|
||||
<OutputPath>bin\Release\</OutputPath>
|
||||
<DefineConstants>TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x64'">
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<OutputPath>bin\x64\Debug\</OutputPath>
|
||||
|
||||
@@ -107,6 +107,9 @@ namespace Artemis.Core.Models.Profile.LayerShapes
|
||||
|
||||
public SKRect GetUnscaledRectangle()
|
||||
{
|
||||
if (!Layer.Leds.Any())
|
||||
return SKRect.Empty;
|
||||
|
||||
var x = Layer.Leds.Min(l => l.RgbLed.AbsoluteLedRectangle.Location.X);
|
||||
var y = Layer.Leds.Min(l => l.RgbLed.AbsoluteLedRectangle.Location.Y);
|
||||
var width = Layer.Leds.Max(l => l.RgbLed.AbsoluteLedRectangle.Location.X + l.RgbLed.AbsoluteLedRectangle.Size.Width) - x;
|
||||
|
||||
@@ -15,22 +15,25 @@
|
||||
<NuGetPackageImportStamp>
|
||||
</NuGetPackageImportStamp>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x64'">
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<DebugType>full</DebugType>
|
||||
<Optimize>false</Optimize>
|
||||
<OutputPath>bin\Debug\</OutputPath>
|
||||
<OutputPath>bin\x64\Debug\</OutputPath>
|
||||
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
||||
<DebugType>full</DebugType>
|
||||
<PlatformTarget>x64</PlatformTarget>
|
||||
<LangVersion>7.3</LangVersion>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<Optimize>true</Optimize>
|
||||
<OutputPath>bin\Release\</OutputPath>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x64'">
|
||||
<OutputPath>bin\x64\Release\</OutputPath>
|
||||
<DefineConstants>TRACE</DefineConstants>
|
||||
<Optimize>true</Optimize>
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<PlatformTarget>x64</PlatformTarget>
|
||||
<LangVersion>7.3</LangVersion>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="RGB.NET.Core">
|
||||
|
||||
@@ -13,22 +13,25 @@
|
||||
<FileAlignment>512</FileAlignment>
|
||||
<Deterministic>true</Deterministic>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x64'">
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<DebugType>full</DebugType>
|
||||
<Optimize>false</Optimize>
|
||||
<OutputPath>bin\Debug\</OutputPath>
|
||||
<OutputPath>bin\x64\Debug\</OutputPath>
|
||||
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
||||
<DebugType>full</DebugType>
|
||||
<PlatformTarget>x64</PlatformTarget>
|
||||
<LangVersion>7.3</LangVersion>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<Optimize>true</Optimize>
|
||||
<OutputPath>bin\Release\</OutputPath>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x64'">
|
||||
<OutputPath>bin\x64\Release\</OutputPath>
|
||||
<DefineConstants>TRACE</DefineConstants>
|
||||
<Optimize>true</Optimize>
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<PlatformTarget>x64</PlatformTarget>
|
||||
<LangVersion>7.3</LangVersion>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="RGB.NET.Core">
|
||||
@@ -54,6 +57,7 @@
|
||||
<ProjectReference Include="..\Artemis.Core\Artemis.Core.csproj">
|
||||
<Project>{9B811F9B-86B9-4771-87AF-72BAE7078A36}</Project>
|
||||
<Name>Artemis.Core</Name>
|
||||
<Private>False</Private>
|
||||
</ProjectReference>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
|
||||
@@ -13,22 +13,25 @@
|
||||
<FileAlignment>512</FileAlignment>
|
||||
<Deterministic>true</Deterministic>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x64'">
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<DebugType>full</DebugType>
|
||||
<Optimize>false</Optimize>
|
||||
<OutputPath>bin\Debug\</OutputPath>
|
||||
<OutputPath>bin\x64\Debug\</OutputPath>
|
||||
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
||||
<DebugType>full</DebugType>
|
||||
<PlatformTarget>x64</PlatformTarget>
|
||||
<LangVersion>7.3</LangVersion>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<Optimize>true</Optimize>
|
||||
<OutputPath>bin\Release\</OutputPath>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x64'">
|
||||
<OutputPath>bin\x64\Release\</OutputPath>
|
||||
<DefineConstants>TRACE</DefineConstants>
|
||||
<Optimize>true</Optimize>
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<PlatformTarget>x64</PlatformTarget>
|
||||
<LangVersion>7.3</LangVersion>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="RGB.NET.Core">
|
||||
@@ -59,6 +62,7 @@
|
||||
<ProjectReference Include="..\Artemis.Core\Artemis.Core.csproj">
|
||||
<Project>{9b811f9b-86b9-4771-87af-72bae7078a36}</Project>
|
||||
<Name>Artemis.Core</Name>
|
||||
<Private>False</Private>
|
||||
</ProjectReference>
|
||||
</ItemGroup>
|
||||
<ItemGroup />
|
||||
|
||||
+16
-13
@@ -12,27 +12,30 @@
|
||||
<TargetFrameworkVersion>v4.7.2</TargetFrameworkVersion>
|
||||
<FileAlignment>512</FileAlignment>
|
||||
<Deterministic>true</Deterministic>
|
||||
<ShouldIncludeNativeSkiaSharp>false</ShouldIncludeNativeSkiaSharp>
|
||||
<TargetFrameworkProfile />
|
||||
<NuGetPackageImportStamp>
|
||||
</NuGetPackageImportStamp>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x64'">
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<DebugType>full</DebugType>
|
||||
<Optimize>false</Optimize>
|
||||
<OutputPath>bin\Debug\</OutputPath>
|
||||
<OutputPath>bin\x64\Debug\</OutputPath>
|
||||
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<DebugType>full</DebugType>
|
||||
<PlatformTarget>x64</PlatformTarget>
|
||||
<LangVersion>7</LangVersion>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<Optimize>true</Optimize>
|
||||
<OutputPath>bin\Release\</OutputPath>
|
||||
<DefineConstants>TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x64'">
|
||||
<OutputPath>bin\x64\Release\</OutputPath>
|
||||
<DefineConstants>TRACE</DefineConstants>
|
||||
<Optimize>true</Optimize>
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<PlatformTarget>x64</PlatformTarget>
|
||||
<LangVersion>7.3</LangVersion>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="MaterialDesignColors, Version=1.2.0.325, Culture=neutral, processorArchitecture=MSIL">
|
||||
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
+16
-13
@@ -12,27 +12,30 @@
|
||||
<TargetFrameworkVersion>v4.7.2</TargetFrameworkVersion>
|
||||
<FileAlignment>512</FileAlignment>
|
||||
<Deterministic>true</Deterministic>
|
||||
<ShouldIncludeNativeSkiaSharp>false</ShouldIncludeNativeSkiaSharp>
|
||||
<TargetFrameworkProfile />
|
||||
<NuGetPackageImportStamp>
|
||||
</NuGetPackageImportStamp>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x64'">
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<DebugType>full</DebugType>
|
||||
<Optimize>false</Optimize>
|
||||
<OutputPath>bin\Debug\</OutputPath>
|
||||
<OutputPath>bin\x64\Debug\</OutputPath>
|
||||
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<DebugType>full</DebugType>
|
||||
<PlatformTarget>x64</PlatformTarget>
|
||||
<LangVersion>7</LangVersion>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<Optimize>true</Optimize>
|
||||
<OutputPath>bin\Release\</OutputPath>
|
||||
<DefineConstants>TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x64'">
|
||||
<OutputPath>bin\x64\Release\</OutputPath>
|
||||
<DefineConstants>TRACE</DefineConstants>
|
||||
<Optimize>true</Optimize>
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<PlatformTarget>x64</PlatformTarget>
|
||||
<LangVersion>7.3</LangVersion>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="MaterialDesignColors, Version=1.2.0.325, Culture=neutral, processorArchitecture=MSIL">
|
||||
File renamed without changes.
File renamed without changes.
File renamed without changes.
@@ -0,0 +1,140 @@
|
||||
<UserControl x:Class="Artemis.Plugins.LayerBrushes.Noise.NoiseBrushView"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:artemis="clr-namespace:Artemis.UI.Shared;assembly=Artemis.UI.Shared"
|
||||
xmlns:converters="clr-namespace:Artemis.UI.Shared.Converters;assembly=Artemis.UI.Shared"
|
||||
xmlns:noiseBrush="clr-namespace:Artemis.Plugins.LayerBrushes.Noise"
|
||||
mc:Ignorable="d"
|
||||
d:DesignHeight="450" d:DesignWidth="800"
|
||||
d:DataContext="{d:DesignInstance {x:Type noiseBrush:NoiseBrushViewModel}}">
|
||||
<!-- <UserControl.Resources> -->
|
||||
<!-- <ResourceDictionary> -->
|
||||
<!-- <ResourceDictionary.MergedDictionaries> -->
|
||||
<!-- <ResourceDictionary Source="pack://application:,,,/MaterialDesignThemes.Wpf;component/Themes/MaterialDesignTheme.Defaults.xaml" /> -->
|
||||
<!-- </ResourceDictionary.MergedDictionaries> -->
|
||||
<!-- <converters:SKColorToColorConverter x:Key="SKColorToColorConverter" /> -->
|
||||
<!-- </ResourceDictionary> -->
|
||||
<!-- </UserControl.Resources> -->
|
||||
<!-- -->
|
||||
<!-- <Grid Margin="12"> -->
|
||||
<!-- <Grid.RowDefinitions> -->
|
||||
<!-- <RowDefinition Height="Auto" /> -->
|
||||
<!-- <RowDefinition Height="Auto" /> -->
|
||||
<!-- <RowDefinition Height="Auto" /> -->
|
||||
<!-- <RowDefinition Height="Auto" /> -->
|
||||
<!-- <RowDefinition Height="Auto" /> -->
|
||||
<!-- <RowDefinition Height="Auto" /> -->
|
||||
<!-- </Grid.RowDefinitions> -->
|
||||
<!-- -->
|
||||
<!-- <Grid Grid.Row="0"> -->
|
||||
<!-- <Grid.RowDefinitions> -->
|
||||
<!-- <RowDefinition /> -->
|
||||
<!-- <RowDefinition /> -->
|
||||
<!-- </Grid.RowDefinitions> -->
|
||||
<!-- <Grid.ColumnDefinitions> -->
|
||||
<!-- <ColumnDefinition Width="*" /> -->
|
||||
<!-- <ColumnDefinition Width="Auto" /> -->
|
||||
<!-- </Grid.ColumnDefinitions> -->
|
||||
<!-- <StackPanel Grid.Column="0" VerticalAlignment="Center"> -->
|
||||
<!-- <TextBlock Style="{StaticResource MaterialDesignBody1TextBlock}" Text="Noise color" /> -->
|
||||
<!-- </StackPanel> -->
|
||||
<!-- <StackPanel Grid.Row="0" Grid.Column="1" VerticalAlignment="Center"> -->
|
||||
<!-- <artemis:ColorPicker Color="{Binding Brush.Settings.Color, Converter={StaticResource SKColorToColorConverter}}" Width="100" /> -->
|
||||
<!-- </StackPanel> -->
|
||||
<!-- <Separator Grid.Row="1" Grid.Column="0" Grid.ColumnSpan="2" Style="{StaticResource MaterialDesignSeparator}" /> -->
|
||||
<!-- </Grid> -->
|
||||
<!-- -->
|
||||
<!-- <Grid Grid.Row="1"> -->
|
||||
<!-- <Grid.RowDefinitions> -->
|
||||
<!-- <RowDefinition /> -->
|
||||
<!-- <RowDefinition /> -->
|
||||
<!-- </Grid.RowDefinitions> -->
|
||||
<!-- <Grid.ColumnDefinitions> -->
|
||||
<!-- <ColumnDefinition Width="*" /> -->
|
||||
<!-- <ColumnDefinition Width="Auto" /> -->
|
||||
<!-- </Grid.ColumnDefinitions> -->
|
||||
<!-- <StackPanel Grid.Column="0" VerticalAlignment="Center"> -->
|
||||
<!-- <TextBlock Style="{StaticResource MaterialDesignBody1TextBlock}"> -->
|
||||
<!-- <Run Text="Blend mode" /> -->
|
||||
<!-- </TextBlock> -->
|
||||
<!-- <TextBlock Style="{StaticResource MaterialDesignBody1TextBlock}" Foreground="{DynamicResource MaterialDesignCheckBoxDisabled}"> -->
|
||||
<!-- <Run Text="Affects how the noise is rendered on the rest of the layer" /> -->
|
||||
<!-- </TextBlock> -->
|
||||
<!-- </StackPanel> -->
|
||||
<!-- <StackPanel Grid.Row="0" Grid.Column="1" VerticalAlignment="Center"> -->
|
||||
<!-- <ComboBox HorizontalAlignment="Left" -->
|
||||
<!-- ItemsSource="{Binding BlendModes}" -->
|
||||
<!-- SelectedValuePath="Value" -->
|
||||
<!-- DisplayMemberPath="Description" -->
|
||||
<!-- Width="100" -->
|
||||
<!-- SelectedValue="{Binding Brush.Settings.BlendMode}" /> -->
|
||||
<!-- </StackPanel> -->
|
||||
<!-- <Separator Grid.Row="1" Grid.Column="0" Grid.ColumnSpan="2" Style="{StaticResource MaterialDesignSeparator}" /> -->
|
||||
<!-- </Grid> -->
|
||||
<!-- -->
|
||||
<!-- <Grid Grid.Row="2"> -->
|
||||
<!-- <Grid.RowDefinitions> -->
|
||||
<!-- <RowDefinition /> -->
|
||||
<!-- <RowDefinition /> -->
|
||||
<!-- </Grid.RowDefinitions> -->
|
||||
<!-- <Grid.ColumnDefinitions> -->
|
||||
<!-- <ColumnDefinition Width="*" /> -->
|
||||
<!-- <ColumnDefinition Width="Auto" /> -->
|
||||
<!-- </Grid.ColumnDefinitions> -->
|
||||
<!-- <StackPanel Grid.Column="0" VerticalAlignment="Center"> -->
|
||||
<!-- <TextBlock Style="{StaticResource MaterialDesignBody1TextBlock}"> -->
|
||||
<!-- <Run Text="X Scale" /> -->
|
||||
<!-- </TextBlock> -->
|
||||
<!-- </StackPanel> -->
|
||||
<!-- <StackPanel Grid.Row="0" Grid.Column="1" VerticalAlignment="Center"> -->
|
||||
<!-- <Slider Orientation="Horizontal" TickFrequency="0.5" Minimum="0.5" Maximum="40" Value="{Binding Brush.Settings.XScale}" Width="100" /> -->
|
||||
<!-- </StackPanel> -->
|
||||
<!-- <Separator Grid.Row="1" Grid.Column="0" Grid.ColumnSpan="2" Style="{StaticResource MaterialDesignSeparator}" /> -->
|
||||
<!-- </Grid> -->
|
||||
<!-- -->
|
||||
<!-- ~1~ Sample 1 @1@ -->
|
||||
<!-- <Grid Grid.Row="3"> -->
|
||||
<!-- <Grid.RowDefinitions> -->
|
||||
<!-- <RowDefinition /> -->
|
||||
<!-- <RowDefinition /> -->
|
||||
<!-- </Grid.RowDefinitions> -->
|
||||
<!-- <Grid.ColumnDefinitions> -->
|
||||
<!-- <ColumnDefinition Width="*" /> -->
|
||||
<!-- <ColumnDefinition Width="Auto" /> -->
|
||||
<!-- </Grid.ColumnDefinitions> -->
|
||||
<!-- <StackPanel Grid.Column="0" VerticalAlignment="Center"> -->
|
||||
<!-- <TextBlock Style="{StaticResource MaterialDesignBody1TextBlock}"> -->
|
||||
<!-- <Run Text="Y Scale" /> -->
|
||||
<!-- </TextBlock> -->
|
||||
<!-- </StackPanel> -->
|
||||
<!-- <StackPanel Grid.Row="0" Grid.Column="1" VerticalAlignment="Center"> -->
|
||||
<!-- <Slider Orientation="Horizontal" TickFrequency="0.5" Minimum="0.5" Maximum="40" Value="{Binding Brush.Settings.YScale}" Width="100" /> -->
|
||||
<!-- </StackPanel> -->
|
||||
<!-- <Separator Grid.Row="1" Grid.Column="0" Grid.ColumnSpan="2" Style="{StaticResource MaterialDesignSeparator}" /> -->
|
||||
<!-- </Grid> -->
|
||||
<!-- -->
|
||||
<!-- ~1~ Setting 2 @1@ -->
|
||||
<!-- <Grid Grid.Row="4"> -->
|
||||
<!-- <Grid.RowDefinitions> -->
|
||||
<!-- <RowDefinition /> -->
|
||||
<!-- <RowDefinition /> -->
|
||||
<!-- </Grid.RowDefinitions> -->
|
||||
<!-- <Grid.ColumnDefinitions> -->
|
||||
<!-- <ColumnDefinition Width="*" /> -->
|
||||
<!-- <ColumnDefinition Width="Auto" /> -->
|
||||
<!-- </Grid.ColumnDefinitions> -->
|
||||
<!-- <StackPanel Grid.Column="0" VerticalAlignment="Center"> -->
|
||||
<!-- <TextBlock Style="{StaticResource MaterialDesignBody1TextBlock}"> -->
|
||||
<!-- <Run Text="Animation speed" /> -->
|
||||
<!-- </TextBlock> -->
|
||||
<!-- </StackPanel> -->
|
||||
<!-- <StackPanel Grid.Row="0" Grid.Column="1" VerticalAlignment="Center"> -->
|
||||
<!-- -->
|
||||
<!-- <Slider Orientation="Horizontal" TickFrequency="1" Minimum="1" Maximum="100" Value="{Binding Brush.Settings.AnimationSpeed}" Width="100" /> -->
|
||||
<!-- </StackPanel> -->
|
||||
<!-- <Separator Grid.Row="1" Grid.Column="0" Grid.ColumnSpan="2" Style="{StaticResource MaterialDesignSeparator}" /> -->
|
||||
<!-- </Grid> -->
|
||||
<!-- </Grid> -->
|
||||
</UserControl>
|
||||
File renamed without changes.
+1
-1
@@ -9,7 +9,7 @@ using System.Runtime.InteropServices;
|
||||
[assembly: AssemblyDescription("")]
|
||||
[assembly: AssemblyConfiguration("")]
|
||||
[assembly: AssemblyCompany("")]
|
||||
[assembly: AssemblyProduct("Artemis.Plugins.LayerElements.Noise")]
|
||||
[assembly: AssemblyProduct("Artemis.Plugins.LayerBrushes.Noise")]
|
||||
[assembly: AssemblyCopyright("Copyright © 2019")]
|
||||
[assembly: AssemblyTrademark("")]
|
||||
[assembly: AssemblyCulture("")]
|
||||
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
@@ -1,26 +0,0 @@
|
||||
using Artemis.Core.Plugins.LayerElement;
|
||||
using Artemis.Core.Plugins.Models;
|
||||
|
||||
namespace Artemis.Plugins.LayerElements.Animations
|
||||
{
|
||||
public class AnimationBrushProvider : BrushProvider
|
||||
{
|
||||
public AnimationBrushProvider(PluginInfo pluginInfo) : base(pluginInfo)
|
||||
{
|
||||
AddLayerElementDescriptor<SlideLayerElement>("Slide animation", "A sliding animation", "ArrowAll");
|
||||
AddLayerElementDescriptor<RotationLayerElement>("Rotation animation", "A rotation animation", "CropRotate");
|
||||
}
|
||||
|
||||
public override void Dispose()
|
||||
{
|
||||
}
|
||||
|
||||
public override void EnablePlugin()
|
||||
{
|
||||
}
|
||||
|
||||
public override void DisablePlugin()
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
||||
-92
@@ -1,92 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
|
||||
<PropertyGroup>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||
<ProjectGuid>{6FE5DED5-D62E-4811-985F-644124FCEEFE}</ProjectGuid>
|
||||
<OutputType>Library</OutputType>
|
||||
<AppDesignerFolder>Properties</AppDesignerFolder>
|
||||
<RootNamespace>Artemis.Plugins.LayerElements.Animations</RootNamespace>
|
||||
<AssemblyName>Artemis.Plugins.LayerElements.Animations</AssemblyName>
|
||||
<TargetFrameworkVersion>v4.7.2</TargetFrameworkVersion>
|
||||
<FileAlignment>512</FileAlignment>
|
||||
<Deterministic>true</Deterministic>
|
||||
<NuGetPackageImportStamp>
|
||||
</NuGetPackageImportStamp>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<DebugType>full</DebugType>
|
||||
<Optimize>false</Optimize>
|
||||
<OutputPath>bin\Debug\</OutputPath>
|
||||
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<Optimize>true</Optimize>
|
||||
<OutputPath>bin\Release\</OutputPath>
|
||||
<DefineConstants>TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="SkiaSharp, Version=1.68.0.0, Culture=neutral, PublicKeyToken=0738eb9f132ed756, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\SkiaSharp.1.68.1\lib\net45\SkiaSharp.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.Buffers, Version=4.0.3.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\System.Buffers.4.5.0\lib\netstandard2.0\System.Buffers.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.Core" />
|
||||
<Reference Include="System.Memory, Version=4.0.1.1, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\System.Memory.4.5.3\lib\netstandard2.0\System.Memory.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.Numerics" />
|
||||
<Reference Include="System.Numerics.Vectors, Version=4.1.4.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\System.Numerics.Vectors.4.5.0\lib\net46\System.Numerics.Vectors.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.Runtime.CompilerServices.Unsafe, Version=4.0.5.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\System.Runtime.CompilerServices.Unsafe.4.6.0\lib\netstandard2.0\System.Runtime.CompilerServices.Unsafe.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.Xml.Linq" />
|
||||
<Reference Include="System.Data.DataSetExtensions" />
|
||||
<Reference Include="Microsoft.CSharp" />
|
||||
<Reference Include="System.Data" />
|
||||
<Reference Include="System.Net.Http" />
|
||||
<Reference Include="System.Xml" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="AnimationBrushProvider.cs" />
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
<Compile Include="RotationLayerElement.cs" />
|
||||
<Compile Include="SlideLayerElement.cs" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\Artemis.Core\Artemis.Core.csproj">
|
||||
<Project>{9b811f9b-86b9-4771-87af-72bae7078a36}</Project>
|
||||
<Name>Artemis.Core</Name>
|
||||
</ProjectReference>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="app.config" />
|
||||
<None Include="packages.config" />
|
||||
<None Include="plugin.json">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</None>
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||
<Import Project="..\packages\SkiaSharp.1.68.1\build\net45\SkiaSharp.targets" Condition="Exists('..\packages\SkiaSharp.1.68.1\build\net45\SkiaSharp.targets')" />
|
||||
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
|
||||
<PropertyGroup>
|
||||
<ErrorText>This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText>
|
||||
</PropertyGroup>
|
||||
<Error Condition="!Exists('..\packages\SkiaSharp.1.68.1\build\net45\SkiaSharp.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\SkiaSharp.1.68.1\build\net45\SkiaSharp.targets'))" />
|
||||
</Target>
|
||||
<PropertyGroup>
|
||||
<PostBuildEvent>echo Copying plugin to Artemis.UI output directory
|
||||
XCOPY "$(TargetDir.TrimEnd('\'))" "$(SolutionDir)\Artemis.UI\$(OutDir)Plugins\$(ProjectName)" /s /q /i /y</PostBuildEvent>
|
||||
</PropertyGroup>
|
||||
</Project>
|
||||
@@ -1,36 +0,0 @@
|
||||
using System.Reflection;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
// General Information about an assembly is controlled through the following
|
||||
// set of attributes. Change these attribute values to modify the information
|
||||
// associated with an assembly.
|
||||
[assembly: AssemblyTitle("Artemis.Plugins.LayerElements.Animations")]
|
||||
[assembly: AssemblyDescription("")]
|
||||
[assembly: AssemblyConfiguration("")]
|
||||
[assembly: AssemblyCompany("")]
|
||||
[assembly: AssemblyProduct("Artemis.Plugins.LayerElements.Animations")]
|
||||
[assembly: AssemblyCopyright("Copyright © 2019")]
|
||||
[assembly: AssemblyTrademark("")]
|
||||
[assembly: AssemblyCulture("")]
|
||||
|
||||
// Setting ComVisible to false makes the types in this assembly not visible
|
||||
// to COM components. If you need to access a type in this assembly from
|
||||
// COM, set the ComVisible attribute to true on that type.
|
||||
[assembly: ComVisible(false)]
|
||||
|
||||
// The following GUID is for the ID of the typelib if this project is exposed to COM
|
||||
[assembly: Guid("6fe5ded5-d62e-4811-985f-644124fceefe")]
|
||||
|
||||
// Version information for an assembly consists of the following four values:
|
||||
//
|
||||
// Major Version
|
||||
// Minor Version
|
||||
// Build Number
|
||||
// Revision
|
||||
//
|
||||
// You can specify all the values or you can default the Build and Revision Numbers
|
||||
// by using the '*' as shown below:
|
||||
// [assembly: AssemblyVersion("1.0.*")]
|
||||
[assembly: AssemblyVersion("1.0.0.0")]
|
||||
[assembly: AssemblyFileVersion("1.0.0.0")]
|
||||
@@ -1,34 +0,0 @@
|
||||
using System;
|
||||
using Artemis.Core.Models.Profile;
|
||||
using Artemis.Core.Plugins.LayerElement;
|
||||
using SkiaSharp;
|
||||
|
||||
namespace Artemis.Plugins.LayerElements.Animations
|
||||
{
|
||||
public class RotationLayerElement : LayerElement
|
||||
{
|
||||
public RotationLayerElement(Layer layer, Guid guid, BrushSettings settings, BrushDescriptor descriptor) : base(layer, guid, settings, descriptor)
|
||||
{
|
||||
}
|
||||
|
||||
public float Rotation { get; set; }
|
||||
|
||||
public override BrushViewModel GetViewModel()
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
public override void Update(double deltaTime)
|
||||
{
|
||||
Rotation += (float) (deltaTime * 100);
|
||||
if (Rotation > 360)
|
||||
Rotation = 0;
|
||||
}
|
||||
|
||||
public override void RenderPreProcess(SKPath framePath, SKCanvas canvas)
|
||||
{
|
||||
canvas.RotateDegrees(Rotation, Layer.RenderRectangle.MidX, Layer.RenderRectangle.MidY);
|
||||
framePath.Transform(SKMatrix.MakeRotationDegrees(Rotation * -1, Layer.RenderRectangle.MidX, Layer.RenderRectangle.MidY));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,34 +0,0 @@
|
||||
using System;
|
||||
using Artemis.Core.Models.Profile;
|
||||
using Artemis.Core.Plugins.LayerElement;
|
||||
using SkiaSharp;
|
||||
|
||||
namespace Artemis.Plugins.LayerElements.Animations
|
||||
{
|
||||
public class SlideLayerElement : LayerElement
|
||||
{
|
||||
public SlideLayerElement(Layer layer, Guid guid, BrushSettings settings, BrushDescriptor descriptor) : base(layer, guid, settings, descriptor)
|
||||
{
|
||||
}
|
||||
|
||||
public int MovePercentage { get; set; }
|
||||
|
||||
public override BrushViewModel GetViewModel()
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
public override void Update(double deltaTime)
|
||||
{
|
||||
MovePercentage++;
|
||||
if (MovePercentage > 100)
|
||||
MovePercentage = 0;
|
||||
}
|
||||
|
||||
public override void RenderPreProcess(SKPath framePath, SKCanvas canvas)
|
||||
{
|
||||
canvas.Translate(Layer.RenderRectangle.Width / 100 * MovePercentage * -1, 0);
|
||||
framePath.Transform(SKMatrix.MakeTranslation(Layer.RenderRectangle.Width / 100 * MovePercentage, 0));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,35 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<configuration>
|
||||
<runtime>
|
||||
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="System.Numerics.Vectors" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-4.1.4.0" newVersion="4.1.4.0" />
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="System.Runtime.CompilerServices.Unsafe" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-4.0.5.0" newVersion="4.0.5.0" />
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="System.Buffers" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-4.0.3.0" newVersion="4.0.3.0" />
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="System.Reflection.Metadata" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-1.4.4.0" newVersion="1.4.4.0" />
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="System.Collections.Immutable" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-1.2.4.0" newVersion="1.2.4.0" />
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="Ninject" publicKeyToken="c7192dc5380945e7" culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-3.3.4.0" newVersion="3.3.4.0" />
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="System.ValueTuple" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-4.0.3.0" newVersion="4.0.3.0" />
|
||||
</dependentAssembly>
|
||||
</assemblyBinding>
|
||||
</runtime>
|
||||
</configuration>
|
||||
@@ -1,8 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<packages>
|
||||
<package id="SkiaSharp" version="1.68.1" targetFramework="net472" />
|
||||
<package id="System.Buffers" version="4.5.0" targetFramework="net472" />
|
||||
<package id="System.Memory" version="4.5.3" targetFramework="net472" />
|
||||
<package id="System.Numerics.Vectors" version="4.5.0" targetFramework="net472" />
|
||||
<package id="System.Runtime.CompilerServices.Unsafe" version="4.6.0" targetFramework="net472" />
|
||||
</packages>
|
||||
@@ -1,10 +0,0 @@
|
||||
{
|
||||
"Guid": "a3b94380-6592-44f9-8717-3053ca9b4799",
|
||||
"Name": "Animation layer elements",
|
||||
"Version": {
|
||||
"Major": 1,
|
||||
"Minor": 0,
|
||||
"Build": 0
|
||||
},
|
||||
"Main": "Artemis.Plugins.LayerElements.Animations.dll"
|
||||
}
|
||||
@@ -1,140 +0,0 @@
|
||||
<UserControl x:Class="Artemis.Plugins.LayerBrushes.Noise.NoiseBrushView"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:artemis="clr-namespace:Artemis.UI.Shared;assembly=Artemis.UI.Shared"
|
||||
xmlns:converters="clr-namespace:Artemis.UI.Shared.Converters;assembly=Artemis.UI.Shared"
|
||||
xmlns:noiseBrush="clr-namespace:Artemis.Plugins.LayerBrushes.Noise"
|
||||
mc:Ignorable="d"
|
||||
d:DesignHeight="450" d:DesignWidth="800"
|
||||
d:DataContext="{d:DesignInstance {x:Type noiseBrush:NoiseBrushViewModel}}">
|
||||
<UserControl.Resources>
|
||||
<ResourceDictionary>
|
||||
<ResourceDictionary.MergedDictionaries>
|
||||
<ResourceDictionary Source="pack://application:,,,/MaterialDesignThemes.Wpf;component/Themes/MaterialDesignTheme.Defaults.xaml" />
|
||||
</ResourceDictionary.MergedDictionaries>
|
||||
<converters:SKColorToColorConverter x:Key="SKColorToColorConverter" />
|
||||
</ResourceDictionary>
|
||||
</UserControl.Resources>
|
||||
|
||||
<Grid Margin="12">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="Auto" />
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<Grid Grid.Row="0">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition />
|
||||
<RowDefinition />
|
||||
</Grid.RowDefinitions>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="*" />
|
||||
<ColumnDefinition Width="Auto" />
|
||||
</Grid.ColumnDefinitions>
|
||||
<StackPanel Grid.Column="0" VerticalAlignment="Center">
|
||||
<TextBlock Style="{StaticResource MaterialDesignBody1TextBlock}" Text="Noise color" />
|
||||
</StackPanel>
|
||||
<StackPanel Grid.Row="0" Grid.Column="1" VerticalAlignment="Center">
|
||||
<artemis:ColorPicker Color="{Binding Brush.Settings.Color, Converter={StaticResource SKColorToColorConverter}}" Width="100" />
|
||||
</StackPanel>
|
||||
<Separator Grid.Row="1" Grid.Column="0" Grid.ColumnSpan="2" Style="{StaticResource MaterialDesignSeparator}" />
|
||||
</Grid>
|
||||
|
||||
<Grid Grid.Row="1">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition />
|
||||
<RowDefinition />
|
||||
</Grid.RowDefinitions>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="*" />
|
||||
<ColumnDefinition Width="Auto" />
|
||||
</Grid.ColumnDefinitions>
|
||||
<StackPanel Grid.Column="0" VerticalAlignment="Center">
|
||||
<TextBlock Style="{StaticResource MaterialDesignBody1TextBlock}">
|
||||
<Run Text="Blend mode" />
|
||||
</TextBlock>
|
||||
<TextBlock Style="{StaticResource MaterialDesignBody1TextBlock}" Foreground="{DynamicResource MaterialDesignCheckBoxDisabled}">
|
||||
<Run Text="Affects how the noise is rendered on the rest of the layer" />
|
||||
</TextBlock>
|
||||
</StackPanel>
|
||||
<StackPanel Grid.Row="0" Grid.Column="1" VerticalAlignment="Center">
|
||||
<ComboBox HorizontalAlignment="Left"
|
||||
ItemsSource="{Binding BlendModes}"
|
||||
SelectedValuePath="Value"
|
||||
DisplayMemberPath="Description"
|
||||
Width="100"
|
||||
SelectedValue="{Binding Brush.Settings.BlendMode}" />
|
||||
</StackPanel>
|
||||
<Separator Grid.Row="1" Grid.Column="0" Grid.ColumnSpan="2" Style="{StaticResource MaterialDesignSeparator}" />
|
||||
</Grid>
|
||||
|
||||
<Grid Grid.Row="2">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition />
|
||||
<RowDefinition />
|
||||
</Grid.RowDefinitions>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="*" />
|
||||
<ColumnDefinition Width="Auto" />
|
||||
</Grid.ColumnDefinitions>
|
||||
<StackPanel Grid.Column="0" VerticalAlignment="Center">
|
||||
<TextBlock Style="{StaticResource MaterialDesignBody1TextBlock}">
|
||||
<Run Text="X Scale" />
|
||||
</TextBlock>
|
||||
</StackPanel>
|
||||
<StackPanel Grid.Row="0" Grid.Column="1" VerticalAlignment="Center">
|
||||
<Slider Orientation="Horizontal" TickFrequency="0.5" Minimum="0.5" Maximum="40" Value="{Binding Brush.Settings.XScale}" Width="100" />
|
||||
</StackPanel>
|
||||
<Separator Grid.Row="1" Grid.Column="0" Grid.ColumnSpan="2" Style="{StaticResource MaterialDesignSeparator}" />
|
||||
</Grid>
|
||||
|
||||
<!-- Sample 1 -->
|
||||
<Grid Grid.Row="3">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition />
|
||||
<RowDefinition />
|
||||
</Grid.RowDefinitions>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="*" />
|
||||
<ColumnDefinition Width="Auto" />
|
||||
</Grid.ColumnDefinitions>
|
||||
<StackPanel Grid.Column="0" VerticalAlignment="Center">
|
||||
<TextBlock Style="{StaticResource MaterialDesignBody1TextBlock}">
|
||||
<Run Text="Y Scale" />
|
||||
</TextBlock>
|
||||
</StackPanel>
|
||||
<StackPanel Grid.Row="0" Grid.Column="1" VerticalAlignment="Center">
|
||||
<Slider Orientation="Horizontal" TickFrequency="0.5" Minimum="0.5" Maximum="40" Value="{Binding Brush.Settings.YScale}" Width="100" />
|
||||
</StackPanel>
|
||||
<Separator Grid.Row="1" Grid.Column="0" Grid.ColumnSpan="2" Style="{StaticResource MaterialDesignSeparator}" />
|
||||
</Grid>
|
||||
|
||||
<!-- Setting 2 -->
|
||||
<Grid Grid.Row="4">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition />
|
||||
<RowDefinition />
|
||||
</Grid.RowDefinitions>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="*" />
|
||||
<ColumnDefinition Width="Auto" />
|
||||
</Grid.ColumnDefinitions>
|
||||
<StackPanel Grid.Column="0" VerticalAlignment="Center">
|
||||
<TextBlock Style="{StaticResource MaterialDesignBody1TextBlock}">
|
||||
<Run Text="Animation speed" />
|
||||
</TextBlock>
|
||||
</StackPanel>
|
||||
<StackPanel Grid.Row="0" Grid.Column="1" VerticalAlignment="Center">
|
||||
|
||||
<Slider Orientation="Horizontal" TickFrequency="1" Minimum="1" Maximum="100" Value="{Binding Brush.Settings.AnimationSpeed}" Width="100" />
|
||||
</StackPanel>
|
||||
<Separator Grid.Row="1" Grid.Column="0" Grid.ColumnSpan="2" Style="{StaticResource MaterialDesignSeparator}" />
|
||||
</Grid>
|
||||
</Grid>
|
||||
</UserControl>
|
||||
@@ -12,27 +12,30 @@
|
||||
<TargetFrameworkVersion>v4.7.2</TargetFrameworkVersion>
|
||||
<FileAlignment>512</FileAlignment>
|
||||
<Deterministic>true</Deterministic>
|
||||
<ShouldIncludeNativeSkiaSharp>false</ShouldIncludeNativeSkiaSharp>
|
||||
<TargetFrameworkProfile />
|
||||
<NuGetPackageImportStamp>
|
||||
</NuGetPackageImportStamp>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x64'">
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<DebugType>full</DebugType>
|
||||
<Optimize>false</Optimize>
|
||||
<OutputPath>bin\Debug\</OutputPath>
|
||||
<OutputPath>bin\x64\Debug\</OutputPath>
|
||||
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<DebugType>full</DebugType>
|
||||
<PlatformTarget>x64</PlatformTarget>
|
||||
<LangVersion>7</LangVersion>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<Optimize>true</Optimize>
|
||||
<OutputPath>bin\Release\</OutputPath>
|
||||
<DefineConstants>TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x64'">
|
||||
<OutputPath>bin\x64\Release\</OutputPath>
|
||||
<DefineConstants>TRACE</DefineConstants>
|
||||
<Optimize>true</Optimize>
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<PlatformTarget>x64</PlatformTarget>
|
||||
<LangVersion>7.3</LangVersion>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="PresentationCore" />
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net472</TargetFramework>
|
||||
<Platforms>AnyCPU;x64</Platforms>
|
||||
<Platforms>x64</Platforms>
|
||||
<LangVersion>7</LangVersion>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
|
||||
@@ -13,25 +13,29 @@
|
||||
<ProjectTypeGuids>{60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<Deterministic>true</Deterministic>
|
||||
<ShouldIncludeNativeSkiaSharp>false</ShouldIncludeNativeSkiaSharp>
|
||||
<NuGetPackageImportStamp>
|
||||
</NuGetPackageImportStamp>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x64'">
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<DebugType>full</DebugType>
|
||||
<Optimize>false</Optimize>
|
||||
<OutputPath>bin\Debug\</OutputPath>
|
||||
<OutputPath>bin\x64\Debug\</OutputPath>
|
||||
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
||||
<DebugType>full</DebugType>
|
||||
<PlatformTarget>x64</PlatformTarget>
|
||||
<LangVersion>7.3</LangVersion>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<Optimize>true</Optimize>
|
||||
<OutputPath>bin\Release\</OutputPath>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x64'">
|
||||
<OutputPath>bin\x64\Release\</OutputPath>
|
||||
<DefineConstants>TRACE</DefineConstants>
|
||||
<Optimize>true</Optimize>
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<PlatformTarget>x64</PlatformTarget>
|
||||
<LangVersion>7.3</LangVersion>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="MaterialDesignColors, Version=1.2.0.325, Culture=neutral, processorArchitecture=MSIL">
|
||||
|
||||
@@ -18,26 +18,6 @@
|
||||
</NuGetPackageImportStamp>
|
||||
<TargetFrameworkProfile />
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||
<PlatformTarget>AnyCPU</PlatformTarget>
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<DebugType>full</DebugType>
|
||||
<Optimize>false</Optimize>
|
||||
<OutputPath>bin\Debug\</OutputPath>
|
||||
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<LangVersion>7</LangVersion>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||
<PlatformTarget>AnyCPU</PlatformTarget>
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<Optimize>true</Optimize>
|
||||
<OutputPath>bin\Release\</OutputPath>
|
||||
<DefineConstants>TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x64'">
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
@@ -490,9 +470,6 @@
|
||||
<ItemGroup>
|
||||
<None Include="Resources\bow.svg" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Resource Include="Resources\tile.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Resource Include="FodyWeavers.xml" />
|
||||
</ItemGroup>
|
||||
@@ -530,6 +507,11 @@
|
||||
<None Include="Resources\aero_fill.cur" />
|
||||
</ItemGroup>
|
||||
<ItemGroup />
|
||||
<ItemGroup>
|
||||
<FluentValidationExcludedCultures Include="be;cs;cs-CZ;da;de;es;fa;fi;fr;ja;it;ko;mk;nl;pl;pt;ru;sv;tr;uk;zh-CN;zh-CHS;zh-CHT;uz-Latn-UZ">
|
||||
<InProject>false</InProject>
|
||||
</FluentValidationExcludedCultures>
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||
<PropertyGroup>
|
||||
<PostBuildEvent>
|
||||
@@ -545,4 +527,11 @@
|
||||
<Error Condition="!Exists('..\packages\SkiaSharp.1.68.1\build\net45\SkiaSharp.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\SkiaSharp.1.68.1\build\net45\SkiaSharp.targets'))" />
|
||||
</Target>
|
||||
<Import Project="..\packages\SkiaSharp.1.68.1\build\net45\SkiaSharp.targets" Condition="Exists('..\packages\SkiaSharp.1.68.1\build\net45\SkiaSharp.targets')" />
|
||||
<!-- The above copies OSX binaries we dont want, clean them up -->
|
||||
<Target Name="SkiaCleanUpAfterBuild" AfterTargets="AfterBuild">
|
||||
<Delete Files="$(OutputPath)\libSkiaSharp.dylib" />
|
||||
</Target>
|
||||
<Target Name="RemoveTranslationsAfterBuild" AfterTargets="AfterBuild">
|
||||
<RemoveDir Directories="@(FluentValidationExcludedCultures->'$(OutputPath)%(Filename)')" />
|
||||
</Target>
|
||||
</Project>
|
||||
@@ -4,6 +4,7 @@ using Artemis.Core.Plugins.Abstract;
|
||||
using Artemis.UI.Screens.Module;
|
||||
using Artemis.UI.Screens.Module.ProfileEditor;
|
||||
using Artemis.UI.Screens.Module.ProfileEditor.ProfileTree.TreeItem;
|
||||
using Artemis.UI.Screens.Module.ProfileEditor.Visualization;
|
||||
using Artemis.UI.Screens.Settings.Tabs.Devices;
|
||||
|
||||
namespace Artemis.UI.Ninject.Factories
|
||||
@@ -37,4 +38,9 @@ namespace Artemis.UI.Ninject.Factories
|
||||
{
|
||||
LayerViewModel Create(TreeItemViewModel parent, ProfileElement folder);
|
||||
}
|
||||
|
||||
public interface IProfileLayerViewModelFactory : IViewModelFactory
|
||||
{
|
||||
ProfileLayerViewModel Create(Layer layer);
|
||||
}
|
||||
}
|
||||
-10
@@ -179,15 +179,5 @@ namespace Artemis.UI.Properties {
|
||||
return ((System.Drawing.Bitmap)(obj));
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized resource of type System.Drawing.Bitmap.
|
||||
/// </summary>
|
||||
internal static System.Drawing.Bitmap tile {
|
||||
get {
|
||||
object obj = ResourceManager.GetObject("tile", resourceCulture);
|
||||
return ((System.Drawing.Bitmap)(obj));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -154,7 +154,4 @@
|
||||
<data name="logo_512" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\logo-512.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="tile" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\tile.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
</root>
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 165 B |
@@ -6,7 +6,29 @@
|
||||
xmlns:local="clr-namespace:Artemis.UI.Screens.Module.ProfileEditor.Visualization"
|
||||
mc:Ignorable="d"
|
||||
d:DesignHeight="450" d:DesignWidth="800">
|
||||
<Canvas>
|
||||
<UserControl.Resources>
|
||||
<Style TargetType="{x:Type Canvas}" x:Key="SelectedStyle">
|
||||
<Style.Triggers>
|
||||
<DataTrigger Binding="{Binding IsSelected}" Value="False">
|
||||
<DataTrigger.EnterActions>
|
||||
<BeginStoryboard>
|
||||
<Storyboard>
|
||||
<DoubleAnimation Storyboard.TargetProperty="(Canvas.Opacity)" To="0" Duration="0:0:0.25" />
|
||||
</Storyboard>
|
||||
</BeginStoryboard>
|
||||
</DataTrigger.EnterActions>
|
||||
<DataTrigger.ExitActions>
|
||||
<BeginStoryboard>
|
||||
<Storyboard>
|
||||
<DoubleAnimation Storyboard.TargetProperty="(Canvas.Opacity)" To="1" Duration="0:0:0.25" />
|
||||
</Storyboard>
|
||||
</BeginStoryboard>
|
||||
</DataTrigger.ExitActions>
|
||||
</DataTrigger>
|
||||
</Style.Triggers>
|
||||
</Style>
|
||||
</UserControl.Resources>
|
||||
<Canvas Style="{StaticResource SelectedStyle}">
|
||||
<!-- The part of the layer's shape that falls outside the layer -->
|
||||
<Path Data="{Binding ShapeGeometry, Mode=OneWay}" >
|
||||
<Path.Fill>
|
||||
|
||||
@@ -6,20 +6,24 @@ using Artemis.Core.Models.Profile;
|
||||
using Artemis.Core.Models.Profile.LayerShapes;
|
||||
using Artemis.Core.Models.Surface;
|
||||
using Artemis.UI.Extensions;
|
||||
using Artemis.UI.Services.Interfaces;
|
||||
using RGB.NET.Core;
|
||||
using SkiaSharp.Views.WPF;
|
||||
using Rectangle = Artemis.Core.Models.Profile.LayerShapes.Rectangle;
|
||||
|
||||
namespace Artemis.UI.Screens.Module.ProfileEditor.Visualization
|
||||
{
|
||||
public class ProfileLayerViewModel : CanvasViewModel
|
||||
{
|
||||
public ProfileLayerViewModel(Layer layer)
|
||||
private readonly IProfileEditorService _profileEditorService;
|
||||
|
||||
public ProfileLayerViewModel(Layer layer, IProfileEditorService profileEditorService)
|
||||
{
|
||||
_profileEditorService = profileEditorService;
|
||||
Layer = layer;
|
||||
|
||||
Update();
|
||||
Layer.RenderPropertiesUpdated += LayerOnRenderPropertiesUpdated;
|
||||
_profileEditorService.SelectedProfileElementChanged += OnSelectedProfileElementChanged;
|
||||
}
|
||||
|
||||
public Layer Layer { get; }
|
||||
@@ -28,9 +32,11 @@ namespace Artemis.UI.Screens.Module.ProfileEditor.Visualization
|
||||
public Geometry OpacityGeometry { get; set; }
|
||||
public Geometry ShapeGeometry { get; set; }
|
||||
public Rect ViewportRectangle { get; set; }
|
||||
public bool IsSelected { get; set; }
|
||||
|
||||
private void Update()
|
||||
{
|
||||
IsSelected = _profileEditorService.SelectedProfileElement == Layer;
|
||||
CreateLayerGeometry();
|
||||
CreateShapeGeometry();
|
||||
CreateViewportRectangle();
|
||||
@@ -118,8 +124,7 @@ namespace Artemis.UI.Screens.Module.ProfileEditor.Visualization
|
||||
ViewportRectangle = Rect.Empty;
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
|
||||
var x = Layer.Leds.Min(l => l.RgbLed.AbsoluteLedRectangle.Location.X);
|
||||
var y = Layer.Leds.Min(l => l.RgbLed.AbsoluteLedRectangle.Location.Y);
|
||||
var width = Layer.Leds.Max(l => l.RgbLed.AbsoluteLedRectangle.Location.X + l.RgbLed.AbsoluteLedRectangle.Size.Width) - x;
|
||||
@@ -176,6 +181,11 @@ namespace Artemis.UI.Screens.Module.ProfileEditor.Visualization
|
||||
Update();
|
||||
}
|
||||
|
||||
private void OnSelectedProfileElementChanged(object sender, EventArgs e)
|
||||
{
|
||||
IsSelected = _profileEditorService.SelectedProfileElement == Layer;
|
||||
}
|
||||
|
||||
public void Dispose()
|
||||
{
|
||||
Layer.RenderPropertiesUpdated -= LayerOnRenderPropertiesUpdated;
|
||||
|
||||
@@ -11,6 +11,7 @@ using Artemis.Core.Plugins.Models;
|
||||
using Artemis.Core.Services;
|
||||
using Artemis.Core.Services.Storage.Interfaces;
|
||||
using Artemis.UI.Events;
|
||||
using Artemis.UI.Ninject.Factories;
|
||||
using Artemis.UI.Screens.Module.ProfileEditor.Visualization.Tools;
|
||||
using Artemis.UI.Screens.Shared;
|
||||
using Artemis.UI.Services.Interfaces;
|
||||
@@ -23,17 +24,23 @@ namespace Artemis.UI.Screens.Module.ProfileEditor.Visualization
|
||||
{
|
||||
private readonly IProfileEditorService _profileEditorService;
|
||||
private readonly ISettingsService _settingsService;
|
||||
private readonly IProfileLayerViewModelFactory _profileLayerViewModelFactory;
|
||||
private readonly ISurfaceService _surfaceService;
|
||||
private int _activeToolIndex;
|
||||
private VisualizationToolViewModel _activeToolViewModel;
|
||||
private int _previousTool;
|
||||
private TimerUpdateTrigger _updateTrigger;
|
||||
|
||||
public ProfileViewModel(IProfileEditorService profileEditorService, ISurfaceService surfaceService, ISettingsService settingsService, IEventAggregator eventAggregator)
|
||||
public ProfileViewModel(IProfileEditorService profileEditorService,
|
||||
ISurfaceService surfaceService,
|
||||
ISettingsService settingsService,
|
||||
IEventAggregator eventAggregator,
|
||||
IProfileLayerViewModelFactory profileLayerViewModelFactory)
|
||||
{
|
||||
_profileEditorService = profileEditorService;
|
||||
_surfaceService = surfaceService;
|
||||
_settingsService = settingsService;
|
||||
_profileLayerViewModelFactory = profileLayerViewModelFactory;
|
||||
|
||||
Execute.OnUIThreadSync(() =>
|
||||
{
|
||||
@@ -133,7 +140,7 @@ namespace Artemis.UI.Screens.Module.ProfileEditor.Visualization
|
||||
foreach (var layer in layers)
|
||||
{
|
||||
if (layerViewModels.All(vm => vm.Layer != layer))
|
||||
CanvasViewModels.Add(new ProfileLayerViewModel(layer));
|
||||
CanvasViewModels.Add(_profileLayerViewModelFactory.Create(layer));
|
||||
}
|
||||
|
||||
// Remove layers that no longer exist
|
||||
|
||||
+3
@@ -45,8 +45,11 @@ namespace Artemis.UI.Screens.Module.ProfileEditor.Visualization.Tools
|
||||
|
||||
if (ProfileEditorService.SelectedProfileElement is Layer layer)
|
||||
{
|
||||
// Ensure the shape is an ellipse, we're all about ellipses up here
|
||||
if (!(layer.LayerShape is Ellipse))
|
||||
layer.LayerShape = new Ellipse(layer);
|
||||
|
||||
// Apply the drag rectangle
|
||||
layer.LayerShape.SetFromUnscaledRectangle(DragRectangle.ToSKRect());
|
||||
ProfileEditorService.UpdateSelectedProfileElement();
|
||||
}
|
||||
|
||||
+4
-3
@@ -25,15 +25,16 @@ namespace Artemis.UI.Screens.Module.ProfileEditor.Visualization.Tools
|
||||
// Find out if the click is inside a layer and if so, fill it
|
||||
var position = e.GetPosition((IInputElement) sender);
|
||||
var panZoomVm = ProfileViewModel.PanZoomViewModel;
|
||||
|
||||
var layer = ProfileEditorService.SelectedProfile
|
||||
.GetAllLayers()
|
||||
.FirstOrDefault(l => l.Leds.Any(
|
||||
led => panZoomVm.TransformContainingRect(led.RgbLed.AbsoluteLedRectangle).Contains(position))
|
||||
);
|
||||
|
||||
if (layer != null)
|
||||
layer.LayerShape = new Fill(layer);
|
||||
if (layer == null)
|
||||
return;
|
||||
layer.LayerShape = new Fill(layer);
|
||||
ProfileEditorService.UpdateSelectedProfileElement();
|
||||
}
|
||||
}
|
||||
}
|
||||
+19
@@ -1,8 +1,11 @@
|
||||
using System.IO;
|
||||
using System.Windows;
|
||||
using System.Windows.Input;
|
||||
using Artemis.Core.Models.Profile;
|
||||
using Artemis.Core.Models.Profile.LayerShapes;
|
||||
using Artemis.UI.Properties;
|
||||
using Artemis.UI.Services.Interfaces;
|
||||
using SkiaSharp.Views.WPF;
|
||||
|
||||
namespace Artemis.UI.Screens.Module.ProfileEditor.Visualization.Tools
|
||||
{
|
||||
@@ -34,6 +37,22 @@ namespace Artemis.UI.Screens.Module.ProfileEditor.Visualization.Tools
|
||||
DragRectangle = GetSquareRectBetweenPoints(MouseDownStartPosition, position);
|
||||
}
|
||||
|
||||
public override void MouseUp(object sender, MouseButtonEventArgs e)
|
||||
{
|
||||
base.MouseUp(sender, e);
|
||||
|
||||
if (ProfileEditorService.SelectedProfileElement is Layer layer)
|
||||
{
|
||||
// Ensure the shape is a rectangle
|
||||
if (!(layer.LayerShape is Rectangle))
|
||||
layer.LayerShape = new Rectangle(layer);
|
||||
|
||||
// Apply the drag rectangle
|
||||
layer.LayerShape.SetFromUnscaledRectangle(DragRectangle.ToSKRect());
|
||||
ProfileEditorService.UpdateSelectedProfileElement();
|
||||
}
|
||||
}
|
||||
|
||||
public override void KeyUp(KeyEventArgs e)
|
||||
{
|
||||
base.KeyUp(e);
|
||||
|
||||
@@ -60,7 +60,10 @@ namespace Artemis.UI.Screens
|
||||
paletteHelper.SetTheme(theme);
|
||||
|
||||
var extensionsPaletteHelper = new MaterialDesignExtensions.Themes.PaletteHelper();
|
||||
// That's nice, then don't use it in your own examples and provide a working alternative
|
||||
#pragma warning disable 612
|
||||
extensionsPaletteHelper.SetLightDark(windowsTheme == ThemeWatcher.WindowsTheme.Dark);
|
||||
#pragma warning restore 612
|
||||
}
|
||||
|
||||
public void WindowDeactivated()
|
||||
|
||||
@@ -41,7 +41,7 @@ namespace Artemis.UI.Screens.SurfaceEditor.Dialogs
|
||||
Session.Close(true);
|
||||
}
|
||||
|
||||
public async Task Cancel()
|
||||
public void Cancel()
|
||||
{
|
||||
Session.Close(false);
|
||||
}
|
||||
|
||||
+30
-72
@@ -21,13 +21,13 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Plugins", "Plugins", "{E830
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Artemis.Plugins.Modules.General", "Artemis.Plugins.Modules.General\Artemis.Plugins.Modules.General.csproj", "{E592F239-FAA0-4840-9C85-46E5867D06D5}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Artemis.Plugins.LayerBrushes.Color", "Artemis.Plugins.LayerTypes.Brush\Artemis.Plugins.LayerBrushes.Color.csproj", "{0F288A66-6EB0-4589-8595-E33A3A3EAEA2}"
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Artemis.Plugins.LayerBrushes.Color", "Artemis.Plugins.LayerBrushes.Color\Artemis.Plugins.LayerBrushes.Color.csproj", "{0F288A66-6EB0-4589-8595-E33A3A3EAEA2}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Artemis.Plugins.Devices.Corsair", "Artemis.Plugins.Devices.Corsair\Artemis.Plugins.Devices.Corsair.csproj", "{A779B2F8-C253-4C4B-8634-6EB8F594E96D}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Artemis.Plugins.Devices.Logitech", "Artemis.Plugins.Devices.Logitech\Artemis.Plugins.Devices.Logitech.csproj", "{235A45C7-24AD-4F47-B9D4-CD67E610A04D}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Artemis.Plugins.LayerBrushes.Noise", "Artemis.Plugins.LayerElements.Noise\Artemis.Plugins.LayerBrushes.Noise.csproj", "{7F4C7AB0-4C9B-452D-AFED-34544C903DEF}"
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Artemis.Plugins.LayerBrushes.Noise", "Artemis.Plugins.LayerBrushes.Noise\Artemis.Plugins.LayerBrushes.Noise.csproj", "{7F4C7AB0-4C9B-452D-AFED-34544C903DEF}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Artemis.UI.Shared", "Artemis.UI.Shared\Artemis.UI.Shared.csproj", "{ADB357E6-151D-4D0D-87CB-68FD0BC29812}"
|
||||
EndProject
|
||||
@@ -35,92 +35,50 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Artemis.Plugins.Devices.Woo
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|Any CPU = Debug|Any CPU
|
||||
Debug|x64 = Debug|x64
|
||||
Release|Any CPU = Release|Any CPU
|
||||
Release|x64 = Release|x64
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||
{46B74153-77CF-4489-BDF9-D53FDB1F7ACB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{46B74153-77CF-4489-BDF9-D53FDB1F7ACB}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{46B74153-77CF-4489-BDF9-D53FDB1F7ACB}.Debug|x64.ActiveCfg = Debug|x64
|
||||
{46B74153-77CF-4489-BDF9-D53FDB1F7ACB}.Debug|x64.Build.0 = Debug|x64
|
||||
{46B74153-77CF-4489-BDF9-D53FDB1F7ACB}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{46B74153-77CF-4489-BDF9-D53FDB1F7ACB}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{46B74153-77CF-4489-BDF9-D53FDB1F7ACB}.Release|x64.ActiveCfg = Release|x64
|
||||
{46B74153-77CF-4489-BDF9-D53FDB1F7ACB}.Release|x64.Build.0 = Release|x64
|
||||
{E489E5E3-1A65-4AF5-A1EA-F9805FD19A65}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{E489E5E3-1A65-4AF5-A1EA-F9805FD19A65}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{E489E5E3-1A65-4AF5-A1EA-F9805FD19A65}.Debug|x64.ActiveCfg = Debug|x64
|
||||
{E489E5E3-1A65-4AF5-A1EA-F9805FD19A65}.Debug|x64.Build.0 = Debug|x64
|
||||
{E489E5E3-1A65-4AF5-A1EA-F9805FD19A65}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{E489E5E3-1A65-4AF5-A1EA-F9805FD19A65}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{E489E5E3-1A65-4AF5-A1EA-F9805FD19A65}.Release|x64.ActiveCfg = Release|x64
|
||||
{E489E5E3-1A65-4AF5-A1EA-F9805FD19A65}.Release|x64.Build.0 = Release|x64
|
||||
{9B811F9B-86B9-4771-87AF-72BAE7078A36}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{9B811F9B-86B9-4771-87AF-72BAE7078A36}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{9B811F9B-86B9-4771-87AF-72BAE7078A36}.Debug|x64.ActiveCfg = Debug|x64
|
||||
{9B811F9B-86B9-4771-87AF-72BAE7078A36}.Debug|x64.Build.0 = Debug|x64
|
||||
{9B811F9B-86B9-4771-87AF-72BAE7078A36}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{9B811F9B-86B9-4771-87AF-72BAE7078A36}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{9B811F9B-86B9-4771-87AF-72BAE7078A36}.Release|x64.ActiveCfg = Release|x64
|
||||
{9B811F9B-86B9-4771-87AF-72BAE7078A36}.Release|x64.Build.0 = Release|x64
|
||||
{E592F239-FAA0-4840-9C85-46E5867D06D5}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{E592F239-FAA0-4840-9C85-46E5867D06D5}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{E592F239-FAA0-4840-9C85-46E5867D06D5}.Debug|x64.ActiveCfg = Debug|Any CPU
|
||||
{E592F239-FAA0-4840-9C85-46E5867D06D5}.Debug|x64.Build.0 = Debug|Any CPU
|
||||
{E592F239-FAA0-4840-9C85-46E5867D06D5}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{E592F239-FAA0-4840-9C85-46E5867D06D5}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{E592F239-FAA0-4840-9C85-46E5867D06D5}.Release|x64.ActiveCfg = Release|Any CPU
|
||||
{E592F239-FAA0-4840-9C85-46E5867D06D5}.Release|x64.Build.0 = Release|Any CPU
|
||||
{0F288A66-6EB0-4589-8595-E33A3A3EAEA2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{0F288A66-6EB0-4589-8595-E33A3A3EAEA2}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{0F288A66-6EB0-4589-8595-E33A3A3EAEA2}.Debug|x64.ActiveCfg = Debug|Any CPU
|
||||
{0F288A66-6EB0-4589-8595-E33A3A3EAEA2}.Debug|x64.Build.0 = Debug|Any CPU
|
||||
{0F288A66-6EB0-4589-8595-E33A3A3EAEA2}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{0F288A66-6EB0-4589-8595-E33A3A3EAEA2}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{0F288A66-6EB0-4589-8595-E33A3A3EAEA2}.Release|x64.ActiveCfg = Release|Any CPU
|
||||
{0F288A66-6EB0-4589-8595-E33A3A3EAEA2}.Release|x64.Build.0 = Release|Any CPU
|
||||
{A779B2F8-C253-4C4B-8634-6EB8F594E96D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{A779B2F8-C253-4C4B-8634-6EB8F594E96D}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{A779B2F8-C253-4C4B-8634-6EB8F594E96D}.Debug|x64.ActiveCfg = Debug|Any CPU
|
||||
{A779B2F8-C253-4C4B-8634-6EB8F594E96D}.Debug|x64.Build.0 = Debug|Any CPU
|
||||
{A779B2F8-C253-4C4B-8634-6EB8F594E96D}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{A779B2F8-C253-4C4B-8634-6EB8F594E96D}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{A779B2F8-C253-4C4B-8634-6EB8F594E96D}.Release|x64.ActiveCfg = Release|Any CPU
|
||||
{A779B2F8-C253-4C4B-8634-6EB8F594E96D}.Release|x64.Build.0 = Release|Any CPU
|
||||
{235A45C7-24AD-4F47-B9D4-CD67E610A04D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{235A45C7-24AD-4F47-B9D4-CD67E610A04D}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{235A45C7-24AD-4F47-B9D4-CD67E610A04D}.Debug|x64.ActiveCfg = Debug|Any CPU
|
||||
{235A45C7-24AD-4F47-B9D4-CD67E610A04D}.Debug|x64.Build.0 = Debug|Any CPU
|
||||
{235A45C7-24AD-4F47-B9D4-CD67E610A04D}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{235A45C7-24AD-4F47-B9D4-CD67E610A04D}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{235A45C7-24AD-4F47-B9D4-CD67E610A04D}.Release|x64.ActiveCfg = Release|Any CPU
|
||||
{235A45C7-24AD-4F47-B9D4-CD67E610A04D}.Release|x64.Build.0 = Release|Any CPU
|
||||
{7F4C7AB0-4C9B-452D-AFED-34544C903DEF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{7F4C7AB0-4C9B-452D-AFED-34544C903DEF}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{7F4C7AB0-4C9B-452D-AFED-34544C903DEF}.Debug|x64.ActiveCfg = Debug|Any CPU
|
||||
{7F4C7AB0-4C9B-452D-AFED-34544C903DEF}.Debug|x64.Build.0 = Debug|Any CPU
|
||||
{7F4C7AB0-4C9B-452D-AFED-34544C903DEF}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{7F4C7AB0-4C9B-452D-AFED-34544C903DEF}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{7F4C7AB0-4C9B-452D-AFED-34544C903DEF}.Release|x64.ActiveCfg = Release|Any CPU
|
||||
{7F4C7AB0-4C9B-452D-AFED-34544C903DEF}.Release|x64.Build.0 = Release|Any CPU
|
||||
{ADB357E6-151D-4D0D-87CB-68FD0BC29812}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{ADB357E6-151D-4D0D-87CB-68FD0BC29812}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{ADB357E6-151D-4D0D-87CB-68FD0BC29812}.Debug|x64.ActiveCfg = Debug|Any CPU
|
||||
{ADB357E6-151D-4D0D-87CB-68FD0BC29812}.Debug|x64.Build.0 = Debug|Any CPU
|
||||
{ADB357E6-151D-4D0D-87CB-68FD0BC29812}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{ADB357E6-151D-4D0D-87CB-68FD0BC29812}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{ADB357E6-151D-4D0D-87CB-68FD0BC29812}.Release|x64.ActiveCfg = Release|Any CPU
|
||||
{ADB357E6-151D-4D0D-87CB-68FD0BC29812}.Release|x64.Build.0 = Release|Any CPU
|
||||
{C6BDB6D9-062D-4C28-A280-F3BD6197F07F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{C6BDB6D9-062D-4C28-A280-F3BD6197F07F}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{C6BDB6D9-062D-4C28-A280-F3BD6197F07F}.Debug|x64.ActiveCfg = Debug|Any CPU
|
||||
{C6BDB6D9-062D-4C28-A280-F3BD6197F07F}.Debug|x64.Build.0 = Debug|Any CPU
|
||||
{C6BDB6D9-062D-4C28-A280-F3BD6197F07F}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{C6BDB6D9-062D-4C28-A280-F3BD6197F07F}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{C6BDB6D9-062D-4C28-A280-F3BD6197F07F}.Release|x64.ActiveCfg = Release|Any CPU
|
||||
{C6BDB6D9-062D-4C28-A280-F3BD6197F07F}.Release|x64.Build.0 = Release|Any CPU
|
||||
{E592F239-FAA0-4840-9C85-46E5867D06D5}.Debug|x64.ActiveCfg = Debug|x64
|
||||
{E592F239-FAA0-4840-9C85-46E5867D06D5}.Debug|x64.Build.0 = Debug|x64
|
||||
{E592F239-FAA0-4840-9C85-46E5867D06D5}.Release|x64.ActiveCfg = Release|x64
|
||||
{E592F239-FAA0-4840-9C85-46E5867D06D5}.Release|x64.Build.0 = Release|x64
|
||||
{0F288A66-6EB0-4589-8595-E33A3A3EAEA2}.Debug|x64.ActiveCfg = Debug|x64
|
||||
{0F288A66-6EB0-4589-8595-E33A3A3EAEA2}.Debug|x64.Build.0 = Debug|x64
|
||||
{0F288A66-6EB0-4589-8595-E33A3A3EAEA2}.Release|x64.ActiveCfg = Release|x64
|
||||
{0F288A66-6EB0-4589-8595-E33A3A3EAEA2}.Release|x64.Build.0 = Release|x64
|
||||
{A779B2F8-C253-4C4B-8634-6EB8F594E96D}.Debug|x64.ActiveCfg = Debug|x64
|
||||
{A779B2F8-C253-4C4B-8634-6EB8F594E96D}.Debug|x64.Build.0 = Debug|x64
|
||||
{A779B2F8-C253-4C4B-8634-6EB8F594E96D}.Release|x64.ActiveCfg = Release|x64
|
||||
{A779B2F8-C253-4C4B-8634-6EB8F594E96D}.Release|x64.Build.0 = Release|x64
|
||||
{235A45C7-24AD-4F47-B9D4-CD67E610A04D}.Debug|x64.ActiveCfg = Debug|x64
|
||||
{235A45C7-24AD-4F47-B9D4-CD67E610A04D}.Debug|x64.Build.0 = Debug|x64
|
||||
{235A45C7-24AD-4F47-B9D4-CD67E610A04D}.Release|x64.ActiveCfg = Release|x64
|
||||
{235A45C7-24AD-4F47-B9D4-CD67E610A04D}.Release|x64.Build.0 = Release|x64
|
||||
{7F4C7AB0-4C9B-452D-AFED-34544C903DEF}.Debug|x64.ActiveCfg = Debug|x64
|
||||
{7F4C7AB0-4C9B-452D-AFED-34544C903DEF}.Debug|x64.Build.0 = Debug|x64
|
||||
{7F4C7AB0-4C9B-452D-AFED-34544C903DEF}.Release|x64.ActiveCfg = Release|x64
|
||||
{7F4C7AB0-4C9B-452D-AFED-34544C903DEF}.Release|x64.Build.0 = Release|x64
|
||||
{ADB357E6-151D-4D0D-87CB-68FD0BC29812}.Debug|x64.ActiveCfg = Debug|x64
|
||||
{ADB357E6-151D-4D0D-87CB-68FD0BC29812}.Debug|x64.Build.0 = Debug|x64
|
||||
{ADB357E6-151D-4D0D-87CB-68FD0BC29812}.Release|x64.ActiveCfg = Release|x64
|
||||
{ADB357E6-151D-4D0D-87CB-68FD0BC29812}.Release|x64.Build.0 = Release|x64
|
||||
{C6BDB6D9-062D-4C28-A280-F3BD6197F07F}.Debug|x64.ActiveCfg = Debug|x64
|
||||
{C6BDB6D9-062D-4C28-A280-F3BD6197F07F}.Debug|x64.Build.0 = Debug|x64
|
||||
{C6BDB6D9-062D-4C28-A280-F3BD6197F07F}.Release|x64.ActiveCfg = Release|x64
|
||||
{C6BDB6D9-062D-4C28-A280-F3BD6197F07F}.Release|x64.Build.0 = Release|x64
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
|
||||
Reference in new issue
Block a user