Added a post processing precision ratio
This commit is contained in:
@@ -14,6 +14,8 @@ namespace Paint_2
|
||||
{
|
||||
public class DotPencil : PaintTool
|
||||
{
|
||||
const int POST_PROCESSING_PRECISION = 3;
|
||||
|
||||
private List<List<Point>> _drawings;
|
||||
private List<List<Point>> _drawingsRedo;
|
||||
private List<Color> _colors;
|
||||
@@ -89,10 +91,13 @@ namespace Paint_2
|
||||
WidthsRedo = new List<int>();
|
||||
}
|
||||
public void Stop()
|
||||
{
|
||||
for (int i = 0;i<POST_PROCESSING_PRECISION;i++)
|
||||
{
|
||||
List<Point> Drawing = Drawings[Drawings.Count - 1];
|
||||
Drawings[Drawings.Count - 1] = PostProcessing(Drawing);
|
||||
}
|
||||
}
|
||||
private List<Point> PostProcessing(List<Point> Drawing)
|
||||
{
|
||||
//THIS SHOULD BE REMOVED, IT IS ONLY HERE TO BE EASIER TO DEBUG THE CONCEPT
|
||||
|
||||
@@ -14,6 +14,8 @@ namespace Paint_2
|
||||
{
|
||||
public class Pencil : PaintTool
|
||||
{
|
||||
const int POST_PROCESSING_PRECISION = 3;
|
||||
|
||||
private List<List<Point>> _drawings;
|
||||
private List<List<Point>> _drawingsRedo;
|
||||
private List<Color> _colors;
|
||||
@@ -90,10 +92,13 @@ namespace Paint_2
|
||||
WidthsRedo = new List<int>();
|
||||
}
|
||||
public void Stop()
|
||||
{
|
||||
for (int i = 0; i < POST_PROCESSING_PRECISION; i++)
|
||||
{
|
||||
List<Point> Drawing = Drawings[Drawings.Count - 1];
|
||||
Drawings[Drawings.Count - 1] = PostProcessing(Drawing);
|
||||
}
|
||||
}
|
||||
private List<Point> PostProcessing(List<Point> Drawing)
|
||||
{
|
||||
List<Point> NewDrawing = new List<Point>();
|
||||
|
||||
Reference in New Issue
Block a user