38 lines
904 B
C#
38 lines
904 B
C#
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 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;
|
|
}
|
|
} |