Added a post processing precision ratio
This commit is contained in:
@@ -14,6 +14,8 @@ namespace Paint_2
|
|||||||
{
|
{
|
||||||
public class DotPencil : PaintTool
|
public class DotPencil : PaintTool
|
||||||
{
|
{
|
||||||
|
const int POST_PROCESSING_PRECISION = 3;
|
||||||
|
|
||||||
private List<List<Point>> _drawings;
|
private List<List<Point>> _drawings;
|
||||||
private List<List<Point>> _drawingsRedo;
|
private List<List<Point>> _drawingsRedo;
|
||||||
private List<Color> _colors;
|
private List<Color> _colors;
|
||||||
@@ -90,8 +92,11 @@ namespace Paint_2
|
|||||||
}
|
}
|
||||||
public void Stop()
|
public void Stop()
|
||||||
{
|
{
|
||||||
List<Point> Drawing = Drawings[Drawings.Count - 1];
|
for (int i = 0;i<POST_PROCESSING_PRECISION;i++)
|
||||||
Drawings[Drawings.Count - 1] = PostProcessing(Drawing);
|
{
|
||||||
|
List<Point> Drawing = Drawings[Drawings.Count - 1];
|
||||||
|
Drawings[Drawings.Count - 1] = PostProcessing(Drawing);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
private List<Point> PostProcessing(List<Point> Drawing)
|
private List<Point> PostProcessing(List<Point> Drawing)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -14,6 +14,8 @@ namespace Paint_2
|
|||||||
{
|
{
|
||||||
public class Pencil : PaintTool
|
public class Pencil : PaintTool
|
||||||
{
|
{
|
||||||
|
const int POST_PROCESSING_PRECISION = 3;
|
||||||
|
|
||||||
private List<List<Point>> _drawings;
|
private List<List<Point>> _drawings;
|
||||||
private List<List<Point>> _drawingsRedo;
|
private List<List<Point>> _drawingsRedo;
|
||||||
private List<Color> _colors;
|
private List<Color> _colors;
|
||||||
@@ -91,8 +93,11 @@ namespace Paint_2
|
|||||||
}
|
}
|
||||||
public void Stop()
|
public void Stop()
|
||||||
{
|
{
|
||||||
List<Point> Drawing = Drawings[Drawings.Count - 1];
|
for (int i = 0; i < POST_PROCESSING_PRECISION; i++)
|
||||||
Drawings[Drawings.Count - 1] = PostProcessing(Drawing);
|
{
|
||||||
|
List<Point> Drawing = Drawings[Drawings.Count - 1];
|
||||||
|
Drawings[Drawings.Count - 1] = PostProcessing(Drawing);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
private List<Point> PostProcessing(List<Point> Drawing)
|
private List<Point> PostProcessing(List<Point> Drawing)
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user