├── .editorconfig ├── .gitattributes ├── .github ├── stale.yml └── workflows │ └── build.yml ├── .gitignore ├── Directory.Build.props ├── Draw2D.sln ├── LICENSE.txt ├── NuGet.Config ├── global.json └── src └── Draw2D ├── App.axaml ├── App.axaml.cs ├── Converters ├── GroupIdToGroupConverter.cs ├── IsEqualStringConverter.cs └── StyleIdToStyleConverter.cs ├── Draw2D.csproj ├── Program.cs ├── Skia ├── Bounds │ ├── ChildNode.cs │ ├── ContainsMode.cs │ ├── RootNode.cs │ ├── SkiaBoundsShapeRenderer.cs │ └── SkiaHitTest.cs ├── Export │ ├── SkiaContainerExporter.cs │ ├── SkiaContainerImporter.cs │ ├── SkiaPathConverter.cs │ └── SkiaSvgConverter.cs ├── Presenters │ ├── SkiaEditorContainerPresenter.cs │ ├── SkiaExportContainerPresenter.cs │ └── SkiaExportSelectedPresenter.cs ├── Renderers │ └── SkiaShapeRenderer.cs └── Utilities │ ├── CompositeDisposable.cs │ └── SkiaUtil.cs ├── ViewLocator.cs ├── ViewModels ├── Bounds │ ├── ArcBounds.cs │ ├── CircleBounds.cs │ ├── ConicBounds.cs │ ├── ContainerBounds.cs │ ├── CubicBezierBounds.cs │ ├── FigureBounds.cs │ ├── GroupBounds.cs │ ├── HitTest │ │ ├── HitTest.cs │ │ └── HitTestHelper.cs │ ├── ImageBounds.cs │ ├── LineBounds.cs │ ├── OvalBounds.cs │ ├── PathBounds.cs │ ├── PointBounds.cs │ ├── QuadraticBezierBounds.cs │ ├── RectangleBounds.cs │ ├── ReferenceBounds.cs │ └── TextBounds.cs ├── Containers │ ├── CanvasContainer.cs │ ├── ContainerView.cs │ ├── Core │ │ ├── ICanvasContainer.cs │ │ ├── IContainerView.cs │ │ ├── IDocumentContainer.cs │ │ ├── IGroupLibrary.cs │ │ ├── ILibrary`1.cs │ │ ├── IStyleLibrary.cs │ │ └── Library`1.cs │ ├── DocumentContainer.cs │ ├── Editor │ │ ├── IAvaloniaXamlConverter.cs │ │ ├── IContainerExporter.cs │ │ ├── IContainerImporter.cs │ │ ├── IContainerPresenter.cs │ │ ├── IPathConverter.cs │ │ ├── ISvgConverter.cs │ │ └── PathOp.cs │ ├── GroupLibrary.cs │ ├── SelectionState.cs │ ├── StyleLibrary.cs │ └── ZoomServiceState.cs ├── Core │ ├── HAlign.cs │ ├── IBaseShape.cs │ ├── IBounds.cs │ ├── IConnectable.cs │ ├── ICopyable.cs │ ├── IDirty.cs │ ├── IDrawable.cs │ ├── IHitTest.cs │ ├── IHitTestable.cs │ ├── INode.cs │ ├── IPointShape.cs │ ├── ISelectable.cs │ ├── ISelectionState.cs │ ├── IShapeDecorator.cs │ ├── IShapeRenderer.cs │ └── VAlign.cs ├── Decorators │ ├── ArcDecorator.cs │ ├── CircleDecorator.cs │ ├── ConicDecorator.cs │ ├── ContainerDecorator.cs │ ├── Core │ │ └── CommonDecorator.cs │ ├── CubicBezierDecorator.cs │ ├── FigureDecorator.cs │ ├── GroupDecorator.cs │ ├── ImageDecorator.cs │ ├── LineDecorator.cs │ ├── OvalDecorator.cs │ ├── PathDecorator.cs │ ├── PointDecorator.cs │ ├── QuadraticBezierDecorator.cs │ ├── RectangleDecorator.cs │ ├── ReferenceDecorator.cs │ └── TextDecorator.cs ├── EditMode.cs ├── Editor │ ├── DefaultContainerFactory.cs │ ├── EditorToolContext.cs │ ├── Export │ │ └── AvaloniaXamlConverter.cs │ ├── IEditorToolContext.cs │ ├── Presenters │ │ └── AvaloniaContainerPresenter.cs │ └── Serializer │ │ └── JsonSerializer.cs ├── Filters │ ├── Core │ │ ├── GridSnapMode.cs │ │ ├── LineSnapMode.cs │ │ ├── LineSnapTarget.cs │ │ └── PointFilter.cs │ ├── GridSnapPointFilter.cs │ ├── LineSnapPointFilter.cs │ └── Settings │ │ ├── GridSnapSettings.cs │ │ └── LineSnapSettings.cs ├── Matrix.cs ├── Settings │ └── WindowSettings.cs ├── SettingsBase.cs ├── Shapes │ ├── ArcShape.cs │ ├── CircleShape.cs │ ├── ConicShape.cs │ ├── Core │ │ ├── BaseShape.cs │ │ ├── PathFillType.cs │ │ └── StretchMode.cs │ ├── CubicBezierShape.cs │ ├── Extensions │ │ ├── LineShapeExtensions.cs │ │ ├── OvalShapeExtensions.cs │ │ ├── PointShapeExtensions.cs │ │ └── RectangleShapeExtensions.cs │ ├── FigureShape.cs │ ├── GroupShape.cs │ ├── ImageShape.cs │ ├── LineShape.cs │ ├── OvalShape.cs │ ├── PathShape.cs │ ├── PointShape.cs │ ├── QuadraticBezierShape.cs │ ├── RectangleShape.cs │ ├── ReferencePointShape.cs │ ├── ReferenceShape.cs │ └── TextShape.cs ├── Style │ ├── ArgbColor.cs │ ├── ColorFilters │ │ ├── BlendModeColorFilter.cs │ │ ├── ColorCubeColorFilter.cs │ │ ├── ColorMatrixColorFilter.cs │ │ ├── ComposeColorFilter.cs │ │ ├── GammaColorFilter.cs │ │ ├── HighContrastColorFilter.cs │ │ ├── LightingColorFilter.cs │ │ ├── LumaColorColorFilter.cs │ │ └── TableColorFilter.cs │ ├── Core │ │ ├── BlendMode.cs │ │ ├── FontStyleSlant.cs │ │ ├── IColorFilter.cs │ │ ├── IImageFilter.cs │ │ ├── IMaskFilter.cs │ │ ├── IPaint.cs │ │ ├── IPaintEffects.cs │ │ ├── IPathEffect.cs │ │ ├── IPathEffectFactory.cs │ │ ├── IShader.cs │ │ ├── IShapeStyle.cs │ │ ├── PaintStyle.cs │ │ ├── StrokeCap.cs │ │ └── StrokeJoin.cs │ ├── ImageFilters │ │ ├── AlphaThresholdImageFilter.cs │ │ ├── ArithmeticImageFilter.cs │ │ ├── BlendModeImageFilter.cs │ │ ├── BlurImageFilter.cs │ │ ├── ColorFilterImageFilter.cs │ │ ├── ComposeImageFilter.cs │ │ ├── DilateImageFilter.cs │ │ ├── DisplacementMapEffectImageFilter.cs │ │ ├── DistantLitDiffuseImageFilter.cs │ │ ├── DistantLitSpecularImageFilter.cs │ │ ├── DropShadowImageFilter.cs │ │ ├── ErodeImageFilter.cs │ │ ├── ImageImageFilter.cs │ │ ├── MagnifierImageFilter.cs │ │ ├── MatrixConvolutionImageFilter.cs │ │ ├── MatrixImageFilter.cs │ │ ├── MergeImageFilter.cs │ │ ├── OffsetImageFilter.cs │ │ ├── PaintImageFilter.cs │ │ ├── PictureImageFilter.cs │ │ ├── PointLitDiffuseImageFilter.cs │ │ ├── PointLitSpecularImageFilter.cs │ │ ├── SpotLitDiffuseImageFilter.cs │ │ ├── SpotLitSpecularImageFilter.cs │ │ └── TileImageFilter.cs │ ├── MaskFilters │ │ ├── BlurMaskFilter.cs │ │ ├── ClipMaskFilter.cs │ │ ├── GammaMaskFilter.cs │ │ └── TableMaskFilter.cs │ ├── Paints │ │ ├── Paint.cs │ │ ├── PaintEffects.cs │ │ └── PathEffectFactory.cs │ ├── PathEffects │ │ ├── Path1DPathEffect.cs │ │ ├── Path1DPathEffectStyle.cs │ │ ├── Path2DLineEffect.cs │ │ ├── Path2DPathEffect.cs │ │ ├── PathComposeEffect.cs │ │ ├── PathCornerEffect.cs │ │ ├── PathDashEffect.cs │ │ ├── PathDiscreteEffect.cs │ │ ├── PathSumEffect.cs │ │ ├── PathTrimEffect.cs │ │ └── TrimPathEffectMode.cs │ ├── Shaders │ │ ├── BitmapShader.cs │ │ ├── ColorFilterShader.cs │ │ ├── ColorShader.cs │ │ ├── ComposeShader.cs │ │ ├── Core │ │ │ └── ShaderTileMode.cs │ │ ├── EmptyShader.cs │ │ ├── LinearGradientShader.cs │ │ ├── LocalMatrixShader.cs │ │ ├── PerlinNoiseFractalNoiseShader.cs │ │ ├── PerlinNoiseTurbulenceShader.cs │ │ ├── RadialGradientShader.cs │ │ ├── SweepGradientShader.cs │ │ └── TwoPointConicalGradientShader.cs │ ├── ShapeStyle.cs │ └── Typeface.cs ├── Text.cs ├── Tools │ ├── ArcTool.cs │ ├── CircleTool.cs │ ├── ConicTool.cs │ ├── Core │ │ ├── BaseTool.cs │ │ ├── IContainerFactory.cs │ │ ├── IPointFilter.cs │ │ ├── ISelection.cs │ │ ├── ITool.cs │ │ ├── IToolContext.cs │ │ ├── Layout.cs │ │ ├── SelectionMode.cs │ │ ├── SelectionTargets.cs │ │ └── ToolContext.cs │ ├── CubicBezierTool.cs │ ├── LineTool.cs │ ├── MoveTool.cs │ ├── NoneTool.cs │ ├── OvalTool.cs │ ├── PathTool.cs │ ├── PointTool.cs │ ├── PolyLineTool.cs │ ├── QuadraticBezierTool.cs │ ├── RectangleTool.cs │ ├── ScribbleTool.cs │ ├── SelectionTool.cs │ ├── Settings │ │ ├── ArcToolSettings.cs │ │ ├── CircleToolSettings.cs │ │ ├── ConicToolSettings.cs │ │ ├── CubicBezierToolSettings.cs │ │ ├── LineToolSettings.cs │ │ ├── MoveToolSettings.cs │ │ ├── NoneToolSettings.cs │ │ ├── OvalToolSettings.cs │ │ ├── PathToolSettings.cs │ │ ├── PointToolSettings.cs │ │ ├── PolyLineToolSettings.cs │ │ ├── QuadraticBezierToolSettings.cs │ │ ├── RectangleToolSettings.cs │ │ ├── ScribbleToolSettings.cs │ │ ├── SelectionToolSettings.cs │ │ └── TextToolSettings.cs │ └── TextTool.cs └── ViewModelBase.cs ├── Views ├── Containers │ ├── CanvasContainerView.axaml │ ├── CanvasContainerView.axaml.cs │ ├── ContainerViewView.axaml │ ├── ContainerViewView.axaml.cs │ ├── DocumentContainerView.axaml │ ├── DocumentContainerView.axaml.cs │ ├── GroupLibraryView.axaml │ ├── GroupLibraryView.axaml.cs │ ├── SelectionStateView.axaml │ ├── SelectionStateView.axaml.cs │ ├── StyleLibraryView.axaml │ ├── StyleLibraryView.axaml.cs │ ├── ZoomServiceStateView.axaml │ └── ZoomServiceStateView.axaml.cs ├── ContainersView.axaml ├── ContainersView.axaml.cs ├── Filters │ ├── GridSnapSettingsView.axaml │ ├── GridSnapSettingsView.axaml.cs │ ├── LineSnapSettingsView.axaml │ └── LineSnapSettingsView.axaml.cs ├── MainView.axaml ├── MainView.axaml.cs ├── MainWindow.axaml ├── MainWindow.axaml.cs ├── MatrixView.axaml ├── MatrixView.axaml.cs ├── MenuView.axaml ├── MenuView.axaml.cs ├── Shapes │ ├── ArcShapeView.axaml │ ├── ArcShapeView.axaml.cs │ ├── CircleShapeView.axaml │ ├── CircleShapeView.axaml.cs │ ├── ConicShapeView.axaml │ ├── ConicShapeView.axaml.cs │ ├── CubicBezierShapeView.axaml │ ├── CubicBezierShapeView.axaml.cs │ ├── FigureShapeView.axaml │ ├── FigureShapeView.axaml.cs │ ├── GroupShapeView.axaml │ ├── GroupShapeView.axaml.cs │ ├── ImageShapeView.axaml │ ├── ImageShapeView.axaml.cs │ ├── LineShapeView.axaml │ ├── LineShapeView.axaml.cs │ ├── OvalShapeView.axaml │ ├── OvalShapeView.axaml.cs │ ├── PathShapeView.axaml │ ├── PathShapeView.axaml.cs │ ├── PointShapeView.axaml │ ├── PointShapeView.axaml.cs │ ├── QuadraticBezierShapeView.axaml │ ├── QuadraticBezierShapeView.axaml.cs │ ├── RectangleShapeView.axaml │ ├── RectangleShapeView.axaml.cs │ ├── ReferencePointShapeView.axaml │ ├── ReferencePointShapeView.axaml.cs │ ├── ReferenceShapeView.axaml │ ├── ReferenceShapeView.axaml.cs │ ├── TextShapeView.axaml │ └── TextShapeView.axaml.cs ├── Style │ ├── ArgbColorView.axaml │ ├── ArgbColorView.axaml.cs │ ├── ColorFilters │ │ ├── BlendModeColorFilterView.axaml │ │ ├── BlendModeColorFilterView.axaml.cs │ │ ├── ColorCubeColorFilterView.axaml │ │ ├── ColorCubeColorFilterView.axaml.cs │ │ ├── ColorMatrixColorFilterView.axaml │ │ ├── ColorMatrixColorFilterView.axaml.cs │ │ ├── ComposeColorFilterView.axaml │ │ ├── ComposeColorFilterView.axaml.cs │ │ ├── GammaColorFilterView.axaml │ │ ├── GammaColorFilterView.axaml.cs │ │ ├── HighContrastColorFilterView.axaml │ │ ├── HighContrastColorFilterView.axaml.cs │ │ ├── LightingColorFilterView.axaml │ │ ├── LightingColorFilterView.axaml.cs │ │ ├── LumaColorColorFilterView.axaml │ │ ├── LumaColorColorFilterView.axaml.cs │ │ ├── TableColorFilterView.axaml │ │ └── TableColorFilterView.axaml.cs │ ├── ImageFilters │ │ ├── AlphaThresholdImageFilterView.axaml │ │ ├── AlphaThresholdImageFilterView.axaml.cs │ │ ├── ArithmeticImageFilterView.axaml │ │ ├── ArithmeticImageFilterView.axaml.cs │ │ ├── BlendModeImageFilterView.axaml │ │ ├── BlendModeImageFilterView.axaml.cs │ │ ├── BlurImageFilterView.axaml │ │ ├── BlurImageFilterView.axaml.cs │ │ ├── ColorFilterImageFilterView.axaml │ │ ├── ColorFilterImageFilterView.axaml.cs │ │ ├── ComposeImageFilterView.axaml │ │ ├── ComposeImageFilterView.axaml.cs │ │ ├── DilateImageFilterView.axaml │ │ ├── DilateImageFilterView.axaml.cs │ │ ├── DisplacementMapEffectImageFilterView.axaml │ │ ├── DisplacementMapEffectImageFilterView.axaml.cs │ │ ├── DistantLitDiffuseImageFilterView.axaml │ │ ├── DistantLitDiffuseImageFilterView.axaml.cs │ │ ├── DistantLitSpecularImageFilterView.axaml │ │ ├── DistantLitSpecularImageFilterView.axaml.cs │ │ ├── DropShadowImageFilterView.axaml │ │ ├── DropShadowImageFilterView.axaml.cs │ │ ├── ErodeImageFilterView.axaml │ │ ├── ErodeImageFilterView.axaml.cs │ │ ├── ImageImageFilterView.axaml │ │ ├── ImageImageFilterView.axaml.cs │ │ ├── MagnifierImageFilterView.axaml │ │ ├── MagnifierImageFilterView.axaml.cs │ │ ├── MatrixConvolutionImageFilterView.axaml │ │ ├── MatrixConvolutionImageFilterView.axaml.cs │ │ ├── MatrixImageFilterView.axaml │ │ ├── MatrixImageFilterView.axaml.cs │ │ ├── MergeImageFilterView.axaml │ │ ├── MergeImageFilterView.axaml.cs │ │ ├── OffsetImageFilterView.axaml │ │ ├── OffsetImageFilterView.axaml.cs │ │ ├── PaintImageFilterView.axaml │ │ ├── PaintImageFilterView.axaml.cs │ │ ├── PictureImageFilterView.axaml │ │ ├── PictureImageFilterView.axaml.cs │ │ ├── PointLitDiffuseImageFilterView.axaml │ │ ├── PointLitDiffuseImageFilterView.axaml.cs │ │ ├── PointLitSpecularImageFilterView.axaml │ │ ├── PointLitSpecularImageFilterView.axaml.cs │ │ ├── SpotLitDiffuseImageFilterView.axaml │ │ ├── SpotLitDiffuseImageFilterView.axaml.cs │ │ ├── SpotLitSpecularImageFilterView.axaml │ │ ├── SpotLitSpecularImageFilterView.axaml.cs │ │ ├── TileImageFilterView.axaml │ │ └── TileImageFilterView.axaml.cs │ ├── MaskFilters │ │ ├── BlurMaskFilterView.axaml │ │ ├── BlurMaskFilterView.axaml.cs │ │ ├── ClipMaskFilterView.axaml │ │ ├── ClipMaskFilterView.axaml.cs │ │ ├── GammaMaskFilterView.axaml │ │ ├── GammaMaskFilterView.axaml.cs │ │ ├── TableMaskFilterView.axaml │ │ └── TableMaskFilterView.axaml.cs │ ├── PaintEffectsView.axaml │ ├── PaintEffectsView.axaml.cs │ ├── PaintView.axaml │ ├── PaintView.axaml.cs │ ├── PathEffects │ │ ├── Path1DPathEffectView.axaml │ │ ├── Path1DPathEffectView.axaml.cs │ │ ├── Path2DLineEffectView.axaml │ │ ├── Path2DLineEffectView.axaml.cs │ │ ├── Path2DPathEffectView.axaml │ │ ├── Path2DPathEffectView.axaml.cs │ │ ├── PathComposeEffectView.axaml │ │ ├── PathComposeEffectView.axaml.cs │ │ ├── PathCornerEffectView.axaml │ │ ├── PathCornerEffectView.axaml.cs │ │ ├── PathDashEffectView.axaml │ │ ├── PathDashEffectView.axaml.cs │ │ ├── PathDiscreteEffectView.axaml │ │ ├── PathDiscreteEffectView.axaml.cs │ │ ├── PathSumEffectView.axaml │ │ ├── PathSumEffectView.axaml.cs │ │ ├── PathTrimEffectView.axaml │ │ └── PathTrimEffectView.axaml.cs │ ├── Shaders │ │ ├── BitmapShaderView.axaml │ │ ├── BitmapShaderView.axaml.cs │ │ ├── ColorFilterShaderView.axaml │ │ ├── ColorFilterShaderView.axaml.cs │ │ ├── ColorShaderView.axaml │ │ ├── ColorShaderView.axaml.cs │ │ ├── ComposeShaderView.axaml │ │ ├── ComposeShaderView.axaml.cs │ │ ├── EmptyShaderView.axaml │ │ ├── EmptyShaderView.axaml.cs │ │ ├── LinearGradientShaderView.axaml │ │ ├── LinearGradientShaderView.axaml.cs │ │ ├── LocalMatrixShaderView.axaml │ │ ├── LocalMatrixShaderView.axaml.cs │ │ ├── PerlinNoiseFractalNoiseShaderView.axaml │ │ ├── PerlinNoiseFractalNoiseShaderView.axaml.cs │ │ ├── PerlinNoiseTurbulenceShaderView.axaml │ │ ├── PerlinNoiseTurbulenceShaderView.axaml.cs │ │ ├── RadialGradientShaderView.axaml │ │ ├── RadialGradientShaderView.axaml.cs │ │ ├── SweepGradientShaderView.axaml │ │ ├── SweepGradientShaderView.axaml.cs │ │ ├── TwoPointConicalGradientShaderView.axaml │ │ └── TwoPointConicalGradientShaderView.axaml.cs │ ├── ShapeStyleView.axaml │ ├── ShapeStyleView.axaml.cs │ ├── TypefaceView.axaml │ └── TypefaceView.axaml.cs ├── TextView.axaml ├── TextView.axaml.cs └── Tools │ ├── ArcToolSettingsView.axaml │ ├── ArcToolSettingsView.axaml.cs │ ├── ArcToolView.axaml │ ├── ArcToolView.axaml.cs │ ├── CircleToolSettingsView.axaml │ ├── CircleToolSettingsView.axaml.cs │ ├── CircleToolView.axaml │ ├── CircleToolView.axaml.cs │ ├── ConicToolSettingsView.axaml │ ├── ConicToolSettingsView.axaml.cs │ ├── ConicToolView.axaml │ ├── ConicToolView.axaml.cs │ ├── CubicBezierToolSettingsView.axaml │ ├── CubicBezierToolSettingsView.axaml.cs │ ├── CubicBezierToolView.axaml │ ├── CubicBezierToolView.axaml.cs │ ├── LineToolSettingsView.axaml │ ├── LineToolSettingsView.axaml.cs │ ├── LineToolView.axaml │ ├── LineToolView.axaml.cs │ ├── MoveToolSettingsView.axaml │ ├── MoveToolSettingsView.axaml.cs │ ├── MoveToolView.axaml │ ├── MoveToolView.axaml.cs │ ├── NoneToolSettingsView.axaml │ ├── NoneToolSettingsView.axaml.cs │ ├── NoneToolView.axaml │ ├── NoneToolView.axaml.cs │ ├── OvalToolSettingsView.axaml │ ├── OvalToolSettingsView.axaml.cs │ ├── OvalToolView.axaml │ ├── OvalToolView.axaml.cs │ ├── PathToolSettingsView.axaml │ ├── PathToolSettingsView.axaml.cs │ ├── PathToolView.axaml │ ├── PathToolView.axaml.cs │ ├── PointToolSettingsView.axaml │ ├── PointToolSettingsView.axaml.cs │ ├── PointToolView.axaml │ ├── PointToolView.axaml.cs │ ├── PolyLineToolSettingsView.axaml │ ├── PolyLineToolSettingsView.axaml.cs │ ├── PolyLineToolView.axaml │ ├── PolyLineToolView.axaml.cs │ ├── QuadraticBezierToolSettingsView.axaml │ ├── QuadraticBezierToolSettingsView.axaml.cs │ ├── QuadraticBezierToolView.axaml │ ├── QuadraticBezierToolView.axaml.cs │ ├── RectangleToolSettingsView.axaml │ ├── RectangleToolSettingsView.axaml.cs │ ├── RectangleToolView.axaml │ ├── RectangleToolView.axaml.cs │ ├── ScribbleToolSettingsView.axaml │ ├── ScribbleToolSettingsView.axaml.cs │ ├── ScribbleToolView.axaml │ ├── ScribbleToolView.axaml.cs │ ├── SelectionToolSettingsView.axaml │ ├── SelectionToolSettingsView.axaml.cs │ ├── SelectionToolView.axaml │ ├── SelectionToolView.axaml.cs │ ├── TextToolSettingsView.axaml │ ├── TextToolSettingsView.axaml.cs │ ├── TextToolView.axaml │ └── TextToolView.axaml.cs └── Zoom ├── Input ├── FitMode.cs ├── IDrawTarget.cs ├── IInputService.cs ├── IInputTarget.cs ├── IZoomService.cs ├── IZoomServiceState.cs └── Modifier.cs └── ZoomControl.cs /.gitattributes: -------------------------------------------------------------------------------- 1 | # Auto detect text files and perform LF normalization 2 | * text=auto 3 | 4 | # Custom for Visual Studio 5 | *.cs diff=csharp 6 | 7 | # Standard to msysgit 8 | *.doc diff=astextplain 9 | *.DOC diff=astextplain 10 | *.docx diff=astextplain 11 | *.DOCX diff=astextplain 12 | *.dot diff=astextplain 13 | *.DOT diff=astextplain 14 | *.pdf diff=astextplain 15 | *.PDF diff=astextplain 16 | *.rtf diff=astextplain 17 | *.RTF diff=astextplain 18 | -------------------------------------------------------------------------------- /.github/stale.yml: -------------------------------------------------------------------------------- 1 | # https://probot.github.io/apps/stale/ 2 | 3 | # Number of days of inactivity before an issue becomes stale 4 | daysUntilStale: 60 5 | 6 | # Number of days of inactivity before a stale issue is closed 7 | daysUntilClose: 7 8 | 9 | # Issues with these labels will never be considered stale 10 | exemptLabels: 11 | - pinned 12 | - security 13 | 14 | # Label to use when marking an issue as stale 15 | staleLabel: stale 16 | 17 | # Comment to post when marking an issue as stale. Set to `false` to disable 18 | markComment: > 19 | This issue has been automatically marked as stale because it has not had 20 | recent activity. It will be closed if no further activity occurs. Thank you 21 | for your contributions. 22 | 23 | # Comment to post when closing a stale issue. Set to `false` to disable 24 | closeComment: true 25 | -------------------------------------------------------------------------------- /.github/workflows/build.yml: -------------------------------------------------------------------------------- 1 | name: CI 2 | 3 | on: 4 | push: 5 | branches: 6 | - master 7 | - release/* 8 | pull_request: 9 | branches: 10 | - master 11 | - release/* 12 | 13 | jobs: 14 | 15 | build: 16 | strategy: 17 | matrix: 18 | os: [ubuntu-latest, windows-latest, macos-latest] 19 | name: Build ${{ matrix.os }} 20 | runs-on: ${{ matrix.os }} 21 | steps: 22 | - uses: actions/checkout@v1 23 | - name: Setup .NET Core 24 | uses: actions/setup-dotnet@v1 25 | - name: Build 26 | run: dotnet build -c Release 27 | -------------------------------------------------------------------------------- /Directory.Build.props: -------------------------------------------------------------------------------- 1 | 2 | 3 | 11.0.6 4 | 2.88.6 5 | 6 | 7 | -------------------------------------------------------------------------------- /LICENSE.txt: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) Wiesław Šoltés 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /NuGet.Config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /global.json: -------------------------------------------------------------------------------- 1 | { 2 | "sdk": { 3 | "version": "7.0.100", 4 | "rollForward": "latestMinor", 5 | "allowPrerelease": true 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /src/Draw2D/Converters/GroupIdToGroupConverter.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Globalization; 4 | using Avalonia; 5 | using Avalonia.Data.Converters; 6 | using Draw2D.ViewModels.Containers; 7 | 8 | namespace Draw2D.Converters; 9 | 10 | public class GroupIdToGroupConverter : IMultiValueConverter 11 | { 12 | public object Convert(IList values, Type targetType, object parameter, CultureInfo culture) 13 | { 14 | if (values?.Count == 2 && values[0] is string groupId && values[1] is IGroupLibrary groupLibrary) 15 | { 16 | return groupLibrary.Get(groupId); 17 | } 18 | return AvaloniaProperty.UnsetValue; 19 | } 20 | } -------------------------------------------------------------------------------- /src/Draw2D/Converters/IsEqualStringConverter.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Globalization; 3 | using Avalonia.Data.Converters; 4 | 5 | namespace Draw2D.Converters; 6 | 7 | public class IsEqualStringConverter : IValueConverter 8 | { 9 | public object Convert(object value, Type targetType, object parameter, CultureInfo culture) 10 | { 11 | if (value is string str1 && parameter is string str2) 12 | { 13 | return str1 == str2; 14 | } 15 | return false; 16 | } 17 | 18 | public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture) 19 | { 20 | throw new NotImplementedException(); 21 | } 22 | } -------------------------------------------------------------------------------- /src/Draw2D/Converters/StyleIdToStyleConverter.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Globalization; 4 | using Avalonia; 5 | using Avalonia.Data.Converters; 6 | using Draw2D.ViewModels.Containers; 7 | 8 | namespace Draw2D.Converters; 9 | 10 | public class StyleIdToStyleConverter : IMultiValueConverter 11 | { 12 | public object Convert(IList values, Type targetType, object parameter, CultureInfo culture) 13 | { 14 | if (values?.Count == 2 && values[0] is string styleId && values[1] is IStyleLibrary styleLibrary) 15 | { 16 | return styleLibrary.Get(styleId); 17 | } 18 | return AvaloniaProperty.UnsetValue; 19 | } 20 | } -------------------------------------------------------------------------------- /src/Draw2D/Program.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using Avalonia; 3 | 4 | namespace Draw2D; 5 | 6 | internal class Program 7 | { 8 | [STAThread] 9 | public static int Main(string[] args) 10 | { 11 | try 12 | { 13 | return BuildAvaloniaApp().StartWithClassicDesktopLifetime(args); 14 | } 15 | catch (Exception ex) 16 | { 17 | Console.WriteLine(ex.Message); 18 | Console.WriteLine(ex.StackTrace); 19 | } 20 | return 0; 21 | } 22 | 23 | public static AppBuilder BuildAvaloniaApp() 24 | => AppBuilder.Configure() 25 | .UsePlatformDetect() 26 | .UseSkia() 27 | .LogToTrace(); 28 | } 29 | -------------------------------------------------------------------------------- /src/Draw2D/Skia/Bounds/ContainsMode.cs: -------------------------------------------------------------------------------- 1 |  2 | namespace Draw2D.Bounds; 3 | 4 | public enum ContainsMode 5 | { 6 | Geometry, 7 | Bounds 8 | } -------------------------------------------------------------------------------- /src/Draw2D/Skia/Utilities/CompositeDisposable.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | 4 | namespace Draw2D; 5 | 6 | internal class CompositeDisposable : IDisposable 7 | { 8 | public IList Disposables { get; private set; } 9 | 10 | public CompositeDisposable() 11 | { 12 | Disposables = new List(); 13 | } 14 | 15 | public void Dispose() 16 | { 17 | foreach (var disposable in Disposables) 18 | { 19 | disposable?.Dispose(); 20 | } 21 | Disposables = null; 22 | } 23 | } -------------------------------------------------------------------------------- /src/Draw2D/ViewLocator.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using Avalonia.Controls; 3 | using Avalonia.Controls.Templates; 4 | using Draw2D.ViewModels; 5 | 6 | namespace Draw2D; 7 | 8 | public class ViewLocator : IDataTemplate 9 | { 10 | public bool SupportsRecycling => false; 11 | 12 | public Control Build(object data) 13 | { 14 | var name = data.GetType().FullName.Replace("ViewModel", "View"); 15 | var type = Type.GetType(name + "View"); 16 | 17 | if (type != null) 18 | { 19 | return (Control)Activator.CreateInstance(type); 20 | } 21 | else 22 | { 23 | return new TextBlock { Text = "Not Found: " + name }; 24 | } 25 | } 26 | 27 | public bool Match(object data) 28 | { 29 | return data is ViewModelBase; 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /src/Draw2D/ViewModels/Containers/Core/ICanvasContainer.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | 3 | namespace Draw2D.ViewModels.Containers; 4 | 5 | public interface ICanvasContainer : IBaseShape 6 | { 7 | IList Shapes { get; set; } 8 | } -------------------------------------------------------------------------------- /src/Draw2D/ViewModels/Containers/Core/IContainerView.cs: -------------------------------------------------------------------------------- 1 | using Core2D.UI.Zoom.Input; 2 | using Draw2D.ViewModels.Style; 3 | 4 | namespace Draw2D.ViewModels.Containers; 5 | 6 | public interface IContainerView : IDrawTarget, IHitTestable, ICopyable 7 | { 8 | string Title { get; set; } 9 | double Width { get; set; } 10 | double Height { get; set; } 11 | IPaint PrintBackground { get; set; } 12 | IPaint WorkBackground { get; set; } 13 | IPaint InputBackground { get; set; } 14 | ICanvasContainer CurrentContainer { get; set; } 15 | ICanvasContainer WorkingContainer { get; set; } 16 | ISelectionState SelectionState { get; set; } 17 | IZoomServiceState ZoomServiceState { get; set; } 18 | IContainerPresenter ContainerPresenter { get; set; } 19 | void Add(IBaseShape shape); 20 | void Remove(IBaseShape shape); 21 | void Reference(IBaseShape shape); 22 | void Style(string styleId); 23 | } -------------------------------------------------------------------------------- /src/Draw2D/ViewModels/Containers/Core/IDocumentContainer.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | 4 | namespace Draw2D.ViewModels.Containers; 5 | 6 | public interface IDocumentContainer : ICopyable, IDisposable 7 | { 8 | string Title { get; set; } 9 | IStyleLibrary StyleLibrary { get; set; } 10 | IGroupLibrary GroupLibrary { get; set; } 11 | IBaseShape PointTemplate { get; set; } 12 | IList ContainerViews { get; set; } 13 | IContainerView ContainerView { get; set; } 14 | } -------------------------------------------------------------------------------- /src/Draw2D/ViewModels/Containers/Core/IGroupLibrary.cs: -------------------------------------------------------------------------------- 1 | using Draw2D.ViewModels.Shapes; 2 | 3 | namespace Draw2D.ViewModels.Containers; 4 | 5 | public interface IGroupLibrary : ILibrary 6 | { 7 | } -------------------------------------------------------------------------------- /src/Draw2D/ViewModels/Containers/Core/ILibrary`1.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | 3 | namespace Draw2D.ViewModels.Containers; 4 | 5 | public interface ILibrary : IDirty where T : INode, ICopyable, IDirty 6 | { 7 | IList Items { get; set; } 8 | T CurrentItem { get; set; } 9 | void UpdateCache(); 10 | void Add(T value); 11 | void Remove(T value); 12 | T Get(string title); 13 | } -------------------------------------------------------------------------------- /src/Draw2D/ViewModels/Containers/Core/IStyleLibrary.cs: -------------------------------------------------------------------------------- 1 | using Draw2D.ViewModels.Style; 2 | 3 | namespace Draw2D.ViewModels.Containers; 4 | 5 | public interface IStyleLibrary : ILibrary 6 | { 7 | } -------------------------------------------------------------------------------- /src/Draw2D/ViewModels/Containers/Editor/IAvaloniaXamlConverter.cs: -------------------------------------------------------------------------------- 1 | using System.Text; 2 | using Draw2D.ViewModels.Tools; 3 | 4 | namespace Draw2D.ViewModels.Containers; 5 | 6 | public interface IAvaloniaXamlConverter 7 | { 8 | void ConvertToGeometryDrawing(IToolContext context, IContainerView containerView, StringBuilder sb, string indent); 9 | void ConvertToDrawingGroup(IToolContext context, IContainerView containerView, StringBuilder sb, string indent); 10 | void ConvertToDrawingPresenter(IToolContext context, IContainerView containerView, StringBuilder sb, string indent); 11 | void ConvertToPath(IToolContext context, IContainerView containerView, StringBuilder sb, string indent); 12 | void ConvertToCanvas(IToolContext context, IContainerView containerView, StringBuilder sb, string indent); 13 | } -------------------------------------------------------------------------------- /src/Draw2D/ViewModels/Containers/Editor/IContainerExporter.cs: -------------------------------------------------------------------------------- 1 | using Draw2D.ViewModels.Tools; 2 | 3 | namespace Draw2D.ViewModels.Containers; 4 | 5 | public interface IContainerExporter 6 | { 7 | void Export(IToolContext context, string path, IContainerView containerView); 8 | } -------------------------------------------------------------------------------- /src/Draw2D/ViewModels/Containers/Editor/IContainerImporter.cs: -------------------------------------------------------------------------------- 1 | using Draw2D.ViewModels.Tools; 2 | 3 | namespace Draw2D.ViewModels.Containers; 4 | 5 | public interface IContainerImporter 6 | { 7 | void Import(IToolContext context, string path, IContainerView containerView); 8 | } -------------------------------------------------------------------------------- /src/Draw2D/ViewModels/Containers/Editor/IContainerPresenter.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace Draw2D.ViewModels.Containers; 4 | 5 | public interface IContainerPresenter : IDisposable 6 | { 7 | void Draw(object context, double width, double height, double dx, double dy, double zx, double zy, double renderScaling); 8 | } -------------------------------------------------------------------------------- /src/Draw2D/ViewModels/Containers/Editor/IPathConverter.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using Draw2D.ViewModels.Shapes; 4 | using Draw2D.ViewModels.Tools; 5 | 6 | namespace Draw2D.ViewModels.Containers; 7 | 8 | public interface IPathConverter : IDisposable 9 | { 10 | PathShape ToPathShape(IToolContext context, IBaseShape shape); 11 | PathShape ToStrokePathShape(IToolContext context, IBaseShape shape); 12 | PathShape ToFillPathShape(IToolContext context, IBaseShape shape); 13 | PathShape Op(IToolContext context, PathOp op, ICollection selected); 14 | PathShape ToPathShape(IToolContext context, string svgPathData); 15 | string ToSvgPathData(IToolContext context, ICollection selected); 16 | } -------------------------------------------------------------------------------- /src/Draw2D/ViewModels/Containers/Editor/ISvgConverter.cs: -------------------------------------------------------------------------------- 1 | using Draw2D.ViewModels.Tools; 2 | 3 | namespace Draw2D.ViewModels.Containers; 4 | 5 | public interface ISvgConverter 6 | { 7 | string ConvertToSvgDocument(IToolContext context, IContainerView containerView); 8 | } -------------------------------------------------------------------------------- /src/Draw2D/ViewModels/Containers/Editor/PathOp.cs: -------------------------------------------------------------------------------- 1 |  2 | namespace Draw2D.ViewModels.Containers; 3 | 4 | public enum PathOp 5 | { 6 | Difference = 0, 7 | Intersect = 1, 8 | Union = 2, 9 | Xor = 3, 10 | ReverseDifference = 4 11 | } -------------------------------------------------------------------------------- /src/Draw2D/ViewModels/Containers/GroupLibrary.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | using System.Collections.ObjectModel; 3 | using System.Runtime.Serialization; 4 | using Draw2D.ViewModels.Shapes; 5 | 6 | namespace Draw2D.ViewModels.Containers; 7 | 8 | [DataContract(IsReference = true)] 9 | public class GroupLibrary : Library, IGroupLibrary 10 | { 11 | public virtual object Copy(Dictionary shared) 12 | { 13 | var copy = new GroupLibrary() 14 | { 15 | Name = this.Name, 16 | CurrentItem = (GroupShape)this.CurrentItem?.Copy(shared), 17 | Items = new ObservableCollection() 18 | }; 19 | 20 | foreach (var item in this.Items) 21 | { 22 | if (item is ICopyable copyable) 23 | { 24 | copy.Items.Add((GroupShape)(copyable.Copy(shared))); 25 | } 26 | } 27 | 28 | return copy; 29 | } 30 | 31 | } -------------------------------------------------------------------------------- /src/Draw2D/ViewModels/Containers/StyleLibrary.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | using System.Collections.ObjectModel; 3 | using System.Runtime.Serialization; 4 | using Draw2D.ViewModels.Style; 5 | 6 | namespace Draw2D.ViewModels.Containers; 7 | 8 | [DataContract(IsReference = true)] 9 | public class StyleLibrary : Library, IStyleLibrary 10 | { 11 | public virtual object Copy(Dictionary shared) 12 | { 13 | var copy = new StyleLibrary() 14 | { 15 | Name = this.Name, 16 | CurrentItem = (IShapeStyle)this.CurrentItem?.Copy(shared), 17 | Items = new ObservableCollection() 18 | }; 19 | 20 | foreach (var item in this.Items) 21 | { 22 | if (item is ICopyable copyable) 23 | { 24 | copy.Items.Add((IShapeStyle)(copyable.Copy(shared))); 25 | } 26 | } 27 | 28 | return copy; 29 | } 30 | } -------------------------------------------------------------------------------- /src/Draw2D/ViewModels/Core/HAlign.cs: -------------------------------------------------------------------------------- 1 |  2 | namespace Draw2D.ViewModels; 3 | 4 | public enum HAlign 5 | { 6 | Auto = 0, 7 | Left = 1, 8 | Center = 2, 9 | Right = 3 10 | } -------------------------------------------------------------------------------- /src/Draw2D/ViewModels/Core/IBaseShape.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | 3 | namespace Draw2D.ViewModels; 4 | 5 | public interface IBaseShape : INode, ICopyable, IDirty, ISelectable, IDrawable 6 | { 7 | void GetPoints(IList points); 8 | bool IsPointsTreeDirty(); 9 | } -------------------------------------------------------------------------------- /src/Draw2D/ViewModels/Core/IBounds.cs: -------------------------------------------------------------------------------- 1 | using Core2D.UI.Zoom.Input; 2 | using Spatial; 3 | 4 | namespace Draw2D.ViewModels; 5 | 6 | public interface IBounds 7 | { 8 | IPointShape TryToGetPoint(IBaseShape shape, Point2 target, double radius, IHitTest hitTest, Modifier modifier); 9 | IBaseShape Contains(IBaseShape shape, Point2 target, double radius, IHitTest hitTest, Modifier modifier); 10 | IBaseShape Overlaps(IBaseShape shape, Rect2 target, double radius, IHitTest hitTest, Modifier modifier); 11 | } -------------------------------------------------------------------------------- /src/Draw2D/ViewModels/Core/IConnectable.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | 3 | namespace Draw2D.ViewModels; 4 | 5 | public interface IConnectable 6 | { 7 | IList Points { get; set; } 8 | bool Connect(IPointShape point, IPointShape target); 9 | bool Disconnect(IPointShape point, out IPointShape result); 10 | bool Disconnect(); 11 | } -------------------------------------------------------------------------------- /src/Draw2D/ViewModels/Core/ICopyable.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | 3 | namespace Draw2D.ViewModels; 4 | 5 | public interface ICopyable 6 | { 7 | object Copy(Dictionary shared); 8 | } -------------------------------------------------------------------------------- /src/Draw2D/ViewModels/Core/IDirty.cs: -------------------------------------------------------------------------------- 1 |  2 | namespace Draw2D.ViewModels; 3 | 4 | public interface IDirty 5 | { 6 | bool IsDirty { get; set; } 7 | void MarkAsDirty(bool isDirty); 8 | bool IsTreeDirty(); 9 | void Invalidate(); 10 | } -------------------------------------------------------------------------------- /src/Draw2D/ViewModels/Core/IDrawable.cs: -------------------------------------------------------------------------------- 1 | using Draw2D.ViewModels.Style; 2 | 3 | namespace Draw2D.ViewModels; 4 | 5 | public interface IDrawable 6 | { 7 | IBounds Bounds { get; } 8 | IShapeDecorator Decorator { get; } 9 | string StyleId { get; set; } 10 | IPaintEffects Effects { get; set; } 11 | void Draw(object dc, IShapeRenderer renderer, double dx, double dy, double scale, object db, object r); 12 | } -------------------------------------------------------------------------------- /src/Draw2D/ViewModels/Core/IHitTest.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | using Core2D.UI.Zoom.Input; 3 | using Spatial; 4 | 5 | namespace Draw2D.ViewModels; 6 | 7 | public interface IHitTest 8 | { 9 | IPointShape TryToGetPoint(IEnumerable shapes, Point2 target, double radius, double scale, Modifier modifier, IPointShape exclude); 10 | IPointShape TryToGetPoint(IBaseShape shape, Point2 target, double radius, double scale, Modifier modifier); 11 | IBaseShape TryToGetShape(IEnumerable shapes, Point2 target, double radius, double scale, Modifier modifier); 12 | ISet TryToGetShapes(IEnumerable shapes, Rect2 target, double radius, double scale, Modifier modifier); 13 | } -------------------------------------------------------------------------------- /src/Draw2D/ViewModels/Core/IHitTestable.cs: -------------------------------------------------------------------------------- 1 | using Core2D.UI.Zoom.Input; 2 | using Draw2D.ViewModels.Tools; 3 | 4 | namespace Draw2D.ViewModels; 5 | 6 | public interface IHitTestable 7 | { 8 | IPointShape GetNextPoint(IToolContext context, double x, double y, bool connect, double radius, double scale, Modifier modifier); 9 | } -------------------------------------------------------------------------------- /src/Draw2D/ViewModels/Core/INode.cs: -------------------------------------------------------------------------------- 1 |  2 | namespace Draw2D.ViewModels; 3 | 4 | public interface INode 5 | { 6 | string Id { get; set; } 7 | string Name { get; set; } 8 | string Title { get; set; } 9 | object Owner { get; set; } 10 | } -------------------------------------------------------------------------------- /src/Draw2D/ViewModels/Core/IPointShape.cs: -------------------------------------------------------------------------------- 1 |  2 | namespace Draw2D.ViewModels; 3 | 4 | public interface IPointShape : IBaseShape 5 | { 6 | double X { get; set; } 7 | double Y { get; set; } 8 | HAlign HAlign { get; set; } 9 | VAlign VAlign { get; set; } 10 | IBaseShape Template { get; set; } 11 | } -------------------------------------------------------------------------------- /src/Draw2D/ViewModels/Core/ISelectable.cs: -------------------------------------------------------------------------------- 1 |  2 | namespace Draw2D.ViewModels; 3 | 4 | public interface ISelectable 5 | { 6 | void Move(ISelectionState selectionState, double dx, double dy); 7 | void Select(ISelectionState selectionState); 8 | void Deselect(ISelectionState selectionState); 9 | } -------------------------------------------------------------------------------- /src/Draw2D/ViewModels/Core/ISelectionState.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | 3 | namespace Draw2D.ViewModels; 4 | 5 | public interface ISelectionState : INode, IDirty 6 | { 7 | IBaseShape Hovered { get; set; } 8 | IBaseShape Selected { get; set; } 9 | ISet Shapes { get; set; } 10 | void Hover(IBaseShape shape); 11 | void Dehover(); 12 | bool IsSelected(IBaseShape shape); 13 | void Select(IBaseShape shape); 14 | void Deselect(IBaseShape shape); 15 | void Clear(); 16 | } -------------------------------------------------------------------------------- /src/Draw2D/ViewModels/Core/IShapeDecorator.cs: -------------------------------------------------------------------------------- 1 |  2 | namespace Draw2D.ViewModels; 3 | 4 | public interface IShapeDecorator 5 | { 6 | void Draw(object dc, IBaseShape shape, IShapeRenderer renderer, ISelectionState selectionState, double dx, double dy, double scale); 7 | } -------------------------------------------------------------------------------- /src/Draw2D/ViewModels/Core/VAlign.cs: -------------------------------------------------------------------------------- 1 |  2 | namespace Draw2D.ViewModels; 3 | 4 | public enum VAlign 5 | { 6 | Auto = 0, 7 | Top = 1, 8 | Center = 2, 9 | Bottom = 3 10 | } -------------------------------------------------------------------------------- /src/Draw2D/ViewModels/Decorators/ArcDecorator.cs: -------------------------------------------------------------------------------- 1 | using System.Runtime.Serialization; 2 | using Draw2D.ViewModels.Shapes; 3 | 4 | namespace Draw2D.ViewModels.Decorators; 5 | 6 | [DataContract(IsReference = true)] 7 | public class ArcDecorator : CommonDecorator 8 | { 9 | public void Draw(object dc, IShapeRenderer renderer, ArcShape arcShape, double dx, double dy, double scale) 10 | { 11 | var distance = arcShape.StartPoint.DistanceTo(arcShape.Point); 12 | 13 | DrawRectangle(dc, renderer, arcShape.StartPoint.X, arcShape.StartPoint.Y, distance, dx, dy, scale); 14 | } 15 | 16 | public override void Draw(object dc, IBaseShape shape, IShapeRenderer renderer, ISelectionState selectionState, double dx, double dy, double scale) 17 | { 18 | if (shape is ArcShape arcShape) 19 | { 20 | Draw(dc, renderer, arcShape, dx, dy, scale); 21 | } 22 | } 23 | } -------------------------------------------------------------------------------- /src/Draw2D/ViewModels/Decorators/CircleDecorator.cs: -------------------------------------------------------------------------------- 1 | using System.Runtime.Serialization; 2 | using Draw2D.ViewModels.Shapes; 3 | 4 | namespace Draw2D.ViewModels.Decorators; 5 | 6 | [DataContract(IsReference = true)] 7 | public class CircleDecorator : CommonDecorator 8 | { 9 | public void Draw(object dc, IShapeRenderer renderer, CircleShape circleShape, double dx, double dy, double scale) 10 | { 11 | var distance = circleShape.StartPoint.DistanceTo(circleShape.Point); 12 | 13 | DrawRectangle(dc, renderer, circleShape.StartPoint.X, circleShape.StartPoint.Y, distance, dx, dy, scale); 14 | } 15 | 16 | public override void Draw(object dc, IBaseShape shape, IShapeRenderer renderer, ISelectionState selectionState, double dx, double dy, double scale) 17 | { 18 | if (shape is CircleShape circleShape) 19 | { 20 | Draw(dc, renderer, circleShape, dx, dy, scale); 21 | } 22 | } 23 | } -------------------------------------------------------------------------------- /src/Draw2D/ViewModels/Decorators/ConicDecorator.cs: -------------------------------------------------------------------------------- 1 | using System.Runtime.Serialization; 2 | using Draw2D.ViewModels.Shapes; 3 | 4 | namespace Draw2D.ViewModels.Decorators; 5 | 6 | [DataContract(IsReference = true)] 7 | public class ConicDecorator : CommonDecorator 8 | { 9 | public void Draw(object dc, IShapeRenderer renderer, ConicShape conic, double dx, double dy, double scale) 10 | { 11 | DrawLine(dc, renderer, conic.StartPoint, conic.Point1, dx, dy, scale); 12 | DrawLine(dc, renderer, conic.Point1, conic.Point2, dx, dy, scale); 13 | } 14 | 15 | public override void Draw(object dc, IBaseShape shape, IShapeRenderer renderer, ISelectionState selectionState, double dx, double dy, double scale) 16 | { 17 | if (shape is ConicShape conic) 18 | { 19 | Draw(dc, renderer, conic, dx, dy, scale); 20 | } 21 | } 22 | } -------------------------------------------------------------------------------- /src/Draw2D/ViewModels/Decorators/ContainerDecorator.cs: -------------------------------------------------------------------------------- 1 | using System.Runtime.Serialization; 2 | using Draw2D.ViewModels.Containers; 3 | 4 | namespace Draw2D.ViewModels.Decorators; 5 | 6 | [DataContract(IsReference = true)] 7 | public class ContainerDecorator : CommonDecorator 8 | { 9 | public void Draw(object dc, IShapeRenderer renderer, ICanvasContainer container, ISelectionState selectionState, double dx, double dy, double scale) 10 | { 11 | if (selectionState.IsSelected(container)) 12 | { 13 | DrawBoxFromPoints(dc, renderer, container, dx, dy, scale); 14 | } 15 | } 16 | 17 | public override void Draw(object dc, IBaseShape shape, IShapeRenderer renderer, ISelectionState selectionState, double dx, double dy, double scale) 18 | { 19 | if (shape is ICanvasContainer container) 20 | { 21 | Draw(dc, renderer, container, selectionState, dx, dy, scale); 22 | } 23 | } 24 | } -------------------------------------------------------------------------------- /src/Draw2D/ViewModels/Decorators/CubicBezierDecorator.cs: -------------------------------------------------------------------------------- 1 | using System.Runtime.Serialization; 2 | using Draw2D.ViewModels.Shapes; 3 | 4 | namespace Draw2D.ViewModels.Decorators; 5 | 6 | [DataContract(IsReference = true)] 7 | public class CubicBezierDecorator : CommonDecorator 8 | { 9 | public void Draw(object dc, IShapeRenderer renderer, CubicBezierShape cubicBezier, double dx, double dy, double scale) 10 | { 11 | DrawLine(dc, renderer, cubicBezier.StartPoint, cubicBezier.Point1, dx, dy, scale); 12 | DrawLine(dc, renderer, cubicBezier.Point3, cubicBezier.Point2, dx, dy, scale); 13 | DrawLine(dc, renderer, cubicBezier.Point1, cubicBezier.Point2, dx, dy, scale); 14 | } 15 | 16 | public override void Draw(object dc, IBaseShape shape, IShapeRenderer renderer, ISelectionState selectionState, double dx, double dy, double scale) 17 | { 18 | if (shape is CubicBezierShape cubicBezier) 19 | { 20 | Draw(dc, renderer, cubicBezier, dx, dy, scale); 21 | } 22 | } 23 | } -------------------------------------------------------------------------------- /src/Draw2D/ViewModels/Decorators/GroupDecorator.cs: -------------------------------------------------------------------------------- 1 | using System.Runtime.Serialization; 2 | using Draw2D.ViewModels.Shapes; 3 | 4 | namespace Draw2D.ViewModels.Decorators; 5 | 6 | [DataContract(IsReference = true)] 7 | public class GroupDecorator : CommonDecorator 8 | { 9 | public void Draw(object dc, IShapeRenderer renderer, GroupShape group, ISelectionState selectionState, double dx, double dy, double scale) 10 | { 11 | if (selectionState.IsSelected(group)) 12 | { 13 | DrawBoxFromPoints(dc, renderer, group, dx, dy, scale); 14 | } 15 | } 16 | 17 | public override void Draw(object dc, IBaseShape shape, IShapeRenderer renderer, ISelectionState selectionState, double dx, double dy, double scale) 18 | { 19 | if (shape is GroupShape group) 20 | { 21 | Draw(dc, renderer, group, selectionState, dx, dy, scale); 22 | } 23 | } 24 | } -------------------------------------------------------------------------------- /src/Draw2D/ViewModels/Decorators/ImageDecorator.cs: -------------------------------------------------------------------------------- 1 | using System.Runtime.Serialization; 2 | using Draw2D.ViewModels.Shapes; 3 | 4 | namespace Draw2D.ViewModels.Decorators; 5 | 6 | [DataContract(IsReference = true)] 7 | public class ImageDecorator : CommonDecorator 8 | { 9 | public void Draw(object dc, IShapeRenderer renderer, ImageShape imageShape, double dx, double dy, double scale) 10 | { 11 | DrawRectangle(dc, renderer, imageShape.StartPoint, imageShape.Point, dx, dy, scale); 12 | } 13 | 14 | public override void Draw(object dc, IBaseShape shape, IShapeRenderer renderer, ISelectionState selectionState, double dx, double dy, double scale) 15 | { 16 | if (shape is ImageShape imageShape) 17 | { 18 | Draw(dc, renderer, imageShape, dx, dy, scale); 19 | } 20 | } 21 | } -------------------------------------------------------------------------------- /src/Draw2D/ViewModels/Decorators/LineDecorator.cs: -------------------------------------------------------------------------------- 1 | using System.Runtime.Serialization; 2 | using Draw2D.ViewModels.Shapes; 3 | 4 | namespace Draw2D.ViewModels.Decorators; 5 | 6 | [DataContract(IsReference = true)] 7 | public class LineDecorator : CommonDecorator 8 | { 9 | public void Draw(object dc, IShapeRenderer renderer, LineShape lineShape, double dx, double dy, double scale) 10 | { 11 | DrawRectangle(dc, renderer, lineShape.StartPoint, lineShape.Point, dx, dy, scale); 12 | } 13 | 14 | public override void Draw(object dc, IBaseShape shape, IShapeRenderer renderer, ISelectionState selectionState, double dx, double dy, double scale) 15 | { 16 | if (shape is LineShape lineShape) 17 | { 18 | Draw(dc, renderer, lineShape, dx, dy, scale); 19 | } 20 | } 21 | } -------------------------------------------------------------------------------- /src/Draw2D/ViewModels/Decorators/OvalDecorator.cs: -------------------------------------------------------------------------------- 1 | using System.Runtime.Serialization; 2 | using Draw2D.ViewModels.Shapes; 3 | 4 | namespace Draw2D.ViewModels.Decorators; 5 | 6 | [DataContract(IsReference = true)] 7 | public class OvalDecorator : CommonDecorator 8 | { 9 | public void Draw(object dc, IShapeRenderer renderer, OvalShape ovalShape, double dx, double dy, double scale) 10 | { 11 | DrawRectangle(dc, renderer, ovalShape.StartPoint, ovalShape.Point, dx, dy, scale); 12 | } 13 | 14 | public override void Draw(object dc, IBaseShape shape, IShapeRenderer renderer, ISelectionState selectionState, double dx, double dy, double scale) 15 | { 16 | if (shape is OvalShape ovalShape) 17 | { 18 | Draw(dc, renderer, ovalShape, dx, dy, scale); 19 | } 20 | } 21 | } -------------------------------------------------------------------------------- /src/Draw2D/ViewModels/Decorators/PathDecorator.cs: -------------------------------------------------------------------------------- 1 | using System.Runtime.Serialization; 2 | using Draw2D.ViewModels.Shapes; 3 | 4 | namespace Draw2D.ViewModels.Decorators; 5 | 6 | [DataContract(IsReference = true)] 7 | public class PathDecorator : CommonDecorator 8 | { 9 | public void Draw(object dc, IShapeRenderer renderer, PathShape path, ISelectionState selectionState, double dx, double dy, double scale) 10 | { 11 | if (selectionState.IsSelected(path)) 12 | { 13 | DrawBoxFromPoints(dc, renderer, path, dx, dy, scale); 14 | } 15 | 16 | foreach (var shape in path.Shapes) 17 | { 18 | shape.Decorator?.Draw(dc, shape, renderer, selectionState, dx, dy, scale); 19 | } 20 | } 21 | 22 | public override void Draw(object dc, IBaseShape shape, IShapeRenderer renderer, ISelectionState selectionState, double dx, double dy, double scale) 23 | { 24 | if (shape is PathShape path) 25 | { 26 | Draw(dc, renderer, path, selectionState, dx, dy, scale); 27 | } 28 | } 29 | } -------------------------------------------------------------------------------- /src/Draw2D/ViewModels/Decorators/PointDecorator.cs: -------------------------------------------------------------------------------- 1 | using System.Runtime.Serialization; 2 | 3 | namespace Draw2D.ViewModels.Decorators; 4 | 5 | [DataContract(IsReference = true)] 6 | public class PointDecorator : CommonDecorator 7 | { 8 | public void Draw(object dc, IShapeRenderer renderer, IPointShape pointShape, double dx, double dy, double scale) 9 | { 10 | DrawRectangle(dc, renderer, pointShape, 10, dx, dy, scale); 11 | } 12 | 13 | public override void Draw(object dc, IBaseShape shape, IShapeRenderer renderer, ISelectionState selectionState, double dx, double dy, double scale) 14 | { 15 | // TODO: 16 | //if (shape is IPointShape pointShape) 17 | //{ 18 | // Draw(dc, renderer, pointShape, dx, dy, scale); 19 | //} 20 | } 21 | } -------------------------------------------------------------------------------- /src/Draw2D/ViewModels/Decorators/QuadraticBezierDecorator.cs: -------------------------------------------------------------------------------- 1 | using System.Runtime.Serialization; 2 | using Draw2D.ViewModels.Shapes; 3 | 4 | namespace Draw2D.ViewModels.Decorators; 5 | 6 | [DataContract(IsReference = true)] 7 | public class QuadraticBezierDecorator : CommonDecorator 8 | { 9 | public void Draw(object dc, IShapeRenderer renderer, QuadraticBezierShape quadraticBezier, double dx, double dy, double scale) 10 | { 11 | DrawLine(dc, renderer, quadraticBezier.StartPoint, quadraticBezier.Point1, dx, dy, scale); 12 | DrawLine(dc, renderer, quadraticBezier.Point1, quadraticBezier.Point2, dx, dy, scale); 13 | } 14 | 15 | public override void Draw(object dc, IBaseShape shape, IShapeRenderer renderer, ISelectionState selectionState, double dx, double dy, double scale) 16 | { 17 | if (shape is QuadraticBezierShape quadraticBezier) 18 | { 19 | Draw(dc, renderer, quadraticBezier, dx, dy, scale); 20 | } 21 | } 22 | } -------------------------------------------------------------------------------- /src/Draw2D/ViewModels/Decorators/RectangleDecorator.cs: -------------------------------------------------------------------------------- 1 | using System.Runtime.Serialization; 2 | using Draw2D.ViewModels.Shapes; 3 | 4 | namespace Draw2D.ViewModels.Decorators; 5 | 6 | [DataContract(IsReference = true)] 7 | public class RectangleDecorator : CommonDecorator 8 | { 9 | public void Draw(object dc, IShapeRenderer renderer, RectangleShape rectangleShape, double dx, double dy, double scale) 10 | { 11 | DrawRectangle(dc, renderer, rectangleShape.StartPoint, rectangleShape.Point, dx, dy, scale); 12 | } 13 | 14 | public override void Draw(object dc, IBaseShape shape, IShapeRenderer renderer, ISelectionState selectionState, double dx, double dy, double scale) 15 | { 16 | if (shape is RectangleShape rectangleShape) 17 | { 18 | Draw(dc, renderer, rectangleShape, dx, dy, scale); 19 | } 20 | } 21 | } -------------------------------------------------------------------------------- /src/Draw2D/ViewModels/Decorators/ReferenceDecorator.cs: -------------------------------------------------------------------------------- 1 | using System.Runtime.Serialization; 2 | using Draw2D.ViewModels.Shapes; 3 | 4 | namespace Draw2D.ViewModels.Decorators; 5 | 6 | [DataContract(IsReference = true)] 7 | public class ReferenceDecorator : CommonDecorator 8 | { 9 | public void Draw(object dc, IShapeRenderer renderer, ReferenceShape reference, ISelectionState selectionState, double dx, double dy, double scale) 10 | { 11 | if (selectionState.IsSelected(reference) && reference.Template != null) 12 | { 13 | DrawBoxFromPoints(dc, renderer, reference.Template, dx + reference.X, dy + reference.Y, scale); 14 | } 15 | } 16 | 17 | public override void Draw(object dc, IBaseShape shape, IShapeRenderer renderer, ISelectionState selectionState, double dx, double dy, double scale) 18 | { 19 | if (shape is ReferenceShape reference) 20 | { 21 | Draw(dc, renderer, reference, selectionState, dx, dy, scale); 22 | } 23 | } 24 | } -------------------------------------------------------------------------------- /src/Draw2D/ViewModels/Decorators/TextDecorator.cs: -------------------------------------------------------------------------------- 1 | using System.Runtime.Serialization; 2 | using Draw2D.ViewModels.Shapes; 3 | 4 | namespace Draw2D.ViewModels.Decorators; 5 | 6 | [DataContract(IsReference = true)] 7 | public class TextDecorator : CommonDecorator 8 | { 9 | public void Draw(object dc, IShapeRenderer renderer, TextShape textShape, double dx, double dy, double scale) 10 | { 11 | DrawRectangle(dc, renderer, textShape.StartPoint, textShape.Point, dx, dy, scale); 12 | } 13 | 14 | public override void Draw(object dc, IBaseShape shape, IShapeRenderer renderer, ISelectionState selectionState, double dx, double dy, double scale) 15 | { 16 | if (shape is TextShape textShape) 17 | { 18 | Draw(dc, renderer, textShape, dx, dy, scale); 19 | } 20 | } 21 | } -------------------------------------------------------------------------------- /src/Draw2D/ViewModels/EditMode.cs: -------------------------------------------------------------------------------- 1 |  2 | namespace Draw2D.ViewModels; 3 | 4 | public enum EditMode 5 | { 6 | Touch, 7 | Mouse 8 | } -------------------------------------------------------------------------------- /src/Draw2D/ViewModels/Filters/Core/GridSnapMode.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace Draw2D.ViewModels.Filters; 4 | 5 | [Flags] 6 | public enum GridSnapMode 7 | { 8 | None = 0, 9 | Horizontal = 1, 10 | Vertical = 2, 11 | All = Horizontal | Vertical 12 | } -------------------------------------------------------------------------------- /src/Draw2D/ViewModels/Filters/Core/LineSnapMode.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace Draw2D.ViewModels.Filters; 4 | 5 | [Flags] 6 | public enum LineSnapMode 7 | { 8 | None = 0, 9 | Point = 1, 10 | Middle = 2, 11 | Intersection = 4, 12 | Horizontal = 8, 13 | Vertical = 16, 14 | Nearest = 32, 15 | All = Point | Middle | Intersection | Horizontal | Vertical | Nearest 16 | } -------------------------------------------------------------------------------- /src/Draw2D/ViewModels/Filters/Core/LineSnapTarget.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace Draw2D.ViewModels.Filters; 4 | 5 | [Flags] 6 | public enum LineSnapTarget 7 | { 8 | None = 0, 9 | Shapes = 1, 10 | All = Shapes 11 | } -------------------------------------------------------------------------------- /src/Draw2D/ViewModels/SettingsBase.cs: -------------------------------------------------------------------------------- 1 | using System.Runtime.Serialization; 2 | 3 | namespace Draw2D.ViewModels; 4 | 5 | [DataContract(IsReference = true)] 6 | public abstract class SettingsBase : ViewModelBase 7 | { 8 | } -------------------------------------------------------------------------------- /src/Draw2D/ViewModels/Shapes/Core/PathFillType.cs: -------------------------------------------------------------------------------- 1 |  2 | namespace Draw2D.ViewModels.Shapes; 3 | 4 | public enum PathFillType 5 | { 6 | Winding = 0, 7 | EvenOdd = 1, 8 | InverseWinding = 2, 9 | InverseEvenOdd = 3 10 | } -------------------------------------------------------------------------------- /src/Draw2D/ViewModels/Shapes/Core/StretchMode.cs: -------------------------------------------------------------------------------- 1 |  2 | namespace Draw2D.ViewModels.Shapes; 3 | 4 | public enum StretchMode 5 | { 6 | None, 7 | Center, 8 | Fill, 9 | Uniform, 10 | UniformToFill 11 | } -------------------------------------------------------------------------------- /src/Draw2D/ViewModels/Shapes/Extensions/LineShapeExtensions.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.ObjectModel; 2 | using Spatial; 3 | 4 | namespace Draw2D.ViewModels.Shapes; 5 | 6 | public static class LineShapeExtensions 7 | { 8 | public static Line2 ToLine2(this LineShape line, double dx = 0.0, double dy = 0.0) 9 | { 10 | return Line2.FromPoints( 11 | line.StartPoint.X, line.StartPoint.Y, 12 | line.Point.X, line.Point.Y, 13 | dx, dy); 14 | } 15 | 16 | public static LineShape FromLine2(this Line2 line) 17 | { 18 | return new LineShape(line.A.FromPoint2(), line.B.FromPoint2()) 19 | { 20 | Points = new ObservableCollection() 21 | }; 22 | } 23 | } -------------------------------------------------------------------------------- /src/Draw2D/ViewModels/Shapes/Extensions/OvalShapeExtensions.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.ObjectModel; 2 | using Spatial; 3 | 4 | namespace Draw2D.ViewModels.Shapes; 5 | 6 | public static class OvalShapeExtensions 7 | { 8 | public static Rect2 ToRect2(this OvalShape oval, double dx = 0.0, double dy = 0.0) 9 | { 10 | return Rect2.FromPoints( 11 | oval.StartPoint.X, oval.StartPoint.Y, 12 | oval.Point.X, oval.Point.Y, 13 | dx, dy); 14 | } 15 | 16 | public static OvalShape FromRect2(this Rect2 rect) 17 | { 18 | return new OvalShape(rect.TopLeft.FromPoint2(), rect.BottomRight.FromPoint2()) 19 | { 20 | Points = new ObservableCollection() 21 | }; 22 | } 23 | } -------------------------------------------------------------------------------- /src/Draw2D/ViewModels/Shapes/Extensions/PointShapeExtensions.cs: -------------------------------------------------------------------------------- 1 | using Spatial; 2 | 3 | namespace Draw2D.ViewModels.Shapes; 4 | 5 | public static class PointShapeExtensions 6 | { 7 | public static Point2 ToPoint2(this IPointShape point) 8 | { 9 | return new Point2(point.X, point.Y); 10 | } 11 | 12 | public static IPointShape FromPoint2(this Point2 point, IBaseShape template = null) 13 | { 14 | return new PointShape(point.X, point.Y, template); 15 | } 16 | 17 | public static double DistanceTo(this IPointShape point, IPointShape other) 18 | { 19 | return point.ToPoint2().DistanceTo(other.ToPoint2()); 20 | } 21 | 22 | public static Rect2 ToRect2(this IPointShape center, double radius) 23 | { 24 | return Rect2.FromPoints( 25 | center.X - radius, 26 | center.Y - radius, 27 | center.X + radius, 28 | center.Y + radius); 29 | } 30 | } -------------------------------------------------------------------------------- /src/Draw2D/ViewModels/Shapes/Extensions/RectangleShapeExtensions.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.ObjectModel; 2 | using Spatial; 3 | 4 | namespace Draw2D.ViewModels.Shapes; 5 | 6 | public static class RectangleShapeExtensions 7 | { 8 | public static Rect2 ToRect2(this RectangleShape rectangle, double dx = 0.0, double dy = 0.0) 9 | { 10 | return Rect2.FromPoints( 11 | rectangle.StartPoint.X, rectangle.StartPoint.Y, 12 | rectangle.Point.X, rectangle.Point.Y, 13 | dx, dy); 14 | } 15 | 16 | public static RectangleShape FromRect2(this Rect2 rect) 17 | { 18 | return new RectangleShape(rect.TopLeft.FromPoint2(), rect.BottomRight.FromPoint2()) 19 | { 20 | Points = new ObservableCollection() 21 | }; 22 | } 23 | } -------------------------------------------------------------------------------- /src/Draw2D/ViewModels/Style/ColorFilters/BlendModeColorFilter.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | using System.Runtime.Serialization; 3 | 4 | namespace Draw2D.ViewModels.Style.ColorFilters; 5 | 6 | [DataContract(IsReference = true)] 7 | public class BlendModeColorFilter : ViewModelBase, IColorFilter 8 | { 9 | // TODO: 10 | 11 | public BlendModeColorFilter() 12 | { 13 | } 14 | 15 | public object Copy(Dictionary shared) 16 | { 17 | return new BlendModeColorFilter() 18 | { 19 | Title = this.Title 20 | }; 21 | } 22 | } -------------------------------------------------------------------------------- /src/Draw2D/ViewModels/Style/ColorFilters/ColorCubeColorFilter.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | using System.Runtime.Serialization; 3 | 4 | namespace Draw2D.ViewModels.Style.ColorFilters; 5 | 6 | [DataContract(IsReference = true)] 7 | public class ColorCubeColorFilter : ViewModelBase, IColorFilter 8 | { 9 | // TODO: 10 | 11 | public ColorCubeColorFilter() 12 | { 13 | } 14 | 15 | public object Copy(Dictionary shared) 16 | { 17 | return new ColorCubeColorFilter() 18 | { 19 | Title = this.Title 20 | }; 21 | } 22 | } -------------------------------------------------------------------------------- /src/Draw2D/ViewModels/Style/ColorFilters/ColorMatrixColorFilter.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | using System.Runtime.Serialization; 3 | 4 | namespace Draw2D.ViewModels.Style.ColorFilters; 5 | 6 | [DataContract(IsReference = true)] 7 | public class ColorMatrixColorFilter : ViewModelBase, IColorFilter 8 | { 9 | // TODO: 10 | 11 | public ColorMatrixColorFilter() 12 | { 13 | } 14 | 15 | public object Copy(Dictionary shared) 16 | { 17 | return new ColorMatrixColorFilter() 18 | { 19 | Title = this.Title 20 | }; 21 | } 22 | } -------------------------------------------------------------------------------- /src/Draw2D/ViewModels/Style/ColorFilters/ComposeColorFilter.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | using System.Runtime.Serialization; 3 | 4 | namespace Draw2D.ViewModels.Style.ColorFilters; 5 | 6 | [DataContract(IsReference = true)] 7 | public class ComposeColorFilter : ViewModelBase, IColorFilter 8 | { 9 | // TODO: 10 | 11 | public ComposeColorFilter() 12 | { 13 | } 14 | 15 | public object Copy(Dictionary shared) 16 | { 17 | return new ComposeColorFilter() 18 | { 19 | Title = this.Title 20 | }; 21 | } 22 | } -------------------------------------------------------------------------------- /src/Draw2D/ViewModels/Style/ColorFilters/GammaColorFilter.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | using System.Runtime.Serialization; 3 | 4 | namespace Draw2D.ViewModels.Style.ColorFilters; 5 | 6 | [DataContract(IsReference = true)] 7 | public class GammaColorFilter : ViewModelBase, IColorFilter 8 | { 9 | // TODO: 10 | 11 | public GammaColorFilter() 12 | { 13 | } 14 | 15 | public object Copy(Dictionary shared) 16 | { 17 | return new GammaColorFilter() 18 | { 19 | Title = this.Title 20 | }; 21 | } 22 | } -------------------------------------------------------------------------------- /src/Draw2D/ViewModels/Style/ColorFilters/HighContrastColorFilter.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | using System.Runtime.Serialization; 3 | 4 | namespace Draw2D.ViewModels.Style.ColorFilters; 5 | 6 | [DataContract(IsReference = true)] 7 | public class HighContrastColorFilter : ViewModelBase, IColorFilter 8 | { 9 | // TODO: 10 | 11 | public HighContrastColorFilter() 12 | { 13 | } 14 | 15 | public object Copy(Dictionary shared) 16 | { 17 | return new HighContrastColorFilter() 18 | { 19 | Title = this.Title 20 | }; 21 | } 22 | } -------------------------------------------------------------------------------- /src/Draw2D/ViewModels/Style/ColorFilters/LightingColorFilter.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | using System.Runtime.Serialization; 3 | 4 | namespace Draw2D.ViewModels.Style.ColorFilters; 5 | 6 | [DataContract(IsReference = true)] 7 | public class LightingColorFilter : ViewModelBase, IColorFilter 8 | { 9 | // TODO: 10 | 11 | public LightingColorFilter() 12 | { 13 | } 14 | 15 | public object Copy(Dictionary shared) 16 | { 17 | return new LightingColorFilter() 18 | { 19 | Title = this.Title 20 | }; 21 | } 22 | } -------------------------------------------------------------------------------- /src/Draw2D/ViewModels/Style/ColorFilters/LumaColorColorFilter.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | using System.Runtime.Serialization; 3 | 4 | namespace Draw2D.ViewModels.Style.ColorFilters; 5 | 6 | [DataContract(IsReference = true)] 7 | public class LumaColorColorFilter : ViewModelBase, IColorFilter 8 | { 9 | // TODO: 10 | 11 | public LumaColorColorFilter() 12 | { 13 | } 14 | 15 | public object Copy(Dictionary shared) 16 | { 17 | return new LumaColorColorFilter() 18 | { 19 | Title = this.Title 20 | }; 21 | } 22 | } -------------------------------------------------------------------------------- /src/Draw2D/ViewModels/Style/ColorFilters/TableColorFilter.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | using System.Runtime.Serialization; 3 | 4 | namespace Draw2D.ViewModels.Style.ColorFilters; 5 | 6 | [DataContract(IsReference = true)] 7 | public class TableColorFilter : ViewModelBase, IColorFilter 8 | { 9 | // TODO: 10 | 11 | public TableColorFilter() 12 | { 13 | } 14 | 15 | public object Copy(Dictionary shared) 16 | { 17 | return new TableColorFilter() 18 | { 19 | Title = this.Title 20 | }; 21 | } 22 | } -------------------------------------------------------------------------------- /src/Draw2D/ViewModels/Style/Core/BlendMode.cs: -------------------------------------------------------------------------------- 1 |  2 | namespace Draw2D.ViewModels.Style; 3 | 4 | public enum BlendMode 5 | { 6 | Clear = 0, 7 | Src = 1, 8 | Dst = 2, 9 | SrcOver = 3, 10 | DstOver = 4, 11 | SrcIn = 5, 12 | DstIn = 6, 13 | SrcOut = 7, 14 | DstOut = 8, 15 | SrcATop = 9, 16 | DstATop = 10, 17 | Xor = 11, 18 | Plus = 12, 19 | Modulate = 13, 20 | Screen = 14, 21 | Overlay = 15, 22 | Darken = 16, 23 | Lighten = 17, 24 | ColorDodge = 18, 25 | ColorBurn = 19, 26 | HardLight = 20, 27 | SoftLight = 21, 28 | Difference = 22, 29 | Exclusion = 23, 30 | Multiply = 24, 31 | Hue = 25, 32 | Saturation = 26, 33 | Color = 27, 34 | Luminosity = 28 35 | } -------------------------------------------------------------------------------- /src/Draw2D/ViewModels/Style/Core/FontStyleSlant.cs: -------------------------------------------------------------------------------- 1 |  2 | namespace Draw2D.ViewModels.Style; 3 | 4 | public enum FontStyleSlant 5 | { 6 | Upright = 0, 7 | Italic = 1, 8 | Oblique = 2 9 | } -------------------------------------------------------------------------------- /src/Draw2D/ViewModels/Style/Core/IColorFilter.cs: -------------------------------------------------------------------------------- 1 |  2 | namespace Draw2D.ViewModels.Style; 3 | 4 | public interface IColorFilter : INode, IDirty, ICopyable 5 | { 6 | } -------------------------------------------------------------------------------- /src/Draw2D/ViewModels/Style/Core/IImageFilter.cs: -------------------------------------------------------------------------------- 1 |  2 | namespace Draw2D.ViewModels.Style; 3 | 4 | public interface IImageFilter : INode, IDirty, ICopyable 5 | { 6 | } -------------------------------------------------------------------------------- /src/Draw2D/ViewModels/Style/Core/IMaskFilter.cs: -------------------------------------------------------------------------------- 1 |  2 | namespace Draw2D.ViewModels.Style; 3 | 4 | public interface IMaskFilter : INode, IDirty, ICopyable 5 | { 6 | } -------------------------------------------------------------------------------- /src/Draw2D/ViewModels/Style/Core/IPaint.cs: -------------------------------------------------------------------------------- 1 |  2 | namespace Draw2D.ViewModels.Style; 3 | 4 | public interface IPaint : INode, IDirty, ICopyable 5 | { 6 | PaintStyle PaintStyle { get; set; } 7 | // Common 8 | ArgbColor Color { get; set; } 9 | bool IsAntialias { get; set; } 10 | IPaintEffects Effects { get; set; } 11 | // Stroke 12 | double StrokeWidth { get; set; } 13 | StrokeCap StrokeCap { get; set; } 14 | StrokeJoin StrokeJoin { get; set; } 15 | double StrokeMiter { get; set; } 16 | bool IsScaled { get; set; } 17 | // Text 18 | Typeface Typeface { get; set; } 19 | double FontSize { get; set; } 20 | bool LcdRenderText { get; set; } 21 | bool SubpixelText { get; set; } 22 | HAlign HAlign { get; set; } 23 | VAlign VAlign { get; set; } 24 | } -------------------------------------------------------------------------------- /src/Draw2D/ViewModels/Style/Core/IPaintEffects.cs: -------------------------------------------------------------------------------- 1 |  2 | namespace Draw2D.ViewModels.Style; 3 | 4 | public interface IPaintEffects : INode, IDirty, ICopyable 5 | { 6 | BlendMode BlendMode { get; set; } 7 | IColorFilter ColorFilter { get; set; } 8 | IImageFilter ImageFilter { get; set; } 9 | IMaskFilter MaskFilter { get; set; } 10 | IPathEffect PathEffect { get; set; } 11 | IShader Shader { get; set; } 12 | void SetColorFilter(IColorFilter colorFilter); 13 | void SetImageFilter(IImageFilter imageFilter); 14 | void SetMaskFilter(IMaskFilter maskFilter); 15 | void SetPathEffect(IPathEffect pathEffect); 16 | void SetShader(IShader shader); 17 | } -------------------------------------------------------------------------------- /src/Draw2D/ViewModels/Style/Core/IPathEffect.cs: -------------------------------------------------------------------------------- 1 |  2 | namespace Draw2D.ViewModels.Style; 3 | 4 | public interface IPathEffect : INode, IDirty, ICopyable 5 | { 6 | } -------------------------------------------------------------------------------- /src/Draw2D/ViewModels/Style/Core/IShader.cs: -------------------------------------------------------------------------------- 1 |  2 | namespace Draw2D.ViewModels.Style; 3 | 4 | public interface IShader : INode, IDirty, ICopyable 5 | { 6 | } -------------------------------------------------------------------------------- /src/Draw2D/ViewModels/Style/Core/IShapeStyle.cs: -------------------------------------------------------------------------------- 1 |  2 | namespace Draw2D.ViewModels.Style; 3 | 4 | public interface IShapeStyle : INode, IDirty, ICopyable 5 | { 6 | bool IsStroked { get; set; } 7 | bool IsFilled { get; set; } 8 | bool IsText { get; set; } 9 | IPaint StrokePaint { get; set; } 10 | IPaint FillPaint { get; set; } 11 | IPaint TextPaint { get; set; } 12 | } -------------------------------------------------------------------------------- /src/Draw2D/ViewModels/Style/Core/PaintStyle.cs: -------------------------------------------------------------------------------- 1 |  2 | namespace Draw2D.ViewModels.Style; 3 | 4 | public enum PaintStyle 5 | { 6 | Fill = 0, 7 | Stroke = 1, 8 | StrokeAndFill = 2 9 | } -------------------------------------------------------------------------------- /src/Draw2D/ViewModels/Style/Core/StrokeCap.cs: -------------------------------------------------------------------------------- 1 |  2 | namespace Draw2D.ViewModels.Style; 3 | 4 | public enum StrokeCap 5 | { 6 | Butt = 0, 7 | Round = 1, 8 | Square = 2 9 | } -------------------------------------------------------------------------------- /src/Draw2D/ViewModels/Style/Core/StrokeJoin.cs: -------------------------------------------------------------------------------- 1 |  2 | namespace Draw2D.ViewModels.Style; 3 | 4 | public enum StrokeJoin 5 | { 6 | Miter = 0, 7 | Round = 1, 8 | Bevel = 2 9 | } -------------------------------------------------------------------------------- /src/Draw2D/ViewModels/Style/ImageFilters/AlphaThresholdImageFilter.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | using System.Runtime.Serialization; 3 | 4 | namespace Draw2D.ViewModels.Style.ImageFilters; 5 | 6 | [DataContract(IsReference = true)] 7 | public class AlphaThresholdImageFilter : ViewModelBase, IImageFilter 8 | { 9 | // TODO: 10 | 11 | public AlphaThresholdImageFilter() 12 | { 13 | } 14 | 15 | public object Copy(Dictionary shared) 16 | { 17 | return new AlphaThresholdImageFilter() 18 | { 19 | Title = this.Title 20 | }; 21 | } 22 | } -------------------------------------------------------------------------------- /src/Draw2D/ViewModels/Style/ImageFilters/ArithmeticImageFilter.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | using System.Runtime.Serialization; 3 | 4 | namespace Draw2D.ViewModels.Style.ImageFilters; 5 | 6 | [DataContract(IsReference = true)] 7 | public class ArithmeticImageFilter : ViewModelBase, IImageFilter 8 | { 9 | // TODO: 10 | 11 | public ArithmeticImageFilter() 12 | { 13 | } 14 | 15 | public object Copy(Dictionary shared) 16 | { 17 | return new ArithmeticImageFilter() 18 | { 19 | Title = this.Title 20 | }; 21 | } 22 | } -------------------------------------------------------------------------------- /src/Draw2D/ViewModels/Style/ImageFilters/BlendModeImageFilter.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | using System.Runtime.Serialization; 3 | 4 | namespace Draw2D.ViewModels.Style.ImageFilters; 5 | 6 | [DataContract(IsReference = true)] 7 | public class BlendModeImageFilter : ViewModelBase, IImageFilter 8 | { 9 | // TODO: 10 | 11 | public BlendModeImageFilter() 12 | { 13 | } 14 | 15 | public object Copy(Dictionary shared) 16 | { 17 | return new BlendModeImageFilter() 18 | { 19 | Title = this.Title 20 | }; 21 | } 22 | } -------------------------------------------------------------------------------- /src/Draw2D/ViewModels/Style/ImageFilters/BlurImageFilter.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | using System.Runtime.Serialization; 3 | 4 | namespace Draw2D.ViewModels.Style.ImageFilters; 5 | 6 | [DataContract(IsReference = true)] 7 | public class BlurImageFilter : ViewModelBase, IImageFilter 8 | { 9 | // TODO: 10 | 11 | public BlurImageFilter() 12 | { 13 | } 14 | 15 | public object Copy(Dictionary shared) 16 | { 17 | return new BlurImageFilter() 18 | { 19 | Title = this.Title 20 | }; 21 | } 22 | } -------------------------------------------------------------------------------- /src/Draw2D/ViewModels/Style/ImageFilters/ColorFilterImageFilter.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | using System.Runtime.Serialization; 3 | 4 | namespace Draw2D.ViewModels.Style.ImageFilters; 5 | 6 | [DataContract(IsReference = true)] 7 | public class ColorFilterImageFilter : ViewModelBase, IImageFilter 8 | { 9 | // TODO: 10 | 11 | public ColorFilterImageFilter() 12 | { 13 | } 14 | 15 | public object Copy(Dictionary shared) 16 | { 17 | return new ColorFilterImageFilter() 18 | { 19 | Title = this.Title 20 | }; 21 | } 22 | } -------------------------------------------------------------------------------- /src/Draw2D/ViewModels/Style/ImageFilters/ComposeImageFilter.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | using System.Runtime.Serialization; 3 | 4 | namespace Draw2D.ViewModels.Style.ImageFilters; 5 | 6 | [DataContract(IsReference = true)] 7 | public class ComposeImageFilter : ViewModelBase, IImageFilter 8 | { 9 | // TODO: 10 | 11 | public ComposeImageFilter() 12 | { 13 | } 14 | 15 | public object Copy(Dictionary shared) 16 | { 17 | return new ComposeImageFilter() 18 | { 19 | Title = this.Title 20 | }; 21 | } 22 | } -------------------------------------------------------------------------------- /src/Draw2D/ViewModels/Style/ImageFilters/DilateImageFilter.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | using System.Runtime.Serialization; 3 | 4 | namespace Draw2D.ViewModels.Style.ImageFilters; 5 | 6 | [DataContract(IsReference = true)] 7 | public class DilateImageFilter : ViewModelBase, IImageFilter 8 | { 9 | // TODO: 10 | 11 | public DilateImageFilter() 12 | { 13 | } 14 | 15 | public object Copy(Dictionary shared) 16 | { 17 | return new DilateImageFilter() 18 | { 19 | Title = this.Title 20 | }; 21 | } 22 | } -------------------------------------------------------------------------------- /src/Draw2D/ViewModels/Style/ImageFilters/DisplacementMapEffectImageFilter.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | using System.Runtime.Serialization; 3 | 4 | namespace Draw2D.ViewModels.Style.ImageFilters; 5 | 6 | [DataContract(IsReference = true)] 7 | public class DisplacementMapEffectImageFilter : ViewModelBase, IImageFilter 8 | { 9 | // TODO: 10 | 11 | public DisplacementMapEffectImageFilter() 12 | { 13 | } 14 | 15 | public object Copy(Dictionary shared) 16 | { 17 | return new DisplacementMapEffectImageFilter() 18 | { 19 | Title = this.Title 20 | }; 21 | } 22 | } -------------------------------------------------------------------------------- /src/Draw2D/ViewModels/Style/ImageFilters/DistantLitDiffuseImageFilter.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | using System.Runtime.Serialization; 3 | 4 | namespace Draw2D.ViewModels.Style.ImageFilters; 5 | 6 | [DataContract(IsReference = true)] 7 | public class DistantLitDiffuseImageFilter : ViewModelBase, IImageFilter 8 | { 9 | // TODO: 10 | 11 | public DistantLitDiffuseImageFilter() 12 | { 13 | } 14 | 15 | public object Copy(Dictionary shared) 16 | { 17 | return new DistantLitDiffuseImageFilter() 18 | { 19 | Title = this.Title 20 | }; 21 | } 22 | } -------------------------------------------------------------------------------- /src/Draw2D/ViewModels/Style/ImageFilters/DistantLitSpecularImageFilter.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | using System.Runtime.Serialization; 3 | 4 | namespace Draw2D.ViewModels.Style.ImageFilters; 5 | 6 | [DataContract(IsReference = true)] 7 | public class DistantLitSpecularImageFilter : ViewModelBase, IImageFilter 8 | { 9 | // TODO: 10 | 11 | public DistantLitSpecularImageFilter() 12 | { 13 | } 14 | 15 | public object Copy(Dictionary shared) 16 | { 17 | return new DistantLitSpecularImageFilter() 18 | { 19 | Title = this.Title 20 | }; 21 | } 22 | } -------------------------------------------------------------------------------- /src/Draw2D/ViewModels/Style/ImageFilters/DropShadowImageFilter.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | using System.Runtime.Serialization; 3 | 4 | namespace Draw2D.ViewModels.Style.ImageFilters; 5 | 6 | [DataContract(IsReference = true)] 7 | public class DropShadowImageFilter : ViewModelBase, IImageFilter 8 | { 9 | // TODO: 10 | 11 | public DropShadowImageFilter() 12 | { 13 | } 14 | 15 | public object Copy(Dictionary shared) 16 | { 17 | return new DropShadowImageFilter() 18 | { 19 | Title = this.Title 20 | }; 21 | } 22 | } -------------------------------------------------------------------------------- /src/Draw2D/ViewModels/Style/ImageFilters/ErodeImageFilter.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | using System.Runtime.Serialization; 3 | 4 | namespace Draw2D.ViewModels.Style.ImageFilters; 5 | 6 | [DataContract(IsReference = true)] 7 | public class ErodeImageFilter : ViewModelBase, IImageFilter 8 | { 9 | // TODO: 10 | 11 | public ErodeImageFilter() 12 | { 13 | } 14 | 15 | public object Copy(Dictionary shared) 16 | { 17 | return new ErodeImageFilter() 18 | { 19 | Title = this.Title 20 | }; 21 | } 22 | } -------------------------------------------------------------------------------- /src/Draw2D/ViewModels/Style/ImageFilters/ImageImageFilter.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | using System.Runtime.Serialization; 3 | 4 | namespace Draw2D.ViewModels.Style.ImageFilters; 5 | 6 | [DataContract(IsReference = true)] 7 | public class ImageImageFilter : ViewModelBase, IImageFilter 8 | { 9 | // TODO: 10 | 11 | public ImageImageFilter() 12 | { 13 | } 14 | 15 | public object Copy(Dictionary shared) 16 | { 17 | return new ImageImageFilter() 18 | { 19 | Title = this.Title 20 | }; 21 | } 22 | } -------------------------------------------------------------------------------- /src/Draw2D/ViewModels/Style/ImageFilters/MagnifierImageFilter.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | using System.Runtime.Serialization; 3 | 4 | namespace Draw2D.ViewModels.Style.ImageFilters; 5 | 6 | [DataContract(IsReference = true)] 7 | public class MagnifierImageFilter : ViewModelBase, IImageFilter 8 | { 9 | // TODO: 10 | 11 | public MagnifierImageFilter() 12 | { 13 | } 14 | 15 | public object Copy(Dictionary shared) 16 | { 17 | return new MagnifierImageFilter() 18 | { 19 | Title = this.Title 20 | }; 21 | } 22 | } -------------------------------------------------------------------------------- /src/Draw2D/ViewModels/Style/ImageFilters/MatrixConvolutionImageFilter.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | using System.Runtime.Serialization; 3 | 4 | namespace Draw2D.ViewModels.Style.ImageFilters; 5 | 6 | [DataContract(IsReference = true)] 7 | public class MatrixConvolutionImageFilter : ViewModelBase, IImageFilter 8 | { 9 | // TODO: 10 | 11 | public MatrixConvolutionImageFilter() 12 | { 13 | } 14 | 15 | public object Copy(Dictionary shared) 16 | { 17 | return new MatrixConvolutionImageFilter() 18 | { 19 | Title = this.Title 20 | }; 21 | } 22 | } -------------------------------------------------------------------------------- /src/Draw2D/ViewModels/Style/ImageFilters/MatrixImageFilter.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | using System.Runtime.Serialization; 3 | 4 | namespace Draw2D.ViewModels.Style.ImageFilters; 5 | 6 | [DataContract(IsReference = true)] 7 | public class MatrixImageFilter : ViewModelBase, IImageFilter 8 | { 9 | // TODO: 10 | 11 | public MatrixImageFilter() 12 | { 13 | } 14 | 15 | public object Copy(Dictionary shared) 16 | { 17 | return new MatrixImageFilter() 18 | { 19 | Title = this.Title 20 | }; 21 | } 22 | } -------------------------------------------------------------------------------- /src/Draw2D/ViewModels/Style/ImageFilters/MergeImageFilter.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | using System.Runtime.Serialization; 3 | 4 | namespace Draw2D.ViewModels.Style.ImageFilters; 5 | 6 | [DataContract(IsReference = true)] 7 | public class MergeImageFilter : ViewModelBase, IImageFilter 8 | { 9 | // TODO: 10 | 11 | public MergeImageFilter() 12 | { 13 | } 14 | 15 | public object Copy(Dictionary shared) 16 | { 17 | return new MergeImageFilter() 18 | { 19 | Title = this.Title 20 | }; 21 | } 22 | } -------------------------------------------------------------------------------- /src/Draw2D/ViewModels/Style/ImageFilters/OffsetImageFilter.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | using System.Runtime.Serialization; 3 | 4 | namespace Draw2D.ViewModels.Style.ImageFilters; 5 | 6 | [DataContract(IsReference = true)] 7 | public class OffsetImageFilter : ViewModelBase, IImageFilter 8 | { 9 | // TODO: 10 | 11 | public OffsetImageFilter() 12 | { 13 | } 14 | 15 | public object Copy(Dictionary shared) 16 | { 17 | return new OffsetImageFilter() 18 | { 19 | Title = this.Title 20 | }; 21 | } 22 | } -------------------------------------------------------------------------------- /src/Draw2D/ViewModels/Style/ImageFilters/PaintImageFilter.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | using System.Runtime.Serialization; 3 | 4 | namespace Draw2D.ViewModels.Style.ImageFilters; 5 | 6 | [DataContract(IsReference = true)] 7 | public class PaintImageFilter : ViewModelBase, IImageFilter 8 | { 9 | // TODO: 10 | 11 | public PaintImageFilter() 12 | { 13 | } 14 | 15 | public object Copy(Dictionary shared) 16 | { 17 | return new PaintImageFilter() 18 | { 19 | Title = this.Title 20 | }; 21 | } 22 | } -------------------------------------------------------------------------------- /src/Draw2D/ViewModels/Style/ImageFilters/PictureImageFilter.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | using System.Runtime.Serialization; 3 | 4 | namespace Draw2D.ViewModels.Style.ImageFilters; 5 | 6 | [DataContract(IsReference = true)] 7 | public class PictureImageFilter : ViewModelBase, IImageFilter 8 | { 9 | // TODO: 10 | 11 | public PictureImageFilter() 12 | { 13 | } 14 | 15 | public object Copy(Dictionary shared) 16 | { 17 | return new PictureImageFilter() 18 | { 19 | Title = this.Title 20 | }; 21 | } 22 | } -------------------------------------------------------------------------------- /src/Draw2D/ViewModels/Style/ImageFilters/PointLitDiffuseImageFilter.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | using System.Runtime.Serialization; 3 | 4 | namespace Draw2D.ViewModels.Style.ImageFilters; 5 | 6 | [DataContract(IsReference = true)] 7 | public class PointLitDiffuseImageFilter : ViewModelBase, IImageFilter 8 | { 9 | // TODO: 10 | 11 | public PointLitDiffuseImageFilter() 12 | { 13 | } 14 | 15 | public object Copy(Dictionary shared) 16 | { 17 | return new PointLitDiffuseImageFilter() 18 | { 19 | Title = this.Title 20 | }; 21 | } 22 | } -------------------------------------------------------------------------------- /src/Draw2D/ViewModels/Style/ImageFilters/PointLitSpecularImageFilter.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | using System.Runtime.Serialization; 3 | 4 | namespace Draw2D.ViewModels.Style.ImageFilters; 5 | 6 | [DataContract(IsReference = true)] 7 | public class PointLitSpecularImageFilter : ViewModelBase, IImageFilter 8 | { 9 | // TODO: 10 | 11 | public PointLitSpecularImageFilter() 12 | { 13 | } 14 | 15 | public object Copy(Dictionary shared) 16 | { 17 | return new PointLitSpecularImageFilter() 18 | { 19 | Title = this.Title 20 | }; 21 | } 22 | } -------------------------------------------------------------------------------- /src/Draw2D/ViewModels/Style/ImageFilters/SpotLitDiffuseImageFilter.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | using System.Runtime.Serialization; 3 | 4 | namespace Draw2D.ViewModels.Style.ImageFilters; 5 | 6 | [DataContract(IsReference = true)] 7 | public class SpotLitDiffuseImageFilter : ViewModelBase, IImageFilter 8 | { 9 | // TODO: 10 | 11 | public SpotLitDiffuseImageFilter() 12 | { 13 | } 14 | 15 | public object Copy(Dictionary shared) 16 | { 17 | return new SpotLitDiffuseImageFilter() 18 | { 19 | Title = this.Title 20 | }; 21 | } 22 | } -------------------------------------------------------------------------------- /src/Draw2D/ViewModels/Style/ImageFilters/SpotLitSpecularImageFilter.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | using System.Runtime.Serialization; 3 | 4 | namespace Draw2D.ViewModels.Style.ImageFilters; 5 | 6 | [DataContract(IsReference = true)] 7 | public class SpotLitSpecularImageFilter : ViewModelBase, IImageFilter 8 | { 9 | // TODO: 10 | 11 | public SpotLitSpecularImageFilter() 12 | { 13 | } 14 | 15 | public object Copy(Dictionary shared) 16 | { 17 | return new SpotLitSpecularImageFilter() 18 | { 19 | Title = this.Title 20 | }; 21 | } 22 | } -------------------------------------------------------------------------------- /src/Draw2D/ViewModels/Style/ImageFilters/TileImageFilter.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | using System.Runtime.Serialization; 3 | 4 | namespace Draw2D.ViewModels.Style.ImageFilters; 5 | 6 | [DataContract(IsReference = true)] 7 | public class TileImageFilter : ViewModelBase, IImageFilter 8 | { 9 | // TODO: 10 | 11 | public TileImageFilter() 12 | { 13 | } 14 | 15 | public object Copy(Dictionary shared) 16 | { 17 | return new TileImageFilter() 18 | { 19 | Title = this.Title 20 | }; 21 | } 22 | } -------------------------------------------------------------------------------- /src/Draw2D/ViewModels/Style/MaskFilters/BlurMaskFilter.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | using System.Runtime.Serialization; 3 | 4 | namespace Draw2D.ViewModels.Style.MaskFilters; 5 | 6 | [DataContract(IsReference = true)] 7 | public class BlurMaskFilter : ViewModelBase, IMaskFilter 8 | { 9 | // TODO: 10 | 11 | public BlurMaskFilter() 12 | { 13 | } 14 | 15 | public object Copy(Dictionary shared) 16 | { 17 | return new BlurMaskFilter() 18 | { 19 | Title = this.Title 20 | }; 21 | } 22 | } -------------------------------------------------------------------------------- /src/Draw2D/ViewModels/Style/MaskFilters/ClipMaskFilter.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | using System.Runtime.Serialization; 3 | 4 | namespace Draw2D.ViewModels.Style.MaskFilters; 5 | 6 | [DataContract(IsReference = true)] 7 | public class ClipMaskFilter : ViewModelBase, IMaskFilter 8 | { 9 | // TODO: 10 | 11 | public ClipMaskFilter() 12 | { 13 | } 14 | 15 | public object Copy(Dictionary shared) 16 | { 17 | return new ClipMaskFilter() 18 | { 19 | Title = this.Title 20 | }; 21 | } 22 | } -------------------------------------------------------------------------------- /src/Draw2D/ViewModels/Style/MaskFilters/GammaMaskFilter.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | using System.Runtime.Serialization; 3 | 4 | namespace Draw2D.ViewModels.Style.MaskFilters; 5 | 6 | [DataContract(IsReference = true)] 7 | public class GammaMaskFilter : ViewModelBase, IMaskFilter 8 | { 9 | // TODO: 10 | 11 | public GammaMaskFilter() 12 | { 13 | } 14 | 15 | public object Copy(Dictionary shared) 16 | { 17 | return new GammaMaskFilter() 18 | { 19 | Title = this.Title 20 | }; 21 | } 22 | } -------------------------------------------------------------------------------- /src/Draw2D/ViewModels/Style/MaskFilters/TableMaskFilter.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | using System.Runtime.Serialization; 3 | 4 | namespace Draw2D.ViewModels.Style.MaskFilters; 5 | 6 | [DataContract(IsReference = true)] 7 | public class TableMaskFilter : ViewModelBase, IMaskFilter 8 | { 9 | // TODO: 10 | 11 | public TableMaskFilter() 12 | { 13 | } 14 | 15 | public object Copy(Dictionary shared) 16 | { 17 | return new TableMaskFilter() 18 | { 19 | Title = this.Title 20 | }; 21 | } 22 | } -------------------------------------------------------------------------------- /src/Draw2D/ViewModels/Style/PathEffects/Path1DPathEffectStyle.cs: -------------------------------------------------------------------------------- 1 |  2 | namespace Draw2D.ViewModels.Style.PathEffects; 3 | 4 | public enum Path1DPathEffectStyle 5 | { 6 | Translate = 0, 7 | Rotate = 1, 8 | Morph = 2 9 | } -------------------------------------------------------------------------------- /src/Draw2D/ViewModels/Style/PathEffects/PathCornerEffect.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | using System.Runtime.Serialization; 3 | 4 | namespace Draw2D.ViewModels.Style.PathEffects; 5 | 6 | [DataContract(IsReference = true)] 7 | public class PathCornerEffect : ViewModelBase, IPathEffect 8 | { 9 | private double _radius; 10 | 11 | [DataMember(IsRequired = false, EmitDefaultValue = false)] 12 | public double Radius 13 | { 14 | get => _radius; 15 | set => Update(ref _radius, value); 16 | } 17 | 18 | public PathCornerEffect() 19 | { 20 | } 21 | 22 | public PathCornerEffect(double radius) 23 | { 24 | this.Radius = radius; 25 | } 26 | 27 | public static IPathEffect MakeCorner() 28 | { 29 | return new PathCornerEffect(5.0) { Title = "Corner" }; 30 | } 31 | 32 | public object Copy(Dictionary shared) 33 | { 34 | return new PathCornerEffect() 35 | { 36 | Title = this.Title, 37 | Radius = this.Radius 38 | }; 39 | } 40 | } -------------------------------------------------------------------------------- /src/Draw2D/ViewModels/Style/PathEffects/TrimPathEffectMode.cs: -------------------------------------------------------------------------------- 1 |  2 | namespace Draw2D.ViewModels.Style.PathEffects; 3 | 4 | public enum TrimPathEffectMode 5 | { 6 | Normal = 0, 7 | Inverted = 1 8 | } -------------------------------------------------------------------------------- /src/Draw2D/ViewModels/Style/Shaders/ColorFilterShader.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | using System.Runtime.Serialization; 3 | 4 | namespace Draw2D.ViewModels.Style.Shaders; 5 | 6 | [DataContract(IsReference = true)] 7 | public class ColorFilterShader : ViewModelBase, IShader 8 | { 9 | // TODO: 10 | 11 | public ColorFilterShader() 12 | { 13 | } 14 | 15 | public object Copy(Dictionary shared) 16 | { 17 | return new ColorFilterShader() 18 | { 19 | Title = this.Title 20 | }; 21 | } 22 | } -------------------------------------------------------------------------------- /src/Draw2D/ViewModels/Style/Shaders/ComposeShader.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | using System.Runtime.Serialization; 3 | 4 | namespace Draw2D.ViewModels.Style.Shaders; 5 | 6 | [DataContract(IsReference = true)] 7 | public class ComposeShader : ViewModelBase, IShader 8 | { 9 | // TODO: 10 | 11 | public ComposeShader() 12 | { 13 | } 14 | 15 | public object Copy(Dictionary shared) 16 | { 17 | return new ComposeShader() 18 | { 19 | Title = this.Title 20 | }; 21 | } 22 | } -------------------------------------------------------------------------------- /src/Draw2D/ViewModels/Style/Shaders/Core/ShaderTileMode.cs: -------------------------------------------------------------------------------- 1 |  2 | namespace Draw2D.ViewModels.Style.Shaders; 3 | 4 | public enum ShaderTileMode 5 | { 6 | Clamp = 0, 7 | Repeat = 1, 8 | Mirror = 2 9 | } -------------------------------------------------------------------------------- /src/Draw2D/ViewModels/Style/Shaders/EmptyShader.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | using System.Runtime.Serialization; 3 | 4 | namespace Draw2D.ViewModels.Style.Shaders; 5 | 6 | [DataContract(IsReference = true)] 7 | public class EmptyShader : ViewModelBase, IShader 8 | { 9 | // TODO: 10 | 11 | public EmptyShader() 12 | { 13 | } 14 | 15 | public object Copy(Dictionary shared) 16 | { 17 | return new EmptyShader() 18 | { 19 | Title = this.Title 20 | }; 21 | } 22 | } -------------------------------------------------------------------------------- /src/Draw2D/ViewModels/Style/Shaders/LinearGradientShader.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | using System.Runtime.Serialization; 3 | 4 | namespace Draw2D.ViewModels.Style.Shaders; 5 | 6 | [DataContract(IsReference = true)] 7 | public class LinearGradientShader : ViewModelBase, IShader 8 | { 9 | // TODO: 10 | 11 | public LinearGradientShader() 12 | { 13 | } 14 | 15 | public object Copy(Dictionary shared) 16 | { 17 | return new LinearGradientShader() 18 | { 19 | Title = this.Title 20 | }; 21 | } 22 | } -------------------------------------------------------------------------------- /src/Draw2D/ViewModels/Style/Shaders/LocalMatrixShader.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | using System.Runtime.Serialization; 3 | 4 | namespace Draw2D.ViewModels.Style.Shaders; 5 | 6 | [DataContract(IsReference = true)] 7 | public class LocalMatrixShader : ViewModelBase, IShader 8 | { 9 | // TODO: 10 | 11 | public LocalMatrixShader() 12 | { 13 | } 14 | 15 | public object Copy(Dictionary shared) 16 | { 17 | return new LocalMatrixShader() 18 | { 19 | Title = this.Title 20 | }; 21 | } 22 | } -------------------------------------------------------------------------------- /src/Draw2D/ViewModels/Style/Shaders/PerlinNoiseFractalNoiseShader.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | using System.Runtime.Serialization; 3 | 4 | namespace Draw2D.ViewModels.Style.Shaders; 5 | 6 | [DataContract(IsReference = true)] 7 | public class PerlinNoiseFractalNoiseShader : ViewModelBase, IShader 8 | { 9 | // TODO: 10 | 11 | public PerlinNoiseFractalNoiseShader() 12 | { 13 | } 14 | 15 | public object Copy(Dictionary shared) 16 | { 17 | return new PerlinNoiseFractalNoiseShader() 18 | { 19 | Title = this.Title 20 | }; 21 | } 22 | } -------------------------------------------------------------------------------- /src/Draw2D/ViewModels/Style/Shaders/PerlinNoiseTurbulenceShader.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | using System.Runtime.Serialization; 3 | 4 | namespace Draw2D.ViewModels.Style.Shaders; 5 | 6 | [DataContract(IsReference = true)] 7 | public class PerlinNoiseTurbulenceShader : ViewModelBase, IShader 8 | { 9 | // TODO: 10 | 11 | public PerlinNoiseTurbulenceShader() 12 | { 13 | } 14 | 15 | public object Copy(Dictionary shared) 16 | { 17 | return new PerlinNoiseTurbulenceShader() 18 | { 19 | Title = this.Title 20 | }; 21 | } 22 | } -------------------------------------------------------------------------------- /src/Draw2D/ViewModels/Style/Shaders/RadialGradientShader.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | using System.Runtime.Serialization; 3 | 4 | namespace Draw2D.ViewModels.Style.Shaders; 5 | 6 | [DataContract(IsReference = true)] 7 | public class RadialGradientShader : ViewModelBase, IShader 8 | { 9 | // TODO: 10 | 11 | public RadialGradientShader() 12 | { 13 | } 14 | 15 | public object Copy(Dictionary shared) 16 | { 17 | return new RadialGradientShader() 18 | { 19 | Title = this.Title 20 | }; 21 | } 22 | } -------------------------------------------------------------------------------- /src/Draw2D/ViewModels/Style/Shaders/SweepGradientShader.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | using System.Runtime.Serialization; 3 | 4 | namespace Draw2D.ViewModels.Style.Shaders; 5 | 6 | [DataContract(IsReference = true)] 7 | public class SweepGradientShader : ViewModelBase, IShader 8 | { 9 | // TODO: 10 | 11 | public SweepGradientShader() 12 | { 13 | } 14 | 15 | public object Copy(Dictionary shared) 16 | { 17 | return new SweepGradientShader() 18 | { 19 | Title = this.Title 20 | }; 21 | } 22 | } -------------------------------------------------------------------------------- /src/Draw2D/ViewModels/Style/Shaders/TwoPointConicalGradientShader.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | using System.Runtime.Serialization; 3 | 4 | namespace Draw2D.ViewModels.Style.Shaders; 5 | 6 | [DataContract(IsReference = true)] 7 | public class TwoPointConicalGradientShader : ViewModelBase, IShader 8 | { 9 | // TODO: 10 | 11 | public TwoPointConicalGradientShader() 12 | { 13 | } 14 | 15 | public object Copy(Dictionary shared) 16 | { 17 | return new TwoPointConicalGradientShader() 18 | { 19 | Title = this.Title 20 | }; 21 | } 22 | } -------------------------------------------------------------------------------- /src/Draw2D/ViewModels/Text.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | using System.Runtime.Serialization; 3 | 4 | namespace Draw2D.ViewModels; 5 | 6 | [DataContract(IsReference = true)] 7 | public class Text : ViewModelBase, ICopyable 8 | { 9 | private string _value; 10 | 11 | [DataMember(IsRequired = false, EmitDefaultValue = false)] 12 | public string Value 13 | { 14 | get => _value; 15 | set => Update(ref _value, value); 16 | } 17 | 18 | public Text() 19 | { 20 | } 21 | 22 | public Text(string value) 23 | { 24 | _value = value; 25 | } 26 | 27 | public object Copy(Dictionary shared) 28 | { 29 | return new Text() 30 | { 31 | Value = this.Value 32 | }; 33 | } 34 | } -------------------------------------------------------------------------------- /src/Draw2D/ViewModels/Tools/Core/IContainerFactory.cs: -------------------------------------------------------------------------------- 1 | using Draw2D.ViewModels.Containers; 2 | 3 | namespace Draw2D.ViewModels.Tools; 4 | 5 | public interface IContainerFactory 6 | { 7 | IStyleLibrary CreateStyleLibrary(); 8 | IGroupLibrary CreateGroupLibrary(); 9 | IToolContext CreateToolContext(); 10 | IContainerView CreateContainerView(string title); 11 | IDocumentContainer CreateDocumentContainer(string title); 12 | } -------------------------------------------------------------------------------- /src/Draw2D/ViewModels/Tools/Core/IPointFilter.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | 3 | namespace Draw2D.ViewModels.Tools; 4 | 5 | public interface IPointFilter : INode, IDirty 6 | { 7 | IList Guides { get; set; } 8 | bool Process(IToolContext context, ref double x, ref double y); 9 | void Clear(IToolContext context); 10 | } -------------------------------------------------------------------------------- /src/Draw2D/ViewModels/Tools/Core/ITool.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | using Core2D.UI.Zoom.Input; 3 | 4 | namespace Draw2D.ViewModels.Tools; 5 | 6 | public interface ITool 7 | { 8 | string Title { get; } 9 | IList Filters { get; set; } 10 | IPointFilter CurrentFilter { get; set; } 11 | void LeftDown(IToolContext context, double x, double y, Modifier modifier); 12 | void LeftUp(IToolContext context, double x, double y, Modifier modifier); 13 | void RightDown(IToolContext context, double x, double y, Modifier modifier); 14 | void RightUp(IToolContext context, double x, double y, Modifier modifier); 15 | void Move(IToolContext context, double x, double y, Modifier modifier); 16 | void Clean(IToolContext context); 17 | } -------------------------------------------------------------------------------- /src/Draw2D/ViewModels/Tools/Core/IToolContext.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using CommunityToolkit.Mvvm.Input; 4 | using Core2D.UI.Zoom.Input; 5 | using Draw2D.ViewModels.Containers; 6 | 7 | namespace Draw2D.ViewModels.Tools; 8 | 9 | public interface IToolContext : IInputTarget, IDisposable 10 | { 11 | IRelayCommand SetToolCommand { get; } 12 | IDocumentContainer DocumentContainer { get; set; } 13 | IHitTest HitTest { get; set; } 14 | IPathConverter PathConverter { get; set; } 15 | IList Tools { get; set; } 16 | ITool CurrentTool { get; set; } 17 | EditMode EditMode { get; set; } 18 | void SetTool(string title); 19 | } 20 | -------------------------------------------------------------------------------- /src/Draw2D/ViewModels/Tools/Core/SelectionMode.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace Draw2D.ViewModels.Tools; 4 | 5 | [Flags] 6 | public enum SelectionMode 7 | { 8 | None = 0, 9 | Point = 1, 10 | Shape = 2, 11 | All = Point | Shape 12 | } -------------------------------------------------------------------------------- /src/Draw2D/ViewModels/Tools/Core/SelectionTargets.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace Draw2D.ViewModels.Tools; 4 | 5 | [Flags] 6 | public enum SelectionTargets 7 | { 8 | None = 0, 9 | Shapes = 1, 10 | Guides = 2, 11 | All = Shapes | Guides 12 | } -------------------------------------------------------------------------------- /src/Draw2D/ViewModels/Tools/Settings/CircleToolSettings.cs: -------------------------------------------------------------------------------- 1 | using System.Runtime.Serialization; 2 | 3 | namespace Draw2D.ViewModels.Tools; 4 | 5 | [DataContract(IsReference = true)] 6 | public class CircleToolSettings : SettingsBase 7 | { 8 | private bool _connectPoints; 9 | private double _hitTestRadius; 10 | 11 | [DataMember(IsRequired = false, EmitDefaultValue = false)] 12 | public bool ConnectPoints 13 | { 14 | get => _connectPoints; 15 | set => Update(ref _connectPoints, value); 16 | } 17 | 18 | [DataMember(IsRequired = false, EmitDefaultValue = false)] 19 | public double HitTestRadius 20 | { 21 | get => _hitTestRadius; 22 | set => Update(ref _hitTestRadius, value); 23 | } 24 | } -------------------------------------------------------------------------------- /src/Draw2D/ViewModels/Tools/Settings/ConicToolSettings.cs: -------------------------------------------------------------------------------- 1 | using System.Runtime.Serialization; 2 | 3 | namespace Draw2D.ViewModels.Tools; 4 | 5 | [DataContract(IsReference = true)] 6 | public class ConicToolSettings : SettingsBase 7 | { 8 | private bool _connectPoints; 9 | private double _hitTestRadius; 10 | private double _weight; 11 | 12 | [DataMember(IsRequired = false, EmitDefaultValue = false)] 13 | public bool ConnectPoints 14 | { 15 | get => _connectPoints; 16 | set => Update(ref _connectPoints, value); 17 | } 18 | 19 | [DataMember(IsRequired = false, EmitDefaultValue = false)] 20 | public double HitTestRadius 21 | { 22 | get => _hitTestRadius; 23 | set => Update(ref _hitTestRadius, value); 24 | } 25 | 26 | [DataMember(IsRequired = false, EmitDefaultValue = false)] 27 | public double Weight 28 | { 29 | get => _weight; 30 | set => Update(ref _weight, value); 31 | } 32 | } -------------------------------------------------------------------------------- /src/Draw2D/ViewModels/Tools/Settings/CubicBezierToolSettings.cs: -------------------------------------------------------------------------------- 1 | using System.Runtime.Serialization; 2 | 3 | namespace Draw2D.ViewModels.Tools; 4 | 5 | [DataContract(IsReference = true)] 6 | public class CubicBezierToolSettings : SettingsBase 7 | { 8 | private bool _connectPoints; 9 | private double _hitTestRadius; 10 | 11 | [DataMember(IsRequired = false, EmitDefaultValue = false)] 12 | public bool ConnectPoints 13 | { 14 | get => _connectPoints; 15 | set => Update(ref _connectPoints, value); 16 | } 17 | 18 | [DataMember(IsRequired = false, EmitDefaultValue = false)] 19 | public double HitTestRadius 20 | { 21 | get => _hitTestRadius; 22 | set => Update(ref _hitTestRadius, value); 23 | } 24 | } -------------------------------------------------------------------------------- /src/Draw2D/ViewModels/Tools/Settings/LineToolSettings.cs: -------------------------------------------------------------------------------- 1 | using System.Runtime.Serialization; 2 | 3 | namespace Draw2D.ViewModels.Tools; 4 | 5 | [DataContract(IsReference = true)] 6 | public class LineToolSettings : SettingsBase 7 | { 8 | private bool _connectPoints; 9 | private double _hitTestRadius; 10 | 11 | [DataMember(IsRequired = false, EmitDefaultValue = false)] 12 | public bool ConnectPoints 13 | { 14 | get => _connectPoints; 15 | set => Update(ref _connectPoints, value); 16 | } 17 | 18 | [DataMember(IsRequired = false, EmitDefaultValue = false)] 19 | public double HitTestRadius 20 | { 21 | get => _hitTestRadius; 22 | set => Update(ref _hitTestRadius, value); 23 | } 24 | } -------------------------------------------------------------------------------- /src/Draw2D/ViewModels/Tools/Settings/MoveToolSettings.cs: -------------------------------------------------------------------------------- 1 | using System.Runtime.Serialization; 2 | 3 | namespace Draw2D.ViewModels.Tools; 4 | 5 | [DataContract(IsReference = true)] 6 | public class MoveToolSettings : SettingsBase 7 | { 8 | } -------------------------------------------------------------------------------- /src/Draw2D/ViewModels/Tools/Settings/NoneToolSettings.cs: -------------------------------------------------------------------------------- 1 | using System.Runtime.Serialization; 2 | 3 | namespace Draw2D.ViewModels.Tools; 4 | 5 | [DataContract(IsReference = true)] 6 | public class NoneToolSettings : SettingsBase 7 | { 8 | } -------------------------------------------------------------------------------- /src/Draw2D/ViewModels/Tools/Settings/OvalToolSettings.cs: -------------------------------------------------------------------------------- 1 | using System.Runtime.Serialization; 2 | 3 | namespace Draw2D.ViewModels.Tools; 4 | 5 | [DataContract(IsReference = true)] 6 | public class OvalToolSettings : SettingsBase 7 | { 8 | private bool _connectPoints; 9 | private double _hitTestRadius; 10 | 11 | [DataMember(IsRequired = false, EmitDefaultValue = false)] 12 | public bool ConnectPoints 13 | { 14 | get => _connectPoints; 15 | set => Update(ref _connectPoints, value); 16 | } 17 | 18 | [DataMember(IsRequired = false, EmitDefaultValue = false)] 19 | public double HitTestRadius 20 | { 21 | get => _hitTestRadius; 22 | set => Update(ref _hitTestRadius, value); 23 | } 24 | } -------------------------------------------------------------------------------- /src/Draw2D/ViewModels/Tools/Settings/PointToolSettings.cs: -------------------------------------------------------------------------------- 1 | using System.Runtime.Serialization; 2 | 3 | namespace Draw2D.ViewModels.Tools; 4 | 5 | [DataContract(IsReference = true)] 6 | public class PointToolSettings : SettingsBase 7 | { 8 | private bool _connectPoints; 9 | private double _hitTestRadius; 10 | 11 | [DataMember(IsRequired = false, EmitDefaultValue = false)] 12 | public bool ConnectPoints 13 | { 14 | get => _connectPoints; 15 | set => Update(ref _connectPoints, value); 16 | } 17 | 18 | [DataMember(IsRequired = false, EmitDefaultValue = false)] 19 | public double HitTestRadius 20 | { 21 | get => _hitTestRadius; 22 | set => Update(ref _hitTestRadius, value); 23 | } 24 | } -------------------------------------------------------------------------------- /src/Draw2D/ViewModels/Tools/Settings/PolyLineToolSettings.cs: -------------------------------------------------------------------------------- 1 | using System.Runtime.Serialization; 2 | 3 | namespace Draw2D.ViewModels.Tools; 4 | 5 | [DataContract(IsReference = true)] 6 | public class PolyLineToolSettings : SettingsBase 7 | { 8 | private bool _connectPoints; 9 | private double _hitTestRadius; 10 | 11 | [DataMember(IsRequired = false, EmitDefaultValue = false)] 12 | public bool ConnectPoints 13 | { 14 | get => _connectPoints; 15 | set => Update(ref _connectPoints, value); 16 | } 17 | 18 | [DataMember(IsRequired = false, EmitDefaultValue = false)] 19 | public double HitTestRadius 20 | { 21 | get => _hitTestRadius; 22 | set => Update(ref _hitTestRadius, value); 23 | } 24 | } -------------------------------------------------------------------------------- /src/Draw2D/ViewModels/Tools/Settings/QuadraticBezierToolSettings.cs: -------------------------------------------------------------------------------- 1 | using System.Runtime.Serialization; 2 | 3 | namespace Draw2D.ViewModels.Tools; 4 | 5 | [DataContract(IsReference = true)] 6 | public class QuadraticBezierToolSettings : SettingsBase 7 | { 8 | private bool _connectPoints; 9 | private double _hitTestRadius; 10 | 11 | [DataMember(IsRequired = false, EmitDefaultValue = false)] 12 | public bool ConnectPoints 13 | { 14 | get => _connectPoints; 15 | set => Update(ref _connectPoints, value); 16 | } 17 | 18 | [DataMember(IsRequired = false, EmitDefaultValue = false)] 19 | public double HitTestRadius 20 | { 21 | get => _hitTestRadius; 22 | set => Update(ref _hitTestRadius, value); 23 | } 24 | } -------------------------------------------------------------------------------- /src/Draw2D/ViewModels/Tools/Settings/TextToolSettings.cs: -------------------------------------------------------------------------------- 1 | using System.Runtime.Serialization; 2 | 3 | namespace Draw2D.ViewModels.Tools; 4 | 5 | [DataContract(IsReference = true)] 6 | public class TextToolSettings : SettingsBase 7 | { 8 | private bool _connectPoints; 9 | private double _hitTestRadius; 10 | 11 | [DataMember(IsRequired = false, EmitDefaultValue = false)] 12 | public bool ConnectPoints 13 | { 14 | get => _connectPoints; 15 | set => Update(ref _connectPoints, value); 16 | } 17 | 18 | [DataMember(IsRequired = false, EmitDefaultValue = false)] 19 | public double HitTestRadius 20 | { 21 | get => _hitTestRadius; 22 | set => Update(ref _hitTestRadius, value); 23 | } 24 | } -------------------------------------------------------------------------------- /src/Draw2D/Views/Containers/CanvasContainerView.axaml.cs: -------------------------------------------------------------------------------- 1 | using Avalonia.Controls; 2 | 3 | namespace Draw2D.Views.Containers; 4 | 5 | public partial class CanvasContainerView : UserControl 6 | { 7 | public CanvasContainerView() 8 | { 9 | InitializeComponent(); 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /src/Draw2D/Views/Containers/ContainerViewView.axaml.cs: -------------------------------------------------------------------------------- 1 | using Avalonia.Controls; 2 | 3 | namespace Draw2D.Views.Containers; 4 | 5 | public partial class ContainerViewView : UserControl 6 | { 7 | public ContainerViewView() 8 | { 9 | InitializeComponent(); 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /src/Draw2D/Views/Containers/DocumentContainerView.axaml.cs: -------------------------------------------------------------------------------- 1 | using Avalonia.Controls; 2 | 3 | namespace Draw2D.Views.Containers; 4 | 5 | public partial class DocumentContainerView : UserControl 6 | { 7 | public DocumentContainerView() 8 | { 9 | InitializeComponent(); 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /src/Draw2D/Views/Containers/GroupLibraryView.axaml.cs: -------------------------------------------------------------------------------- 1 | using Avalonia.Controls; 2 | 3 | namespace Draw2D.Views.Containers; 4 | 5 | public partial class GroupLibraryView : UserControl 6 | { 7 | public GroupLibraryView() 8 | { 9 | InitializeComponent(); 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /src/Draw2D/Views/Containers/SelectionStateView.axaml.cs: -------------------------------------------------------------------------------- 1 | using Avalonia.Controls; 2 | 3 | namespace Draw2D.Views.Containers; 4 | 5 | public partial class SelectionStateView : UserControl 6 | { 7 | public SelectionStateView() 8 | { 9 | InitializeComponent(); 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /src/Draw2D/Views/Containers/StyleLibraryView.axaml.cs: -------------------------------------------------------------------------------- 1 | using Avalonia.Controls; 2 | 3 | namespace Draw2D.Views.Containers; 4 | 5 | public partial class StyleLibraryView : UserControl 6 | { 7 | public StyleLibraryView() 8 | { 9 | InitializeComponent(); 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /src/Draw2D/Views/Containers/ZoomServiceStateView.axaml.cs: -------------------------------------------------------------------------------- 1 | using Avalonia.Controls; 2 | 3 | namespace Draw2D.Views.Containers; 4 | 5 | public partial class ZoomServiceStateView : UserControl 6 | { 7 | public ZoomServiceStateView() 8 | { 9 | InitializeComponent(); 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /src/Draw2D/Views/ContainersView.axaml.cs: -------------------------------------------------------------------------------- 1 | using Avalonia.Controls; 2 | 3 | namespace Draw2D.Views; 4 | 5 | public partial class ContainersView : UserControl 6 | { 7 | public ContainersView() 8 | { 9 | InitializeComponent(); 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /src/Draw2D/Views/Filters/GridSnapSettingsView.axaml.cs: -------------------------------------------------------------------------------- 1 | using Avalonia.Controls; 2 | 3 | namespace Draw2D.Views.Filters; 4 | 5 | public partial class GridSnapSettingsView : UserControl 6 | { 7 | public GridSnapSettingsView() 8 | { 9 | InitializeComponent(); 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /src/Draw2D/Views/Filters/LineSnapSettingsView.axaml.cs: -------------------------------------------------------------------------------- 1 | using Avalonia.Controls; 2 | 3 | namespace Draw2D.Views.Filters; 4 | 5 | public partial class LineSnapSettingsView : UserControl 6 | { 7 | public LineSnapSettingsView() 8 | { 9 | InitializeComponent(); 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /src/Draw2D/Views/MainView.axaml.cs: -------------------------------------------------------------------------------- 1 | using Avalonia.Controls; 2 | 3 | namespace Draw2D.Views; 4 | 5 | public partial class MainView : UserControl 6 | { 7 | public MainView() 8 | { 9 | InitializeComponent(); 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /src/Draw2D/Views/MainWindow.axaml: -------------------------------------------------------------------------------- 1 |  15 | 16 | 17 | -------------------------------------------------------------------------------- /src/Draw2D/Views/MainWindow.axaml.cs: -------------------------------------------------------------------------------- 1 | using Avalonia; 2 | using Avalonia.Controls; 3 | 4 | namespace Draw2D.Views; 5 | 6 | public partial class MainWindow : Window 7 | { 8 | public MainWindow() 9 | { 10 | this.InitializeComponent(); 11 | this.AttachDevTools(); 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /src/Draw2D/Views/MatrixView.axaml.cs: -------------------------------------------------------------------------------- 1 | using Avalonia.Controls; 2 | 3 | namespace Draw2D.Views; 4 | 5 | public partial class MatrixView : UserControl 6 | { 7 | public MatrixView() 8 | { 9 | InitializeComponent(); 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /src/Draw2D/Views/MenuView.axaml.cs: -------------------------------------------------------------------------------- 1 | using Avalonia.Controls; 2 | 3 | namespace Draw2D.Views; 4 | 5 | public partial class MenuView : UserControl 6 | { 7 | public MenuView() 8 | { 9 | InitializeComponent(); 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /src/Draw2D/Views/Shapes/ArcShapeView.axaml.cs: -------------------------------------------------------------------------------- 1 | using Avalonia.Controls; 2 | 3 | namespace Draw2D.Views.Shapes; 4 | 5 | public partial class ArcShapeView : UserControl 6 | { 7 | public ArcShapeView() 8 | { 9 | InitializeComponent(); 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /src/Draw2D/Views/Shapes/CircleShapeView.axaml.cs: -------------------------------------------------------------------------------- 1 | using Avalonia.Controls; 2 | 3 | namespace Draw2D.Views.Shapes; 4 | 5 | public partial class CircleShapeView : UserControl 6 | { 7 | public CircleShapeView() 8 | { 9 | InitializeComponent(); 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /src/Draw2D/Views/Shapes/ConicShapeView.axaml.cs: -------------------------------------------------------------------------------- 1 | using Avalonia.Controls; 2 | 3 | namespace Draw2D.Views.Shapes; 4 | 5 | public partial class ConicShapeView : UserControl 6 | { 7 | public ConicShapeView() 8 | { 9 | InitializeComponent(); 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /src/Draw2D/Views/Shapes/CubicBezierShapeView.axaml.cs: -------------------------------------------------------------------------------- 1 | using Avalonia.Controls; 2 | 3 | namespace Draw2D.Views.Shapes; 4 | 5 | public partial class CubicBezierShapeView : UserControl 6 | { 7 | public CubicBezierShapeView() 8 | { 9 | InitializeComponent(); 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /src/Draw2D/Views/Shapes/FigureShapeView.axaml.cs: -------------------------------------------------------------------------------- 1 | using Avalonia.Controls; 2 | 3 | namespace Draw2D.Views.Shapes; 4 | 5 | public partial class FigureShapeView : UserControl 6 | { 7 | public FigureShapeView() 8 | { 9 | InitializeComponent(); 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /src/Draw2D/Views/Shapes/GroupShapeView.axaml.cs: -------------------------------------------------------------------------------- 1 | using Avalonia.Controls; 2 | 3 | namespace Draw2D.Views.Shapes; 4 | 5 | public partial class GroupShapeView : UserControl 6 | { 7 | public GroupShapeView() 8 | { 9 | InitializeComponent(); 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /src/Draw2D/Views/Shapes/ImageShapeView.axaml.cs: -------------------------------------------------------------------------------- 1 | using Avalonia.Controls; 2 | 3 | namespace Draw2D.Views.Shapes; 4 | 5 | public partial class ImageShapeView : UserControl 6 | { 7 | public ImageShapeView() 8 | { 9 | InitializeComponent(); 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /src/Draw2D/Views/Shapes/LineShapeView.axaml.cs: -------------------------------------------------------------------------------- 1 | using Avalonia.Controls; 2 | 3 | namespace Draw2D.Views.Shapes; 4 | 5 | public partial class LineShapeView : UserControl 6 | { 7 | public LineShapeView() 8 | { 9 | InitializeComponent(); 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /src/Draw2D/Views/Shapes/OvalShapeView.axaml.cs: -------------------------------------------------------------------------------- 1 | using Avalonia.Controls; 2 | 3 | namespace Draw2D.Views.Shapes; 4 | 5 | public partial class OvalShapeView : UserControl 6 | { 7 | public OvalShapeView() 8 | { 9 | InitializeComponent(); 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /src/Draw2D/Views/Shapes/PathShapeView.axaml.cs: -------------------------------------------------------------------------------- 1 | using Avalonia.Controls; 2 | 3 | namespace Draw2D.Views.Shapes; 4 | 5 | public partial class PathShapeView : UserControl 6 | { 7 | public PathShapeView() 8 | { 9 | InitializeComponent(); 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /src/Draw2D/Views/Shapes/PointShapeView.axaml.cs: -------------------------------------------------------------------------------- 1 | using Avalonia.Controls; 2 | 3 | namespace Draw2D.Views.Shapes; 4 | 5 | public partial class PointShapeView : UserControl 6 | { 7 | public PointShapeView() 8 | { 9 | InitializeComponent(); 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /src/Draw2D/Views/Shapes/QuadraticBezierShapeView.axaml.cs: -------------------------------------------------------------------------------- 1 | using Avalonia.Controls; 2 | 3 | namespace Draw2D.Views.Shapes; 4 | 5 | public partial class QuadraticBezierShapeView : UserControl 6 | { 7 | public QuadraticBezierShapeView() 8 | { 9 | InitializeComponent(); 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /src/Draw2D/Views/Shapes/RectangleShapeView.axaml.cs: -------------------------------------------------------------------------------- 1 | using Avalonia.Controls; 2 | 3 | namespace Draw2D.Views.Shapes; 4 | 5 | public partial class RectangleShapeView : UserControl 6 | { 7 | public RectangleShapeView() 8 | { 9 | InitializeComponent(); 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /src/Draw2D/Views/Shapes/ReferencePointShapeView.axaml.cs: -------------------------------------------------------------------------------- 1 | using Avalonia.Controls; 2 | 3 | namespace Draw2D.Views.Shapes; 4 | 5 | public partial class ReferencePointShapeView : UserControl 6 | { 7 | public ReferencePointShapeView() 8 | { 9 | InitializeComponent(); 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /src/Draw2D/Views/Shapes/ReferenceShapeView.axaml.cs: -------------------------------------------------------------------------------- 1 | using Avalonia.Controls; 2 | 3 | namespace Draw2D.Views.Shapes; 4 | 5 | public partial class ReferenceShapeView : UserControl 6 | { 7 | public ReferenceShapeView() 8 | { 9 | InitializeComponent(); 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /src/Draw2D/Views/Shapes/TextShapeView.axaml.cs: -------------------------------------------------------------------------------- 1 | using Avalonia.Controls; 2 | 3 | namespace Draw2D.Views.Shapes; 4 | 5 | public partial class TextShapeView : UserControl 6 | { 7 | public TextShapeView() 8 | { 9 | InitializeComponent(); 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /src/Draw2D/Views/Style/ArgbColorView.axaml.cs: -------------------------------------------------------------------------------- 1 | using Avalonia.Controls; 2 | 3 | namespace Draw2D.Views.Style; 4 | 5 | public partial class ArgbColorView : UserControl 6 | { 7 | public ArgbColorView() 8 | { 9 | InitializeComponent(); 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /src/Draw2D/Views/Style/ColorFilters/BlendModeColorFilterView.axaml: -------------------------------------------------------------------------------- 1 |  9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /src/Draw2D/Views/Style/ColorFilters/BlendModeColorFilterView.axaml.cs: -------------------------------------------------------------------------------- 1 | using Avalonia.Controls; 2 | 3 | namespace Draw2D.Views.Style.ColorFilters; 4 | 5 | public partial class BlendModeColorFilterView : UserControl 6 | { 7 | public BlendModeColorFilterView() 8 | { 9 | InitializeComponent(); 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /src/Draw2D/Views/Style/ColorFilters/ColorCubeColorFilterView.axaml: -------------------------------------------------------------------------------- 1 |  9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /src/Draw2D/Views/Style/ColorFilters/ColorCubeColorFilterView.axaml.cs: -------------------------------------------------------------------------------- 1 | using Avalonia.Controls; 2 | 3 | namespace Draw2D.Views.Style.ColorFilters; 4 | 5 | public partial class ColorCubeColorFilterView : UserControl 6 | { 7 | public ColorCubeColorFilterView() 8 | { 9 | InitializeComponent(); 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /src/Draw2D/Views/Style/ColorFilters/ColorMatrixColorFilterView.axaml: -------------------------------------------------------------------------------- 1 |  9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /src/Draw2D/Views/Style/ColorFilters/ColorMatrixColorFilterView.axaml.cs: -------------------------------------------------------------------------------- 1 | using Avalonia.Controls; 2 | 3 | namespace Draw2D.Views.Style.ColorFilters; 4 | 5 | public partial class ColorMatrixColorFilterView : UserControl 6 | { 7 | public ColorMatrixColorFilterView() 8 | { 9 | InitializeComponent(); 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /src/Draw2D/Views/Style/ColorFilters/ComposeColorFilterView.axaml: -------------------------------------------------------------------------------- 1 |  9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /src/Draw2D/Views/Style/ColorFilters/ComposeColorFilterView.axaml.cs: -------------------------------------------------------------------------------- 1 | using Avalonia.Controls; 2 | 3 | namespace Draw2D.Views.Style.ColorFilters; 4 | 5 | public partial class ComposeColorFilterView : UserControl 6 | { 7 | public ComposeColorFilterView() 8 | { 9 | InitializeComponent(); 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /src/Draw2D/Views/Style/ColorFilters/GammaColorFilterView.axaml: -------------------------------------------------------------------------------- 1 |  9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /src/Draw2D/Views/Style/ColorFilters/GammaColorFilterView.axaml.cs: -------------------------------------------------------------------------------- 1 | using Avalonia.Controls; 2 | 3 | namespace Draw2D.Views.Style.ColorFilters; 4 | 5 | public partial class GammaColorFilterView : UserControl 6 | { 7 | public GammaColorFilterView() 8 | { 9 | InitializeComponent(); 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /src/Draw2D/Views/Style/ColorFilters/HighContrastColorFilterView.axaml: -------------------------------------------------------------------------------- 1 |  9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /src/Draw2D/Views/Style/ColorFilters/HighContrastColorFilterView.axaml.cs: -------------------------------------------------------------------------------- 1 | using Avalonia.Controls; 2 | 3 | namespace Draw2D.Views.Style.ColorFilters; 4 | 5 | public partial class HighContrastColorFilterView : UserControl 6 | { 7 | public HighContrastColorFilterView() 8 | { 9 | InitializeComponent(); 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /src/Draw2D/Views/Style/ColorFilters/LightingColorFilterView.axaml: -------------------------------------------------------------------------------- 1 |  9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /src/Draw2D/Views/Style/ColorFilters/LightingColorFilterView.axaml.cs: -------------------------------------------------------------------------------- 1 | using Avalonia.Controls; 2 | 3 | namespace Draw2D.Views.Style.ColorFilters; 4 | 5 | public partial class LightingColorFilterView : UserControl 6 | { 7 | public LightingColorFilterView() 8 | { 9 | InitializeComponent(); 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /src/Draw2D/Views/Style/ColorFilters/LumaColorColorFilterView.axaml: -------------------------------------------------------------------------------- 1 |  9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /src/Draw2D/Views/Style/ColorFilters/LumaColorColorFilterView.axaml.cs: -------------------------------------------------------------------------------- 1 | using Avalonia.Controls; 2 | 3 | namespace Draw2D.Views.Style.ColorFilters; 4 | 5 | public partial class LumaColorColorFilterView : UserControl 6 | { 7 | public LumaColorColorFilterView() 8 | { 9 | InitializeComponent(); 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /src/Draw2D/Views/Style/ColorFilters/TableColorFilterView.axaml: -------------------------------------------------------------------------------- 1 |  9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /src/Draw2D/Views/Style/ColorFilters/TableColorFilterView.axaml.cs: -------------------------------------------------------------------------------- 1 | using Avalonia.Controls; 2 | 3 | namespace Draw2D.Views.Style.ColorFilters; 4 | 5 | public partial class TableColorFilterView : UserControl 6 | { 7 | public TableColorFilterView() 8 | { 9 | InitializeComponent(); 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /src/Draw2D/Views/Style/ImageFilters/AlphaThresholdImageFilterView.axaml: -------------------------------------------------------------------------------- 1 |  9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /src/Draw2D/Views/Style/ImageFilters/AlphaThresholdImageFilterView.axaml.cs: -------------------------------------------------------------------------------- 1 | using Avalonia.Controls; 2 | 3 | namespace Draw2D.Views.Style.ImageFilters; 4 | 5 | public partial class AlphaThresholdImageFilterView : UserControl 6 | { 7 | public AlphaThresholdImageFilterView() 8 | { 9 | InitializeComponent(); 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /src/Draw2D/Views/Style/ImageFilters/ArithmeticImageFilterView.axaml: -------------------------------------------------------------------------------- 1 |  9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /src/Draw2D/Views/Style/ImageFilters/ArithmeticImageFilterView.axaml.cs: -------------------------------------------------------------------------------- 1 | using Avalonia.Controls; 2 | 3 | namespace Draw2D.Views.Style.ImageFilters; 4 | 5 | public partial class ArithmeticImageFilterView : UserControl 6 | { 7 | public ArithmeticImageFilterView() 8 | { 9 | InitializeComponent(); 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /src/Draw2D/Views/Style/ImageFilters/BlendModeImageFilterView.axaml: -------------------------------------------------------------------------------- 1 |  9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /src/Draw2D/Views/Style/ImageFilters/BlendModeImageFilterView.axaml.cs: -------------------------------------------------------------------------------- 1 | using Avalonia.Controls; 2 | 3 | namespace Draw2D.Views.Style.ImageFilters; 4 | 5 | public partial class BlendModeImageFilterView : UserControl 6 | { 7 | public BlendModeImageFilterView() 8 | { 9 | InitializeComponent(); 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /src/Draw2D/Views/Style/ImageFilters/BlurImageFilterView.axaml: -------------------------------------------------------------------------------- 1 |  9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /src/Draw2D/Views/Style/ImageFilters/BlurImageFilterView.axaml.cs: -------------------------------------------------------------------------------- 1 | using Avalonia.Controls; 2 | 3 | namespace Draw2D.Views.Style.ImageFilters; 4 | 5 | public partial class BlurImageFilterView : UserControl 6 | { 7 | public BlurImageFilterView() 8 | { 9 | InitializeComponent(); 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /src/Draw2D/Views/Style/ImageFilters/ColorFilterImageFilterView.axaml: -------------------------------------------------------------------------------- 1 |  9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /src/Draw2D/Views/Style/ImageFilters/ColorFilterImageFilterView.axaml.cs: -------------------------------------------------------------------------------- 1 | using Avalonia.Controls; 2 | 3 | namespace Draw2D.Views.Style.ImageFilters; 4 | 5 | public partial class ColorFilterImageFilterView : UserControl 6 | { 7 | public ColorFilterImageFilterView() 8 | { 9 | InitializeComponent(); 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /src/Draw2D/Views/Style/ImageFilters/ComposeImageFilterView.axaml: -------------------------------------------------------------------------------- 1 |  9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /src/Draw2D/Views/Style/ImageFilters/ComposeImageFilterView.axaml.cs: -------------------------------------------------------------------------------- 1 | using Avalonia.Controls; 2 | 3 | namespace Draw2D.Views.Style.ImageFilters; 4 | 5 | public partial class ComposeImageFilterView : UserControl 6 | { 7 | public ComposeImageFilterView() 8 | { 9 | InitializeComponent(); 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /src/Draw2D/Views/Style/ImageFilters/DilateImageFilterView.axaml: -------------------------------------------------------------------------------- 1 |  9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /src/Draw2D/Views/Style/ImageFilters/DilateImageFilterView.axaml.cs: -------------------------------------------------------------------------------- 1 | using Avalonia.Controls; 2 | 3 | namespace Draw2D.Views.Style.ImageFilters; 4 | 5 | public partial class DilateImageFilterView : UserControl 6 | { 7 | public DilateImageFilterView() 8 | { 9 | InitializeComponent(); 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /src/Draw2D/Views/Style/ImageFilters/DisplacementMapEffectImageFilterView.axaml.cs: -------------------------------------------------------------------------------- 1 | using Avalonia.Controls; 2 | 3 | namespace Draw2D.Views.Style.ImageFilters; 4 | 5 | public partial class DisplacementMapEffectImageFilterView : UserControl 6 | { 7 | public DisplacementMapEffectImageFilterView() 8 | { 9 | InitializeComponent(); 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /src/Draw2D/Views/Style/ImageFilters/DistantLitDiffuseImageFilterView.axaml: -------------------------------------------------------------------------------- 1 |  9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /src/Draw2D/Views/Style/ImageFilters/DistantLitDiffuseImageFilterView.axaml.cs: -------------------------------------------------------------------------------- 1 | using Avalonia.Controls; 2 | 3 | namespace Draw2D.Views.Style.ImageFilters; 4 | 5 | public partial class DistantLitDiffuseImageFilterView : UserControl 6 | { 7 | public DistantLitDiffuseImageFilterView() 8 | { 9 | InitializeComponent(); 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /src/Draw2D/Views/Style/ImageFilters/DistantLitSpecularImageFilterView.axaml: -------------------------------------------------------------------------------- 1 |  9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /src/Draw2D/Views/Style/ImageFilters/DistantLitSpecularImageFilterView.axaml.cs: -------------------------------------------------------------------------------- 1 | using Avalonia.Controls; 2 | 3 | namespace Draw2D.Views.Style.ImageFilters; 4 | 5 | public partial class DistantLitSpecularImageFilterView : UserControl 6 | { 7 | public DistantLitSpecularImageFilterView() 8 | { 9 | InitializeComponent(); 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /src/Draw2D/Views/Style/ImageFilters/DropShadowImageFilterView.axaml: -------------------------------------------------------------------------------- 1 |  9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /src/Draw2D/Views/Style/ImageFilters/DropShadowImageFilterView.axaml.cs: -------------------------------------------------------------------------------- 1 | using Avalonia.Controls; 2 | 3 | namespace Draw2D.Views.Style.ImageFilters; 4 | 5 | public partial class DropShadowImageFilterView : UserControl 6 | { 7 | public DropShadowImageFilterView() 8 | { 9 | InitializeComponent(); 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /src/Draw2D/Views/Style/ImageFilters/ErodeImageFilterView.axaml: -------------------------------------------------------------------------------- 1 |  9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /src/Draw2D/Views/Style/ImageFilters/ErodeImageFilterView.axaml.cs: -------------------------------------------------------------------------------- 1 | using Avalonia.Controls; 2 | 3 | namespace Draw2D.Views.Style.ImageFilters; 4 | 5 | public partial class ErodeImageFilterView : UserControl 6 | { 7 | public ErodeImageFilterView() 8 | { 9 | InitializeComponent(); 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /src/Draw2D/Views/Style/ImageFilters/ImageImageFilterView.axaml: -------------------------------------------------------------------------------- 1 |  9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /src/Draw2D/Views/Style/ImageFilters/ImageImageFilterView.axaml.cs: -------------------------------------------------------------------------------- 1 | using Avalonia.Controls; 2 | 3 | namespace Draw2D.Views.Style.ImageFilters; 4 | 5 | public partial class ImageImageFilterView : UserControl 6 | { 7 | public ImageImageFilterView() 8 | { 9 | InitializeComponent(); 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /src/Draw2D/Views/Style/ImageFilters/MagnifierImageFilterView.axaml: -------------------------------------------------------------------------------- 1 |  9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /src/Draw2D/Views/Style/ImageFilters/MagnifierImageFilterView.axaml.cs: -------------------------------------------------------------------------------- 1 | using Avalonia.Controls; 2 | 3 | namespace Draw2D.Views.Style.ImageFilters; 4 | 5 | public partial class MagnifierImageFilterView : UserControl 6 | { 7 | public MagnifierImageFilterView() 8 | { 9 | InitializeComponent(); 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /src/Draw2D/Views/Style/ImageFilters/MatrixConvolutionImageFilterView.axaml: -------------------------------------------------------------------------------- 1 |  9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /src/Draw2D/Views/Style/ImageFilters/MatrixConvolutionImageFilterView.axaml.cs: -------------------------------------------------------------------------------- 1 | using Avalonia.Controls; 2 | 3 | namespace Draw2D.Views.Style.ImageFilters; 4 | 5 | public partial class MatrixConvolutionImageFilterView : UserControl 6 | { 7 | public MatrixConvolutionImageFilterView() 8 | { 9 | InitializeComponent(); 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /src/Draw2D/Views/Style/ImageFilters/MatrixImageFilterView.axaml: -------------------------------------------------------------------------------- 1 |  9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /src/Draw2D/Views/Style/ImageFilters/MatrixImageFilterView.axaml.cs: -------------------------------------------------------------------------------- 1 | using Avalonia.Controls; 2 | 3 | namespace Draw2D.Views.Style.ImageFilters; 4 | 5 | public partial class MatrixImageFilterView : UserControl 6 | { 7 | public MatrixImageFilterView() 8 | { 9 | InitializeComponent(); 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /src/Draw2D/Views/Style/ImageFilters/MergeImageFilterView.axaml: -------------------------------------------------------------------------------- 1 |  9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /src/Draw2D/Views/Style/ImageFilters/MergeImageFilterView.axaml.cs: -------------------------------------------------------------------------------- 1 | using Avalonia.Controls; 2 | 3 | namespace Draw2D.Views.Style.ImageFilters; 4 | 5 | public partial class MergeImageFilterView : UserControl 6 | { 7 | public MergeImageFilterView() 8 | { 9 | InitializeComponent(); 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /src/Draw2D/Views/Style/ImageFilters/OffsetImageFilterView.axaml: -------------------------------------------------------------------------------- 1 |  9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /src/Draw2D/Views/Style/ImageFilters/OffsetImageFilterView.axaml.cs: -------------------------------------------------------------------------------- 1 | using Avalonia.Controls; 2 | 3 | namespace Draw2D.Views.Style.ImageFilters; 4 | 5 | public partial class OffsetImageFilterView : UserControl 6 | { 7 | public OffsetImageFilterView() 8 | { 9 | InitializeComponent(); 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /src/Draw2D/Views/Style/ImageFilters/PaintImageFilterView.axaml: -------------------------------------------------------------------------------- 1 |  9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /src/Draw2D/Views/Style/ImageFilters/PaintImageFilterView.axaml.cs: -------------------------------------------------------------------------------- 1 | using Avalonia.Controls; 2 | 3 | namespace Draw2D.Views.Style.ImageFilters; 4 | 5 | public partial class PaintImageFilterView : UserControl 6 | { 7 | public PaintImageFilterView() 8 | { 9 | InitializeComponent(); 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /src/Draw2D/Views/Style/ImageFilters/PictureImageFilterView.axaml: -------------------------------------------------------------------------------- 1 |  9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /src/Draw2D/Views/Style/ImageFilters/PictureImageFilterView.axaml.cs: -------------------------------------------------------------------------------- 1 | using Avalonia.Controls; 2 | 3 | namespace Draw2D.Views.Style.ImageFilters; 4 | 5 | public partial class PictureImageFilterView : UserControl 6 | { 7 | public PictureImageFilterView() 8 | { 9 | InitializeComponent(); 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /src/Draw2D/Views/Style/ImageFilters/PointLitDiffuseImageFilterView.axaml: -------------------------------------------------------------------------------- 1 |  9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /src/Draw2D/Views/Style/ImageFilters/PointLitDiffuseImageFilterView.axaml.cs: -------------------------------------------------------------------------------- 1 | using Avalonia.Controls; 2 | 3 | namespace Draw2D.Views.Style.ImageFilters; 4 | 5 | public partial class PointLitDiffuseImageFilterView : UserControl 6 | { 7 | public PointLitDiffuseImageFilterView() 8 | { 9 | InitializeComponent(); 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /src/Draw2D/Views/Style/ImageFilters/PointLitSpecularImageFilterView.axaml: -------------------------------------------------------------------------------- 1 |  9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /src/Draw2D/Views/Style/ImageFilters/PointLitSpecularImageFilterView.axaml.cs: -------------------------------------------------------------------------------- 1 | using Avalonia.Controls; 2 | 3 | namespace Draw2D.Views.Style.ImageFilters; 4 | 5 | public partial class PointLitSpecularImageFilterView : UserControl 6 | { 7 | public PointLitSpecularImageFilterView() 8 | { 9 | InitializeComponent(); 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /src/Draw2D/Views/Style/ImageFilters/SpotLitDiffuseImageFilterView.axaml: -------------------------------------------------------------------------------- 1 |  9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /src/Draw2D/Views/Style/ImageFilters/SpotLitDiffuseImageFilterView.axaml.cs: -------------------------------------------------------------------------------- 1 | using Avalonia.Controls; 2 | 3 | namespace Draw2D.Views.Style.ImageFilters; 4 | 5 | public partial class SpotLitDiffuseImageFilterView : UserControl 6 | { 7 | public SpotLitDiffuseImageFilterView() 8 | { 9 | InitializeComponent(); 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /src/Draw2D/Views/Style/ImageFilters/SpotLitSpecularImageFilterView.axaml: -------------------------------------------------------------------------------- 1 |  9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /src/Draw2D/Views/Style/ImageFilters/SpotLitSpecularImageFilterView.axaml.cs: -------------------------------------------------------------------------------- 1 | using Avalonia.Controls; 2 | 3 | namespace Draw2D.Views.Style.ImageFilters; 4 | 5 | public partial class SpotLitSpecularImageFilterView : UserControl 6 | { 7 | public SpotLitSpecularImageFilterView() 8 | { 9 | InitializeComponent(); 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /src/Draw2D/Views/Style/ImageFilters/TileImageFilterView.axaml: -------------------------------------------------------------------------------- 1 |  9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /src/Draw2D/Views/Style/ImageFilters/TileImageFilterView.axaml.cs: -------------------------------------------------------------------------------- 1 | using Avalonia.Controls; 2 | 3 | namespace Draw2D.Views.Style.ImageFilters; 4 | 5 | public partial class TileImageFilterView : UserControl 6 | { 7 | public TileImageFilterView() 8 | { 9 | InitializeComponent(); 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /src/Draw2D/Views/Style/MaskFilters/BlurMaskFilterView.axaml: -------------------------------------------------------------------------------- 1 |  9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /src/Draw2D/Views/Style/MaskFilters/BlurMaskFilterView.axaml.cs: -------------------------------------------------------------------------------- 1 | using Avalonia.Controls; 2 | 3 | namespace Draw2D.Views.Style.MaskFilters; 4 | 5 | public partial class BlurMaskFilterView : UserControl 6 | { 7 | public BlurMaskFilterView() 8 | { 9 | InitializeComponent(); 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /src/Draw2D/Views/Style/MaskFilters/ClipMaskFilterView.axaml: -------------------------------------------------------------------------------- 1 |  9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /src/Draw2D/Views/Style/MaskFilters/ClipMaskFilterView.axaml.cs: -------------------------------------------------------------------------------- 1 | using Avalonia.Controls; 2 | 3 | namespace Draw2D.Views.Style.MaskFilters; 4 | 5 | public partial class ClipMaskFilterView : UserControl 6 | { 7 | public ClipMaskFilterView() 8 | { 9 | InitializeComponent(); 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /src/Draw2D/Views/Style/MaskFilters/GammaMaskFilterView.axaml: -------------------------------------------------------------------------------- 1 |  9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /src/Draw2D/Views/Style/MaskFilters/GammaMaskFilterView.axaml.cs: -------------------------------------------------------------------------------- 1 | using Avalonia.Controls; 2 | 3 | namespace Draw2D.Views.Style.MaskFilters; 4 | 5 | public partial class GammaMaskFilterView : UserControl 6 | { 7 | public GammaMaskFilterView() 8 | { 9 | InitializeComponent(); 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /src/Draw2D/Views/Style/MaskFilters/TableMaskFilterView.axaml: -------------------------------------------------------------------------------- 1 |  9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /src/Draw2D/Views/Style/MaskFilters/TableMaskFilterView.axaml.cs: -------------------------------------------------------------------------------- 1 | using Avalonia.Controls; 2 | 3 | namespace Draw2D.Views.Style.MaskFilters; 4 | 5 | public partial class TableMaskFilterView : UserControl 6 | { 7 | public TableMaskFilterView() 8 | { 9 | InitializeComponent(); 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /src/Draw2D/Views/Style/PaintEffectsView.axaml.cs: -------------------------------------------------------------------------------- 1 | using Avalonia.Controls; 2 | 3 | namespace Draw2D.Views.Style; 4 | 5 | public partial class PaintEffectsView : UserControl 6 | { 7 | public PaintEffectsView() 8 | { 9 | InitializeComponent(); 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /src/Draw2D/Views/Style/PaintView.axaml.cs: -------------------------------------------------------------------------------- 1 | using Avalonia.Controls; 2 | 3 | namespace Draw2D.Views.Style; 4 | 5 | public partial class PaintView : UserControl 6 | { 7 | public PaintView() 8 | { 9 | InitializeComponent(); 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /src/Draw2D/Views/Style/PathEffects/Path1DPathEffectView.axaml.cs: -------------------------------------------------------------------------------- 1 | using Avalonia.Controls; 2 | 3 | namespace Draw2D.Views.Style.PathEffects; 4 | 5 | public partial class Path1DPathEffectView : UserControl 6 | { 7 | public Path1DPathEffectView() 8 | { 9 | InitializeComponent(); 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /src/Draw2D/Views/Style/PathEffects/Path2DLineEffectView.axaml.cs: -------------------------------------------------------------------------------- 1 | using Avalonia.Controls; 2 | 3 | namespace Draw2D.Views.Style.PathEffects; 4 | 5 | public partial class Path2DLineEffectView : UserControl 6 | { 7 | public Path2DLineEffectView() 8 | { 9 | InitializeComponent(); 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /src/Draw2D/Views/Style/PathEffects/Path2DPathEffectView.axaml.cs: -------------------------------------------------------------------------------- 1 | using Avalonia.Controls; 2 | 3 | namespace Draw2D.Views.Style.PathEffects; 4 | 5 | public partial class Path2DPathEffectView : UserControl 6 | { 7 | public Path2DPathEffectView() 8 | { 9 | InitializeComponent(); 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /src/Draw2D/Views/Style/PathEffects/PathComposeEffectView.axaml.cs: -------------------------------------------------------------------------------- 1 | using Avalonia.Controls; 2 | 3 | namespace Draw2D.Views.Style.PathEffects; 4 | 5 | public partial class PathComposeEffectView : UserControl 6 | { 7 | public PathComposeEffectView() 8 | { 9 | InitializeComponent(); 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /src/Draw2D/Views/Style/PathEffects/PathCornerEffectView.axaml.cs: -------------------------------------------------------------------------------- 1 | using Avalonia.Controls; 2 | 3 | namespace Draw2D.Views.Style.PathEffects; 4 | 5 | public partial class PathCornerEffectView : UserControl 6 | { 7 | public PathCornerEffectView() 8 | { 9 | InitializeComponent(); 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /src/Draw2D/Views/Style/PathEffects/PathDashEffectView.axaml.cs: -------------------------------------------------------------------------------- 1 | using Avalonia.Controls; 2 | 3 | namespace Draw2D.Views.Style.PathEffects; 4 | 5 | public partial class PathDashEffectView : UserControl 6 | { 7 | public PathDashEffectView() 8 | { 9 | InitializeComponent(); 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /src/Draw2D/Views/Style/PathEffects/PathDiscreteEffectView.axaml.cs: -------------------------------------------------------------------------------- 1 | using Avalonia.Controls; 2 | 3 | namespace Draw2D.Views.Style.PathEffects; 4 | 5 | public partial class PathDiscreteEffectView : UserControl 6 | { 7 | public PathDiscreteEffectView() 8 | { 9 | InitializeComponent(); 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /src/Draw2D/Views/Style/PathEffects/PathSumEffectView.axaml.cs: -------------------------------------------------------------------------------- 1 | using Avalonia.Controls; 2 | 3 | namespace Draw2D.Views.Style.PathEffects; 4 | 5 | public partial class PathSumEffectView : UserControl 6 | { 7 | public PathSumEffectView() 8 | { 9 | InitializeComponent(); 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /src/Draw2D/Views/Style/PathEffects/PathTrimEffectView.axaml.cs: -------------------------------------------------------------------------------- 1 | using Avalonia.Controls; 2 | 3 | namespace Draw2D.Views.Style.PathEffects; 4 | 5 | public partial class PathTrimEffectView : UserControl 6 | { 7 | public PathTrimEffectView() 8 | { 9 | InitializeComponent(); 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /src/Draw2D/Views/Style/Shaders/BitmapShaderView.axaml: -------------------------------------------------------------------------------- 1 |  9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /src/Draw2D/Views/Style/Shaders/BitmapShaderView.axaml.cs: -------------------------------------------------------------------------------- 1 | using Avalonia.Controls; 2 | 3 | namespace Draw2D.Views.Style.Shaders; 4 | 5 | public partial class BitmapShaderView : UserControl 6 | { 7 | public BitmapShaderView() 8 | { 9 | InitializeComponent(); 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /src/Draw2D/Views/Style/Shaders/ColorFilterShaderView.axaml: -------------------------------------------------------------------------------- 1 |  9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /src/Draw2D/Views/Style/Shaders/ColorFilterShaderView.axaml.cs: -------------------------------------------------------------------------------- 1 | using Avalonia.Controls; 2 | 3 | namespace Draw2D.Views.Style.Shaders; 4 | 5 | public partial class ColorFilterShaderView : UserControl 6 | { 7 | public ColorFilterShaderView() 8 | { 9 | InitializeComponent(); 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /src/Draw2D/Views/Style/Shaders/ColorShaderView.axaml: -------------------------------------------------------------------------------- 1 |  9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /src/Draw2D/Views/Style/Shaders/ColorShaderView.axaml.cs: -------------------------------------------------------------------------------- 1 | using Avalonia.Controls; 2 | 3 | namespace Draw2D.Views.Style.Shaders; 4 | 5 | public partial class ColorShaderView : UserControl 6 | { 7 | public ColorShaderView() 8 | { 9 | InitializeComponent(); 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /src/Draw2D/Views/Style/Shaders/ComposeShaderView.axaml: -------------------------------------------------------------------------------- 1 |  9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /src/Draw2D/Views/Style/Shaders/ComposeShaderView.axaml.cs: -------------------------------------------------------------------------------- 1 | using Avalonia.Controls; 2 | 3 | namespace Draw2D.Views.Style.Shaders; 4 | 5 | public partial class ComposeShaderView : UserControl 6 | { 7 | public ComposeShaderView() 8 | { 9 | InitializeComponent(); 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /src/Draw2D/Views/Style/Shaders/EmptyShaderView.axaml: -------------------------------------------------------------------------------- 1 |  9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /src/Draw2D/Views/Style/Shaders/EmptyShaderView.axaml.cs: -------------------------------------------------------------------------------- 1 | using Avalonia.Controls; 2 | 3 | namespace Draw2D.Views.Style.Shaders; 4 | 5 | public partial class EmptyShaderView : UserControl 6 | { 7 | public EmptyShaderView() 8 | { 9 | InitializeComponent(); 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /src/Draw2D/Views/Style/Shaders/LinearGradientShaderView.axaml: -------------------------------------------------------------------------------- 1 |  9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /src/Draw2D/Views/Style/Shaders/LinearGradientShaderView.axaml.cs: -------------------------------------------------------------------------------- 1 | using Avalonia.Controls; 2 | 3 | namespace Draw2D.Views.Style.Shaders; 4 | 5 | public partial class LinearGradientShaderView : UserControl 6 | { 7 | public LinearGradientShaderView() 8 | { 9 | InitializeComponent(); 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /src/Draw2D/Views/Style/Shaders/LocalMatrixShaderView.axaml: -------------------------------------------------------------------------------- 1 |  9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /src/Draw2D/Views/Style/Shaders/LocalMatrixShaderView.axaml.cs: -------------------------------------------------------------------------------- 1 | using Avalonia.Controls; 2 | 3 | namespace Draw2D.Views.Style.Shaders; 4 | 5 | public partial class LocalMatrixShaderView : UserControl 6 | { 7 | public LocalMatrixShaderView() 8 | { 9 | InitializeComponent(); 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /src/Draw2D/Views/Style/Shaders/PerlinNoiseFractalNoiseShaderView.axaml: -------------------------------------------------------------------------------- 1 |  9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /src/Draw2D/Views/Style/Shaders/PerlinNoiseFractalNoiseShaderView.axaml.cs: -------------------------------------------------------------------------------- 1 | using Avalonia.Controls; 2 | 3 | namespace Draw2D.Views.Style.Shaders; 4 | 5 | public partial class PerlinNoiseFractalNoiseShaderView : UserControl 6 | { 7 | public PerlinNoiseFractalNoiseShaderView() 8 | { 9 | InitializeComponent(); 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /src/Draw2D/Views/Style/Shaders/PerlinNoiseTurbulenceShaderView.axaml: -------------------------------------------------------------------------------- 1 |  9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /src/Draw2D/Views/Style/Shaders/PerlinNoiseTurbulenceShaderView.axaml.cs: -------------------------------------------------------------------------------- 1 | using Avalonia.Controls; 2 | 3 | namespace Draw2D.Views.Style.Shaders; 4 | 5 | public partial class PerlinNoiseTurbulenceShaderView : UserControl 6 | { 7 | public PerlinNoiseTurbulenceShaderView() 8 | { 9 | InitializeComponent(); 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /src/Draw2D/Views/Style/Shaders/RadialGradientShaderView.axaml: -------------------------------------------------------------------------------- 1 |  9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /src/Draw2D/Views/Style/Shaders/RadialGradientShaderView.axaml.cs: -------------------------------------------------------------------------------- 1 | using Avalonia.Controls; 2 | 3 | namespace Draw2D.Views.Style.Shaders; 4 | 5 | public partial class RadialGradientShaderView : UserControl 6 | { 7 | public RadialGradientShaderView() 8 | { 9 | InitializeComponent(); 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /src/Draw2D/Views/Style/Shaders/SweepGradientShaderView.axaml: -------------------------------------------------------------------------------- 1 |  9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /src/Draw2D/Views/Style/Shaders/SweepGradientShaderView.axaml.cs: -------------------------------------------------------------------------------- 1 | using Avalonia.Controls; 2 | 3 | namespace Draw2D.Views.Style.Shaders; 4 | 5 | public partial class SweepGradientShaderView : UserControl 6 | { 7 | public SweepGradientShaderView() 8 | { 9 | InitializeComponent(); 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /src/Draw2D/Views/Style/Shaders/TwoPointConicalGradientShaderView.axaml: -------------------------------------------------------------------------------- 1 |  9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /src/Draw2D/Views/Style/Shaders/TwoPointConicalGradientShaderView.axaml.cs: -------------------------------------------------------------------------------- 1 | using Avalonia.Controls; 2 | 3 | namespace Draw2D.Views.Style.Shaders; 4 | 5 | public partial class TwoPointConicalGradientShaderView : UserControl 6 | { 7 | public TwoPointConicalGradientShaderView() 8 | { 9 | InitializeComponent(); 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /src/Draw2D/Views/Style/ShapeStyleView.axaml.cs: -------------------------------------------------------------------------------- 1 | using Avalonia.Controls; 2 | 3 | namespace Draw2D.Views.Style; 4 | 5 | public partial class ShapeStyleView : UserControl 6 | { 7 | public ShapeStyleView() 8 | { 9 | InitializeComponent(); 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /src/Draw2D/Views/Style/TypefaceView.axaml.cs: -------------------------------------------------------------------------------- 1 | using Avalonia.Controls; 2 | 3 | namespace Draw2D.Views.Style; 4 | 5 | public partial class TypefaceView : UserControl 6 | { 7 | public TypefaceView() 8 | { 9 | InitializeComponent(); 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /src/Draw2D/Views/TextView.axaml: -------------------------------------------------------------------------------- 1 |  9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /src/Draw2D/Views/TextView.axaml.cs: -------------------------------------------------------------------------------- 1 | using Avalonia.Controls; 2 | 3 | namespace Draw2D.Views; 4 | 5 | public partial class TextView : UserControl 6 | { 7 | public TextView() 8 | { 9 | InitializeComponent(); 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /src/Draw2D/Views/Tools/ArcToolSettingsView.axaml.cs: -------------------------------------------------------------------------------- 1 | using Avalonia.Controls; 2 | 3 | namespace Draw2D.Views.Tools; 4 | 5 | public partial class ArcToolSettingsView : UserControl 6 | { 7 | public ArcToolSettingsView() 8 | { 9 | InitializeComponent(); 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /src/Draw2D/Views/Tools/ArcToolView.axaml.cs: -------------------------------------------------------------------------------- 1 | using Avalonia.Controls; 2 | 3 | namespace Draw2D.Views.Tools; 4 | 5 | public partial class ArcToolView : UserControl 6 | { 7 | public ArcToolView() 8 | { 9 | InitializeComponent(); 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /src/Draw2D/Views/Tools/CircleToolSettingsView.axaml.cs: -------------------------------------------------------------------------------- 1 | using Avalonia.Controls; 2 | 3 | namespace Draw2D.Views.Tools; 4 | 5 | public partial class CircleToolSettingsView : UserControl 6 | { 7 | public CircleToolSettingsView() 8 | { 9 | InitializeComponent(); 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /src/Draw2D/Views/Tools/CircleToolView.axaml.cs: -------------------------------------------------------------------------------- 1 | using Avalonia.Controls; 2 | 3 | namespace Draw2D.Views.Tools; 4 | 5 | public partial class CircleToolView : UserControl 6 | { 7 | public CircleToolView() 8 | { 9 | InitializeComponent(); 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /src/Draw2D/Views/Tools/ConicToolSettingsView.axaml.cs: -------------------------------------------------------------------------------- 1 | using Avalonia.Controls; 2 | 3 | namespace Draw2D.Views.Tools; 4 | 5 | public partial class ConicToolSettingsView : UserControl 6 | { 7 | public ConicToolSettingsView() 8 | { 9 | InitializeComponent(); 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /src/Draw2D/Views/Tools/ConicToolView.axaml.cs: -------------------------------------------------------------------------------- 1 | using Avalonia.Controls; 2 | 3 | namespace Draw2D.Views.Tools; 4 | 5 | public partial class ConicToolView : UserControl 6 | { 7 | public ConicToolView() 8 | { 9 | InitializeComponent(); 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /src/Draw2D/Views/Tools/CubicBezierToolSettingsView.axaml.cs: -------------------------------------------------------------------------------- 1 | using Avalonia.Controls; 2 | 3 | namespace Draw2D.Views.Tools; 4 | 5 | public partial class CubicBezierToolSettingsView : UserControl 6 | { 7 | public CubicBezierToolSettingsView() 8 | { 9 | InitializeComponent(); 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /src/Draw2D/Views/Tools/CubicBezierToolView.axaml.cs: -------------------------------------------------------------------------------- 1 | using Avalonia.Controls; 2 | 3 | namespace Draw2D.Views.Tools; 4 | 5 | public partial class CubicBezierToolView : UserControl 6 | { 7 | public CubicBezierToolView() 8 | { 9 | InitializeComponent(); 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /src/Draw2D/Views/Tools/LineToolSettingsView.axaml.cs: -------------------------------------------------------------------------------- 1 | using Avalonia.Controls; 2 | 3 | namespace Draw2D.Views.Tools; 4 | 5 | public partial class LineToolSettingsView : UserControl 6 | { 7 | public LineToolSettingsView() 8 | { 9 | InitializeComponent(); 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /src/Draw2D/Views/Tools/LineToolView.axaml.cs: -------------------------------------------------------------------------------- 1 | using Avalonia.Controls; 2 | 3 | namespace Draw2D.Views.Tools; 4 | 5 | public partial class LineToolView : UserControl 6 | { 7 | public LineToolView() 8 | { 9 | InitializeComponent(); 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /src/Draw2D/Views/Tools/MoveToolSettingsView.axaml: -------------------------------------------------------------------------------- 1 |  9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /src/Draw2D/Views/Tools/MoveToolSettingsView.axaml.cs: -------------------------------------------------------------------------------- 1 | using Avalonia.Controls; 2 | 3 | namespace Draw2D.Views.Tools; 4 | 5 | public partial class MoveToolSettingsView : UserControl 6 | { 7 | public MoveToolSettingsView() 8 | { 9 | InitializeComponent(); 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /src/Draw2D/Views/Tools/MoveToolView.axaml.cs: -------------------------------------------------------------------------------- 1 | using Avalonia.Controls; 2 | 3 | namespace Draw2D.Views.Tools; 4 | 5 | public partial class MoveToolView : UserControl 6 | { 7 | public MoveToolView() 8 | { 9 | InitializeComponent(); 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /src/Draw2D/Views/Tools/NoneToolSettingsView.axaml: -------------------------------------------------------------------------------- 1 |  9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /src/Draw2D/Views/Tools/NoneToolSettingsView.axaml.cs: -------------------------------------------------------------------------------- 1 | using Avalonia.Controls; 2 | 3 | namespace Draw2D.Views.Tools; 4 | 5 | public partial class NoneToolSettingsView : UserControl 6 | { 7 | public NoneToolSettingsView() 8 | { 9 | InitializeComponent(); 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /src/Draw2D/Views/Tools/NoneToolView.axaml.cs: -------------------------------------------------------------------------------- 1 | using Avalonia.Controls; 2 | 3 | namespace Draw2D.Views.Tools; 4 | 5 | public partial class NoneToolView : UserControl 6 | { 7 | public NoneToolView() 8 | { 9 | InitializeComponent(); 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /src/Draw2D/Views/Tools/OvalToolSettingsView.axaml.cs: -------------------------------------------------------------------------------- 1 | using Avalonia.Controls; 2 | 3 | namespace Draw2D.Views.Tools; 4 | 5 | public partial class OvalToolSettingsView : UserControl 6 | { 7 | public OvalToolSettingsView() 8 | { 9 | InitializeComponent(); 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /src/Draw2D/Views/Tools/OvalToolView.axaml.cs: -------------------------------------------------------------------------------- 1 | using Avalonia.Controls; 2 | 3 | namespace Draw2D.Views.Tools; 4 | 5 | public partial class OvalToolView : UserControl 6 | { 7 | public OvalToolView() 8 | { 9 | InitializeComponent(); 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /src/Draw2D/Views/Tools/PathToolSettingsView.axaml.cs: -------------------------------------------------------------------------------- 1 | using Avalonia.Controls; 2 | 3 | namespace Draw2D.Views.Tools; 4 | 5 | public partial class PathToolSettingsView : UserControl 6 | { 7 | public PathToolSettingsView() 8 | { 9 | InitializeComponent(); 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /src/Draw2D/Views/Tools/PathToolView.axaml.cs: -------------------------------------------------------------------------------- 1 | using Avalonia.Controls; 2 | 3 | namespace Draw2D.Views.Tools; 4 | 5 | public partial class PathToolView : UserControl 6 | { 7 | public PathToolView() 8 | { 9 | InitializeComponent(); 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /src/Draw2D/Views/Tools/PointToolSettingsView.axaml.cs: -------------------------------------------------------------------------------- 1 | using Avalonia.Controls; 2 | 3 | namespace Draw2D.Views.Tools; 4 | 5 | public partial class PointToolSettingsView : UserControl 6 | { 7 | public PointToolSettingsView() 8 | { 9 | InitializeComponent(); 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /src/Draw2D/Views/Tools/PointToolView.axaml.cs: -------------------------------------------------------------------------------- 1 | using Avalonia.Controls; 2 | 3 | namespace Draw2D.Views.Tools; 4 | 5 | public partial class PointToolView : UserControl 6 | { 7 | public PointToolView() 8 | { 9 | InitializeComponent(); 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /src/Draw2D/Views/Tools/PolyLineToolSettingsView.axaml.cs: -------------------------------------------------------------------------------- 1 | using Avalonia.Controls; 2 | 3 | namespace Draw2D.Views.Tools; 4 | 5 | public partial class PolyLineToolSettingsView : UserControl 6 | { 7 | public PolyLineToolSettingsView() 8 | { 9 | InitializeComponent(); 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /src/Draw2D/Views/Tools/PolyLineToolView.axaml.cs: -------------------------------------------------------------------------------- 1 | using Avalonia.Controls; 2 | 3 | namespace Draw2D.Views.Tools; 4 | 5 | public partial class PolyLineToolView : UserControl 6 | { 7 | public PolyLineToolView() 8 | { 9 | InitializeComponent(); 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /src/Draw2D/Views/Tools/QuadraticBezierToolSettingsView.axaml.cs: -------------------------------------------------------------------------------- 1 | using Avalonia.Controls; 2 | 3 | namespace Draw2D.Views.Tools; 4 | 5 | public partial class QuadraticBezierToolSettingsView : UserControl 6 | { 7 | public QuadraticBezierToolSettingsView() 8 | { 9 | InitializeComponent(); 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /src/Draw2D/Views/Tools/QuadraticBezierToolView.axaml.cs: -------------------------------------------------------------------------------- 1 | using Avalonia.Controls; 2 | 3 | namespace Draw2D.Views.Tools; 4 | 5 | public partial class QuadraticBezierToolView : UserControl 6 | { 7 | public QuadraticBezierToolView() 8 | { 9 | InitializeComponent(); 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /src/Draw2D/Views/Tools/RectangleToolSettingsView.axaml.cs: -------------------------------------------------------------------------------- 1 | using Avalonia.Controls; 2 | 3 | namespace Draw2D.Views.Tools; 4 | 5 | public partial class RectangleToolSettingsView : UserControl 6 | { 7 | public RectangleToolSettingsView() 8 | { 9 | InitializeComponent(); 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /src/Draw2D/Views/Tools/RectangleToolView.axaml.cs: -------------------------------------------------------------------------------- 1 | using Avalonia.Controls; 2 | 3 | namespace Draw2D.Views.Tools; 4 | 5 | public partial class RectangleToolView : UserControl 6 | { 7 | public RectangleToolView() 8 | { 9 | InitializeComponent(); 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /src/Draw2D/Views/Tools/ScribbleToolSettingsView.axaml.cs: -------------------------------------------------------------------------------- 1 | using Avalonia.Controls; 2 | 3 | namespace Draw2D.Views.Tools; 4 | 5 | public partial class ScribbleToolSettingsView : UserControl 6 | { 7 | public ScribbleToolSettingsView() 8 | { 9 | InitializeComponent(); 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /src/Draw2D/Views/Tools/ScribbleToolView.axaml.cs: -------------------------------------------------------------------------------- 1 | using Avalonia.Controls; 2 | 3 | namespace Draw2D.Views.Tools; 4 | 5 | public partial class ScribbleToolView : UserControl 6 | { 7 | public ScribbleToolView() 8 | { 9 | InitializeComponent(); 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /src/Draw2D/Views/Tools/SelectionToolSettingsView.axaml.cs: -------------------------------------------------------------------------------- 1 | using Avalonia.Controls; 2 | 3 | namespace Draw2D.Views.Tools; 4 | 5 | public partial class SelectionToolSettingsView : UserControl 6 | { 7 | public SelectionToolSettingsView() 8 | { 9 | InitializeComponent(); 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /src/Draw2D/Views/Tools/SelectionToolView.axaml.cs: -------------------------------------------------------------------------------- 1 | using Avalonia.Controls; 2 | 3 | namespace Draw2D.Views.Tools; 4 | 5 | public partial class SelectionToolView : UserControl 6 | { 7 | public SelectionToolView() 8 | { 9 | InitializeComponent(); 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /src/Draw2D/Views/Tools/TextToolSettingsView.axaml.cs: -------------------------------------------------------------------------------- 1 | using Avalonia.Controls; 2 | 3 | namespace Draw2D.Views.Tools; 4 | 5 | public partial class TextToolSettingsView : UserControl 6 | { 7 | public TextToolSettingsView() 8 | { 9 | InitializeComponent(); 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /src/Draw2D/Views/Tools/TextToolView.axaml.cs: -------------------------------------------------------------------------------- 1 | using Avalonia.Controls; 2 | 3 | namespace Draw2D.Views.Tools; 4 | 5 | public partial class TextToolView : UserControl 6 | { 7 | public TextToolView() 8 | { 9 | InitializeComponent(); 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /src/Draw2D/Zoom/Input/FitMode.cs: -------------------------------------------------------------------------------- 1 |  2 | namespace Core2D.UI.Zoom.Input; 3 | 4 | public enum FitMode 5 | { 6 | None, 7 | Reset, 8 | Center, 9 | Fill, 10 | Uniform, 11 | UniformToFill 12 | } -------------------------------------------------------------------------------- /src/Draw2D/Zoom/Input/IDrawTarget.cs: -------------------------------------------------------------------------------- 1 |  2 | namespace Core2D.UI.Zoom.Input; 3 | 4 | public interface IDrawTarget 5 | { 6 | IInputService InputService { get; set; } 7 | IZoomService ZoomService { get; set; } 8 | void Draw(object context, double width, double height, double dx, double dy, double zx, double zy, double renderScaling); 9 | } -------------------------------------------------------------------------------- /src/Draw2D/Zoom/Input/IInputService.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace Core2D.UI.Zoom.Input; 4 | 5 | public interface IInputService 6 | { 7 | Action Capture { get; set; } 8 | Action Release { get; set; } 9 | Func IsCaptured { get; set; } 10 | Action Redraw { get; set; } 11 | } -------------------------------------------------------------------------------- /src/Draw2D/Zoom/Input/IInputTarget.cs: -------------------------------------------------------------------------------- 1 |  2 | namespace Core2D.UI.Zoom.Input; 3 | 4 | public interface IInputTarget 5 | { 6 | void LeftDown(double x, double y, Modifier modifier); 7 | void LeftUp(double x, double y, Modifier modifier); 8 | void RightDown(double x, double y, Modifier modifier); 9 | void RightUp(double x, double y, Modifier modifier); 10 | void Move(double x, double y, Modifier modifier); 11 | double GetWidth(); 12 | double GetHeight(); 13 | } -------------------------------------------------------------------------------- /src/Draw2D/Zoom/Input/IZoomServiceState.cs: -------------------------------------------------------------------------------- 1 |  2 | namespace Core2D.UI.Zoom.Input; 3 | 4 | public interface IZoomServiceState 5 | { 6 | double ZoomSpeed { get; set; } 7 | double ZoomX { get; set; } 8 | double ZoomY { get; set; } 9 | double OffsetX { get; set; } 10 | double OffsetY { get; set; } 11 | bool IsPanning { get; set; } 12 | bool IsZooming { get; set; } 13 | FitMode InitFitMode { get; set; } 14 | FitMode AutoFitMode { get; set; } 15 | } -------------------------------------------------------------------------------- /src/Draw2D/Zoom/Input/Modifier.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace Core2D.UI.Zoom.Input; 4 | 5 | [Flags] 6 | public enum Modifier 7 | { 8 | None = 0, 9 | Alt = 1, 10 | Control = 2, 11 | Shift = 4 12 | } --------------------------------------------------------------------------------