Resize and controls

This commit is contained in:
Maddo 2017-04-17 13:06:09 +02:00
commit 02d6cb5d12
6 changed files with 33 additions and 15 deletions

View file

@ -54,10 +54,10 @@
</PropertyGroup>
<ItemGroup>
<Reference Include="ImageSharp, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\ImageSharp.1.0.0-alpha4-00046\lib\netstandard1.3\ImageSharp.dll</HintPath>
<HintPath>..\packages\ImageSharp.1.0.0-alpha6-00049\lib\netstandard1.3\ImageSharp.dll</HintPath>
</Reference>
<Reference Include="ImageSharp.Drawing, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\ImageSharp.Drawing.1.0.0-alpha4-00046\lib\netstandard1.1\ImageSharp.Drawing.dll</HintPath>
<HintPath>..\packages\ImageSharp.Drawing.1.0.0-alpha6-00010\lib\netstandard1.1\ImageSharp.Drawing.dll</HintPath>
</Reference>
<Reference Include="Microsoft.Win32.Primitives, Version=4.0.2.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<HintPath>..\packages\Microsoft.Win32.Primitives.4.3.0\lib\net46\Microsoft.Win32.Primitives.dll</HintPath>
@ -67,10 +67,10 @@
<Private>True</Private>
</Reference>
<Reference Include="SixLabors.Fonts, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\SixLabors.Fonts.0.1.0-alpha0002\lib\netstandard1.3\SixLabors.Fonts.dll</HintPath>
<HintPath>..\packages\SixLabors.Fonts.0.1.0-alpha0008\lib\netstandard1.3\SixLabors.Fonts.dll</HintPath>
</Reference>
<Reference Include="SixLabors.Shapes, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\SixLabors.Shapes.0.1.0-alpha0009\lib\netstandard1.1\SixLabors.Shapes.dll</HintPath>
<HintPath>..\packages\SixLabors.Shapes.0.1.0-alpha0011\lib\netstandard1.1\SixLabors.Shapes.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.AppContext, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">

View file

@ -24,7 +24,10 @@ namespace CatalogLib
public void Start(FileInfo workFile)
{
_currentFile = workFile;
using (Image image = new Image(workFile.FullName))
using (Image image = Image.Load(workFile.FullName)/* new Image(workFile.FullName)*/)
{
if (PicSettings.Instance.UsaRotazioneAutomatica)
{
@ -79,7 +82,10 @@ namespace CatalogLib
}
SetExtraText(image);
if (PicSettings.Instance.EnableText)
{
SetExtraText(image);
}
//JpegDecoder j = new JpegDecoder();
var va = Vector.IsHardwareAccelerated;
@ -105,10 +111,12 @@ namespace CatalogLib
var fff = FontCollection.SystemFonts.Find(PicSettings.Instance.NomeFont);
//var fff = FontCollection.SystemFonts.Find("Segoe Print");
var font = new Font(fff, (float) PicSettings.Instance.DimensioneFont, FontStyle.Regular);
var font = new Font(fff, (float)PicSettings.Instance.DimensioneFont, FontStyle.Regular);
//var font = new Font(fff, 8f, FontStyle.Regular);
Color c = Color.FromHex(PicSettings.Instance.ColoreTestoRGB);
//image.DrawText(PicSettings.Instance.TestoApplicareOrizzontale, font, Color.Black, )
image.DrawText(PicSettings.Instance.TestoApplicareOrizzontale, font, Color.Black, new Vector2(200, 200));
//image.DrawText("sssssssssssssssssssssssssssssssssssssssssssssss", font, Color.Black, new Vector2(200, 200));

View file

@ -422,6 +422,16 @@ namespace CatalogLib
}
}
public string ColoreTestoRGB
{
get { return GetString("coloreTestoRGB", "#000000"); }
set
{
Set("coloreTestoRGB", value);
}
}
#endregion

View file

@ -1,13 +1,13 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="ImageSharp" version="1.0.0-alpha4-00046" targetFramework="net46" />
<package id="ImageSharp.Drawing" version="1.0.0-alpha4-00046" targetFramework="net46" />
<package id="ImageSharp" version="1.0.0-alpha6-00049" targetFramework="net46" />
<package id="ImageSharp.Drawing" version="1.0.0-alpha6-00010" targetFramework="net46" />
<package id="Microsoft.NETCore.Platforms" version="1.1.0" targetFramework="net46" />
<package id="Microsoft.Win32.Primitives" version="4.3.0" targetFramework="net46" />
<package id="NETStandard.Library" version="1.6.1" targetFramework="net46" />
<package id="Newtonsoft.Json" version="9.0.1" targetFramework="net46" />
<package id="SixLabors.Fonts" version="0.1.0-alpha0002" targetFramework="net46" />
<package id="SixLabors.Shapes" version="0.1.0-alpha0009" targetFramework="net46" />
<package id="SixLabors.Fonts" version="0.1.0-alpha0008" targetFramework="net46" />
<package id="SixLabors.Shapes" version="0.1.0-alpha0011" targetFramework="net46" />
<package id="System.AppContext" version="4.3.0" targetFramework="net46" />
<package id="System.Buffers" version="4.3.0" targetFramework="net46" />
<package id="System.Collections" version="4.3.0" targetFramework="net46" />

View file

@ -15,7 +15,7 @@
</UserControl.Resources>
<ScrollViewer>
<StackPanel Orientation="Vertical">
<Controls:ToggleSwitch Header="Inserimento testo" />
<Controls:ToggleSwitch Header="Inserimento testo" IsChecked="{Binding EnableText}" />
<GroupBox Header="Carattere">
<Grid >

View file

@ -687,11 +687,11 @@ namespace WPFCatalog
public string ColoreTestoRGB
{
get { return PicSettings.GetString("coloreTestoRGB", "#000000"); }
{
get { return PicSettings.ColoreTestoRGB; }
set
{
PicSettings.Set("coloreTestoRGB", value);
PicSettings.ColoreTestoRGB = value;
RaisePropertyChanged("ColoreTestoRGB");
}
}