-
Notifications
You must be signed in to change notification settings - Fork 136
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
WPF path rendering improvements, gradient stop fix
Improved the rendering of paths with transformations. Added support for gradient stop with missing offset value, will default to 0.
- Loading branch information
Showing
23 changed files
with
452 additions
and
37 deletions.
There are no files selected for viewing
Binary file modified
BIN
+1 KB
(100%)
Applications/ConvertersWpf/Output/SharpVectors.Converters.Wpf.dll
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file modified
BIN
+2 KB
(100%)
Applications/ConvertersWpf/Output/SharpVectors.Rendering.Wpf.dll
Binary file not shown.
Binary file modified
BIN
+0 Bytes
(100%)
Applications/ConvertersWpf/Output/SharpVectors.Runtime.Wpf.dll
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Linq; | ||
using System.Text; | ||
using System.Windows; | ||
using System.Windows.Controls; | ||
using System.Windows.Data; | ||
using System.Windows.Documents; | ||
using System.Windows.Input; | ||
using System.Windows.Media; | ||
using System.Windows.Media.Imaging; | ||
using System.Windows.Navigation; | ||
using System.Windows.Shapes; | ||
|
||
namespace SharpVectors.Converters | ||
{ | ||
/// <summary> | ||
/// Follow steps 1a or 1b and then 2 to use this custom control in a XAML file. | ||
/// | ||
/// Step 1a) Using this custom control in a XAML file that exists in the current project. | ||
/// Add this XmlNamespace attribute to the root element of the markup file where it is | ||
/// to be used: | ||
/// | ||
/// xmlns:MyNamespace="clr-namespace:SharpVectors.Converters" | ||
/// | ||
/// | ||
/// Step 1b) Using this custom control in a XAML file that exists in a different project. | ||
/// Add this XmlNamespace attribute to the root element of the markup file where it is | ||
/// to be used: | ||
/// | ||
/// xmlns:MyNamespace="clr-namespace:SharpVectors.Converters;assembly=SharpVectors.Converters" | ||
/// | ||
/// You will also need to add a project reference from the project where the XAML file lives | ||
/// to this project and Rebuild to avoid compilation errors: | ||
/// | ||
/// Right click on the target project in the Solution Explorer and | ||
/// "Add Reference"->"Projects"->[Browse to and select this project] | ||
/// | ||
/// | ||
/// Step 2) | ||
/// Go ahead and use your control in the XAML file. | ||
/// | ||
/// <MyNamespace:SvgControl/> | ||
/// | ||
/// </summary> | ||
public class SvgControl : Control | ||
{ | ||
static SvgControl() | ||
{ | ||
DefaultStyleKeyProperty.OverrideMetadata(typeof(SvgControl), | ||
new FrameworkPropertyMetadata(typeof(SvgControl))); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
<ResourceDictionary | ||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" | ||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" | ||
xmlns:local="clr-namespace:SharpVectors.Converters"> | ||
|
||
|
||
<Style TargetType="{x:Type local:SvgControl}"> | ||
<Setter Property="Template"> | ||
<Setter.Value> | ||
<ControlTemplate TargetType="{x:Type local:SvgControl}"> | ||
<Border Background="{TemplateBinding Background}" | ||
BorderBrush="{TemplateBinding BorderBrush}" | ||
BorderThickness="{TemplateBinding BorderThickness}"> | ||
</Border> | ||
</ControlTemplate> | ||
</Setter.Value> | ||
</Setter> | ||
</Style> | ||
</ResourceDictionary> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.