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;
|
||||
@@ -90,8 +92,11 @@ namespace Paint_2
|
||||
}
|
||||
public void Stop()
|
||||
{
|
||||
List<Point> Drawing = Drawings[Drawings.Count - 1];
|
||||
Drawings[Drawings.Count - 1] = PostProcessing(Drawing);
|
||||
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)
|
||||
{
|
||||
|
||||
@@ -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;
|
||||
@@ -91,8 +93,11 @@ namespace Paint_2
|
||||
}
|
||||
public void Stop()
|
||||
{
|
||||
List<Point> Drawing = Drawings[Drawings.Count - 1];
|
||||
Drawings[Drawings.Count - 1] = PostProcessing(Drawing);
|
||||
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)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user