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
+21
View File
@@ -0,0 +1,21 @@
using System.Collections.Generic;
using System.ComponentModel;
using Avalonia.Media;
using CommunityToolkit.Mvvm.ComponentModel;
using CommunityToolkit.Mvvm.Input;
namespace SimpleDraw.Models;
public class ColorPickerButton : ObservableObject
{
private SolidColorBrush _color;
public RelayCommand SelectColorCommand { get; set; }
public SolidColorBrush Color
{
get => _color;
set => _color = value;
}
// public event PropertyChangedEventHandler? PropertyChanged;
}
+47
View File
@@ -0,0 +1,47 @@
using System.Collections.ObjectModel;
using Avalonia;
using Avalonia.Media;
using CommunityToolkit.Mvvm.ComponentModel;
namespace SimpleDraw.Models;
public class DrawingPoints : ObservableObject
{
private ObservableCollection<Point> _drawingPoints = new ObservableCollection<Point>();
// private ObservableCollection<ObservableCollection<Point>> _drawingPointsList = new ObservableCollection<ObservableCollection<Point>>();
private Brush _brush;
private double _brushThickness;
public Brush Brush
{
get => _brush;
set => SetProperty(ref _brush, value);
}
public double BrushThickness
{
get => _brushThickness;
set => SetProperty(ref _brushThickness, value);
}
public ObservableCollection<Point> CurrentDrawingPoints
{
get => _drawingPoints;
set => SetProperty(ref _drawingPoints, value);
}
public DrawingPoints(Brush brush, double brushThickness)
{
Brush = brush;
BrushThickness = brushThickness;
}
/*
public ObservableCollection<ObservableCollection<Point>> DrawingPointsList
{
get => _drawingPointsList;
set => SetProperty(ref _drawingPointsList, value);
}
*/
}