- 
                Notifications
    
You must be signed in to change notification settings  - Fork 49
 
[wip] implement SkiaSharp PlotViews #71
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
          
     Draft
      
      
            Jonarw
  wants to merge
  10
  commits into
  oxyplot:master
  
    
      
        
          
  
    
      Choose a base branch
      
     
    
      
        
      
      
        
          
          
        
        
          
            
              
              
              
  
           
        
        
          
            
              
              
           
        
       
     
  
        
          
            
          
            
          
        
       
    
      
from
Jonarw:skiavalonia
  
      
      
   
  
    
  
  
  
 
  
      
    base: master
Could not load branches
            
              
  
    Branch not found: {{ refName }}
  
            
                
      Loading
              
            Could not load tags
            
            
              Nothing to show
            
              
  
            
                
      Loading
              
            Are you sure you want to change the base?
            Some commits from the old base branch may be removed from the timeline,
            and old review comments may become outdated.
          
          
  
     Draft
                    Changes from 6 commits
      Commits
    
    
            Show all changes
          
          
            10 commits
          
        
        Select commit
          Hold shift + click to select a range
      
      268b765
              
                [wip] implement SkiaSharp PlotViews
              
              
                Jonarw 0c3cc76
              
                make sure isUpdateRequired flag is not overwritten
              
              
                Jonarw feaf9e4
              
                fix Category.cs header
              
              
                Jonarw f7a2a86
              
                remove NotNullBooleanConverter
              
              
                Jonarw af951aa
              
                simplify RowDefinitions
              
              
                Jonarw ad7e186
              
                fix typo
              
              
                Jonarw ceecb6e
              
                replace AutoResetEvent and Mutex by SemaphoreSlim for async waiting
              
              
                Jonarw 0f0c149
              
                Review usages of isRenderRequired and isUpdateRequired flags
              
              
                Jonarw 44c3fa9
              
                remove misleading function
              
              
                Jonarw 1b044fe
              
                implement PictureRecorder-based PlotView
              
              
                Jonarw 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
    
  
  
    
              
  
    
      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,27 @@ | ||
| // -------------------------------------------------------------------------------------------------------------------- | ||
| // <copyright file="Category.cs" company="OxyPlot"> | ||
| // Copyright (c) 2014 OxyPlot contributors | ||
| // </copyright> | ||
| // <summary> | ||
| // Represents a category of examples. | ||
| // </summary> | ||
| // -------------------------------------------------------------------------------------------------------------------- | ||
| 
     | 
||
| namespace ExampleBrowser | ||
| { | ||
| using ExampleLibrary; | ||
| using System; | ||
| using System.Collections.Generic; | ||
| 
     | 
||
| public class Category | ||
| { | ||
| public Category(string key, List<ExampleInfo> examples) | ||
| { | ||
| this.Key = key; | ||
| this.Examples = examples ?? throw new ArgumentNullException(nameof(examples)); | ||
| } | ||
| 
     | 
||
| public string Key { get; } | ||
| public List<ExampleInfo> Examples { get; } | ||
| } | ||
| } | 
  
    
      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
    
  
  
    
              
  
    
      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
    
  
  
    
              
  
    
      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
    
  
  
    
              
  
    
      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
    
  
  
    
              
  
    
      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,9 @@ | ||
| namespace ExampleBrowser | ||
| { | ||
| public enum Renderer | ||
| { | ||
| Canvas, | ||
| SkiaSharp, | ||
| SkiaSharpDoubleBuffered, | ||
| } | ||
| } | 
            File renamed without changes.
          
    
            File renamed without changes.
          
    
        
          
          
            16 changes: 16 additions & 0 deletions
          
          16 
        
  Source/OxyPlot.Avalonia.Shared/Extensions/ConverterExtensions.cs
  
  
      
      
   
        
      
      
    
  
    
      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,16 @@ | ||
| using Avalonia; | ||
| 
     | 
