groundlaying functionality

This commit is contained in:
Ano-sys
2025-02-19 01:05:22 +01:00
commit 6971b05226
14 changed files with 495 additions and 0 deletions
+35
View File
@@ -0,0 +1,35 @@
using System.Collections.ObjectModel;
using Avalonia.Input;
using Avalonia.Media;
using CommunityToolkit.Mvvm.ComponentModel;
using CommunityToolkit.Mvvm.Input;
using SimpleDraw.Models;
namespace SimpleDraw.ViewModels;
public class ViewModelBase : ObservableObject
{
public ObservableCollection<ColorPickerButton>? ColorPalette { get; set; }
public IRelayCommand<PointerPressedEventArgs>? CanvasPointerPressedCommand { get; set; }
public IRelayCommand<PointerEventArgs>? CanvasPointerMovedCommand { get; set; }
public IRelayCommand<PointerReleasedEventArgs>? CanvasPointerReleasedCommand { get; set; }
public ObservableCollection<DrawingPoints> DrawingPoints { get; set; } = new();
public DrawingPoints? DrawingPoint { get; set; }
protected bool IsDrawing { get; set; }
private Brush _brush = new SolidColorBrush(new Color(a: 255, r: 0, g: 0, b: 0));
private double _brushThickness = 2.0;
protected Brush Brush
{
get => _brush;
set => SetProperty(ref _brush, value);
}
public double BrushThickness
{
get => _brushThickness;
set => SetProperty(ref _brushThickness, value);
}
}