Exemplo n.º 1
0
        public BitmapPixelChanges Draw(Coordinates startingCoords, Coordinates latestCords, Color color, int toolSize)
        {
            LineTool line = new LineTool();

            return(BitmapPixelChanges.FromSingleColoredArray(
                       line.CreateLine(startingCoords, latestCords, toolSize), color));
        }
Exemplo n.º 2
0
 public PenTool()
 {
     Cursor              = Cursors.Pen;
     ActionDisplay       = "Click and move to draw.";
     Tooltip             = "Standard brush. (B)";
     Toolbar             = new PenToolbar();
     toolSizeSetting     = Toolbar.GetSetting <SizeSetting>("ToolSize");
     pixelPerfectSetting = Toolbar.GetSetting <BoolSetting>("PixelPerfectEnabled");
     pixelPerfectSetting.ValueChanged += PixelPerfectSettingValueChanged;
     lineTool = new LineTool();
     ClearPreviewLayerOnEachIteration = false;
 }
Exemplo n.º 3
0
 public PenTool(BitmapManager bitmapManager)
 {
     Cursor              = Cursors.Pen;
     ActionDisplay       = "Click and move to draw.";
     Toolbar             = new PenToolbar();
     toolSizeSetting     = Toolbar.GetSetting <SizeSetting>("ToolSize");
     pixelPerfectSetting = Toolbar.GetSetting <BoolSetting>("PixelPerfectEnabled");
     pixelPerfectSetting.ValueChanged += PixelPerfectSettingValueChanged;
     ClearPreviewLayerOnEachIteration  = false;
     BitmapManager = bitmapManager;
     lineTool      = new LineTool();
 }
Exemplo n.º 4
0
 public PenTool(BitmapManager bitmapManager)
 {
     Cursor              = Cursors.Pen;
     ActionDisplay       = "Click and move to draw.";
     Toolbar             = new PenToolbar();
     toolSizeSetting     = Toolbar.GetSetting <SizeSetting>("ToolSize");
     pixelPerfectSetting = Toolbar.GetSetting <BoolSetting>("PixelPerfectEnabled");
     ClearPreviewLayerOnEachIteration = false;
     BitmapManager   = bitmapManager;
     paint.BlendMode = SKBlendMode.Src;
     Brushes.Add(new CircleBrush());
     Brush    = Brushes[0];
     lineTool = new LineTool
     {
         AutomaticallyResizeCanvas = AutomaticallyResizeCanvas
     };
 }