-
Couldn't load subscription status.
- Fork 1.4k
Added the Win2d Path Geometry parser. #3503
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
michael-hawker
merged 46 commits into
CommunityToolkit:master
from
ratishphilip:feature/win2dparser
Feb 4, 2021
Merged
Changes from 17 commits
Commits
Show all changes
46 commits
Select commit
Hold shift + click to select a range
cec5bd6
Added the Win2d Path Geometry parser.
ratishphilip 298d22f
Merge branch 'master' into feature/win2dparser
ratishphilip 36c5617
Merge branch 'master' into feature/win2dparser
ratishphilip 34306d7
Merge branch 'master' into feature/win2dparser
ratishphilip d6d39de
Added unit test cases for Geometry Helpers.
ratishphilip 983a3ce
Merge branch 'feature/win2dparser' of https://github.com/ratishphilip…
ratishphilip 609e249
updated SampleApp.csproj file to resolve conflict
ratishphilip 7f8162a
Merge branch 'master' into feature/win2dparser
ratishphilip 0daee1e
Updated headers.
ratishphilip d8e1753
Merge branch 'feature/win2dparser' of https://github.com/ratishphilip…
ratishphilip 1ec440a
Fixed build errors. Removed unused usings.
ratishphilip 16db83d
Merge branch 'master' into feature/win2dparser
ratishphilip 155dc64
Merge branch 'master' into feature/win2dparser
ratishphilip 874579c
Merge branch 'master' into feature/win2dparser
ratishphilip 7360ed9
Merge branch 'master' into feature/win2dparser
ratishphilip d82454d
Merge branch 'master' into feature/win2dparser
ratishphilip 46e88b1
Merge branch 'master' into feature/win2dparser
ratishphilip b61a631
Implemented changes based on Sergio's review comments.
ratishphilip 78720bc
Merge branch 'master' into feature/win2dparser
ratishphilip d26c3ec
Fixed build errors. (Added default option for switch case)
ratishphilip 3b69aed
Merge branch 'feature/win2dparser' of https://github.com/ratishphilip…
ratishphilip cba88e9
Removed ThrowHelper.ThrowNullReferenceException which I had added.
ratishphilip f419f2c
Using ThrowHelper.ThrowArgument exception instead of ThrowHelper.Thro…
ratishphilip 31eeae1
Implemented Xamllama's severl code review comments.
ratishphilip 8a195a1
Merge branch 'master' into feature/win2dparser
ratishphilip 42f9b5c
Added more TestCases as per code review comments.
ratishphilip 693ddf7
Merge branch 'feature/win2dparser' of https://github.com/ratishphilip…
ratishphilip 16fb788
Merge branch 'master' into feature/win2dparser
ratishphilip 30a5040
Removed logger from CanvasPathGeometry. Using ICanvasPathReceiver in …
ratishphilip c3a31f3
Merge branch 'feature/win2dparser' of https://github.com/ratishphilip…
ratishphilip 530e722
Merge branch 'master' into feature/win2dparser
ratishphilip 37a70ef
Parsing CanvasGeometry on Input change.
ratishphilip d61d202
Csproj fixes
ratishphilip eb7d40d
SampleApp.csproj build failure fix.
ratishphilip 7d756c5
Build error fix.
ratishphilip 6c63198
Merge branch 'master' into feature/win2dparser
michael-hawker e618fc7
CanvasGeometry path parse error now more descriptive in the Sample App.
ratishphilip b7a9fed
Merge branch 'feature/win2dparser' of https://github.com/ratishphilip…
ratishphilip be42cc5
Merge branch 'master' into feature/win2dparser
ratishphilip ef27c15
Merge branch 'master' into feature/win2dparser
ratishphilip 46d93c0
Merge branch 'master' into feature/win2dparser
ratishphilip 3e55f52
Sample app now switches to Commands List pivot item to show the parsi…
ratishphilip 2f6f192
Merge branch 'feature/win2dparser' of https://github.com/ratishphilip…
ratishphilip 90f1cb7
Merge branch 'master' into feature/win2dparser
ratishphilip 67e3842
Merge branch 'master' into feature/win2dparser
Sergio0694 4bafb55
Refactored removed Diagnostics dependency
Sergio0694 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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
Binary file added
BIN
+4.54 KB
...oft.Toolkit.Uwp.SampleApp/SamplePages/CanvasPathGeometry/CanvasPathGeometry.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
119 changes: 119 additions & 0 deletions
119
Microsoft.Toolkit.Uwp.SampleApp/SamplePages/CanvasPathGeometry/CanvasPathGeometryPage.xaml
This file contains hidden or 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,119 @@ | ||
| <Page x:Class="Microsoft.Toolkit.Uwp.SampleApp.SamplePages.CanvasPathGeometryPage" | ||
| xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" | ||
| xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" | ||
| xmlns:d="http://schemas.microsoft.com/expression/blend/2008" | ||
| xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" | ||
| xmlns:xaml="using:Microsoft.Graphics.Canvas.UI.Xaml" | ||
| mc:Ignorable="d"> | ||
|
|
||
| <Grid Padding="10"> | ||
| <Grid.RowDefinitions> | ||
| <RowDefinition Height="0.1*" /> | ||
| <RowDefinition Height="48" /> | ||
| <RowDefinition Height="0.9*" /> | ||
| </Grid.RowDefinitions> | ||
| <TextBox x:Name="InputData" | ||
ratishphilip marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| Margin="10,3" | ||
| FontFamily="Courier New" | ||
| FontSize="14" | ||
| PlaceholderText="Enter SVG/XAML Path Data and press Parse. (Or select a sample from the Samples list below)" | ||
| ScrollViewer.VerticalScrollBarVisibility="Auto" | ||
| SelectionHighlightColor="#007aff" | ||
| Text="{x:Bind InputText, Mode=TwoWay}" | ||
| TextWrapping="Wrap" /> | ||
| <StackPanel Grid.Row="1" | ||
| HorizontalAlignment="Left" | ||
| Orientation="Horizontal"> | ||
| <TextBlock Margin="12,3" | ||
| VerticalAlignment="Center" | ||
| Text="Samples: " /> | ||
| <ComboBox x:Name="SampleList" | ||
ratishphilip marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| Width="150" | ||
| Height="30" | ||
| Margin="0,4,10,4" | ||
| VerticalAlignment="Center" | ||
| SelectionChanged="{x:Bind OnSampleChanged}" /> | ||
| </StackPanel> | ||
| <Button Grid.Row="1" | ||
| Width="120" | ||
| Height="36" | ||
| Margin="10,3" | ||
| HorizontalAlignment="Center" | ||
| Click="{x:Bind OnClearCanvas}" | ||
| Content="Clear" /> | ||
| <Button Grid.Row="1" | ||
| Width="120" | ||
| Height="36" | ||
| Margin="10,3" | ||
| HorizontalAlignment="Right" | ||
| Click="{x:Bind OnParseData}" | ||
| Content="Parse" /> | ||
| <Pivot x:Name="RootPivot" | ||
| Grid.Row="2"> | ||
| <PivotItem Foreground="Black" | ||
| Header="Canvas"> | ||
| <ScrollViewer x:Name="RenderScroll" | ||
| HorizontalScrollBarVisibility="Auto" | ||
| VerticalScrollBarVisibility="Auto"> | ||
| <xaml:CanvasControl x:Name="RenderCanvas" | ||
| Width="{Binding ElementName=RenderScroll, Path=ActualWidth}" | ||
| Height="{Binding ElementName=RenderScroll, Path=ActualHeight}" | ||
| MinWidth="1200" | ||
| MinHeight="800" | ||
| HorizontalAlignment="Stretch" | ||
| VerticalAlignment="Stretch" | ||
| HorizontalContentAlignment="Stretch" | ||
| VerticalContentAlignment="Stretch" | ||
| ClearColor="#A7A7A7" | ||
| Draw="{x:Bind OnCanvasDraw}" /> | ||
| </ScrollViewer> | ||
| </PivotItem> | ||
| <PivotItem Foreground="Black" | ||
| Header="Commands"> | ||
| <ScrollViewer Background="#272727" | ||
| HorizontalScrollBarVisibility="Disabled" | ||
| VerticalScrollBarVisibility="Auto"> | ||
| <TextBlock x:Name="CommandsList" | ||
| Padding="10" | ||
| FontFamily="Courier New" | ||
| FontSize="16" | ||
| Foreground="White" | ||
| IsTextSelectionEnabled="True" | ||
| SelectionHighlightColor="#007aff" | ||
| TextWrapping="Wrap" /> | ||
| </ScrollViewer> | ||
| </PivotItem> | ||
| </Pivot> | ||
| <StackPanel Grid.Row="2" | ||
| HorizontalAlignment="Right" | ||
| VerticalAlignment="Top" | ||
| Orientation="Horizontal"> | ||
| <TextBlock Margin="10,10,5,-10" | ||
| Text="StrokeThickness" /> | ||
| <Slider x:Name="StrokeThickness" | ||
| Width="150" | ||
| Height="30" | ||
| Margin="0,4,10,4" | ||
| Background="White" | ||
| Foreground="White" | ||
| Maximum="10" | ||
| Minimum="0" | ||
| StepFrequency="0.1" | ||
| ValueChanged="{x:Bind OnStrokeThicknessChanged}" /> | ||
| <TextBlock Margin="10,10,5,-10" | ||
| Text="Stroke Color: " /> | ||
| <ComboBox x:Name="StrokeList" | ||
| Width="150" | ||
| Height="30" | ||
| Margin="0,4,10,4" | ||
| SelectionChanged="{x:Bind OnStrokeColorChanged}" /> | ||
| <TextBlock Margin="10,10,5,-10" | ||
| Text="Fill Color: " /> | ||
| <ComboBox x:Name="FillList" | ||
| Width="150" | ||
| Height="30" | ||
| Margin="0,4,10,4" | ||
| SelectionChanged="{x:Bind OnFillColorChanged}" /> | ||
| </StackPanel> | ||
| </Grid> | ||
| </Page> | ||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.