||
| namespace OxyPlot.Avalonia.Extensions | ||
| { | ||
| public static class ConverterExtensions | ||
| { | ||
| public static OxyRect ToOxyRect(this Rect rect) | ||
| { | ||
| return new OxyRect(rect.Left, rect.Top, rect.Width, rect.Height); | ||
| } | ||
| public static Rect ToRect(this OxyRect rect) | ||
| 
         There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Micronit: Probably wants a line break between these  | 
||
| { | ||
| return new Rect(rect.Left, rect.Top, rect.Width, rect.Height); | ||
| } | ||
| } | ||
| } | ||
            File renamed without changes.
          
    
            File renamed without changes.
          
    
        
          
          
            27 changes: 27 additions & 0 deletions
          
          27 
        
  Source/OxyPlot.Avalonia.Shared/OxyPlot.Avalonia.Shared.projitems
  
  
      
      
   
        
      
      
    
  
    
      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,27 @@ | ||
| <?xml version="1.0" encoding="utf-8"?> | ||
| <Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | ||
| <PropertyGroup> | ||
| <MSBuildAllProjects Condition="'$(MSBuildVersion)' == '' Or '$(MSBuildVersion)' < '16.0'">$(MSBuildAllProjects);$(MSBuildThisFileFullPath)</MSBuildAllProjects> | ||
| <HasSharedItems>true</HasSharedItems> | ||
| <SharedGUID>8f6dadff-7073-4862-86c7-4299ae17cd68</SharedGUID> | ||
| </PropertyGroup> | ||
| <PropertyGroup Label="Configuration"> | ||
| <Import_RootNamespace>OxyPlot.Avalonia.Shared</Import_RootNamespace> | ||
| </PropertyGroup> | ||
| <ItemGroup> | ||
| <Compile Include="$(MSBuildThisFileDirectory)Converters\OxyColorConverter.cs" /> | ||
| <Compile Include="$(MSBuildThisFileDirectory)Converters\ThicknessConverter.cs" /> | ||
| <Compile Include="$(MSBuildThisFileDirectory)Extensions\ConverterExtensions.cs" /> | ||
| <Compile Include="$(MSBuildThisFileDirectory)Extensions\DataPointExtension.cs" /> | ||
| <Compile Include="$(MSBuildThisFileDirectory)MoreColors.cs" /> | ||
| <Compile Include="$(MSBuildThisFileDirectory)PlotBase.cs" /> | ||
| <Compile Include="$(MSBuildThisFileDirectory)PlotBase.Events.cs" /> | ||
| <Compile Include="$(MSBuildThisFileDirectory)PlotBase.Properties.cs" /> | ||
| <Compile Include="$(MSBuildThisFileDirectory)Tracker\TrackerControl.cs" /> | ||
| <Compile Include="$(MSBuildThisFileDirectory)Tracker\TrackerDefinition.cs" /> | ||
| <Compile Include="$(MSBuildThisFileDirectory)Utilities\ConverterExtensions.cs" /> | ||
| </ItemGroup> | ||
| <ItemGroup> | ||
| <Compile Include="$(MSBuildThisFileDirectory)PlotBase.Model.cs" /> | ||
| </ItemGroup> | ||
| </Project> | 
        
          
          
            13 changes: 13 additions & 0 deletions
          
          13 
        
  Source/OxyPlot.Avalonia.Shared/OxyPlot.Avalonia.Shared.shproj
  
  
      
      
   
        
      
      
    
  
    
      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,13 @@ | ||
| <?xml version="1.0" encoding="utf-8"?> | ||
| <Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | ||
| <PropertyGroup Label="Globals"> | ||
| <ProjectGuid>8f6dadff-7073-4862-86c7-4299ae17cd68</ProjectGuid> | ||
| <MinimumVisualStudioVersion>14.0</MinimumVisualStudioVersion> | ||
| </PropertyGroup> | ||
| <Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" /> | ||
| <Import Project="$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)\CodeSharing\Microsoft.CodeSharing.Common.Default.props" /> | ||
| <Import Project="$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)\CodeSharing\Microsoft.CodeSharing.Common.props" /> | ||
| <PropertyGroup /> | ||
| <Import Project="OxyPlot.Avalonia.Shared.projitems" Label="Shared" /> | ||
| <Import Project="$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)\CodeSharing\Microsoft.CodeSharing.CSharp.targets" /> | ||
| </Project> | 
      
      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.
  
    
  
    
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What purpose do these serve?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No idea, I have this from some Avalonia example which I can't find anymore. This seemed to be required at some point when I was testing, but I just tried without these lines and it seems to work fine...
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I had wondered if it was to force the XML namespaces or something, but I don't know.
If it works without, I'd say scrub them until we have reason to put them back in.