protected override Rectangle DrawShape(Rectangle rect, Layer l) { Rectangle dirty; using (Context g = new Context (l.Surface)) { g.AppendPath (PintaCore.Layers.SelectionPath); g.FillRule = FillRule.EvenOdd; g.Clip (); g.Antialias = Antialias.Subpixel; if (FillShape && StrokeShape) dirty = g.FillStrokedRoundedRectangle (rect, BrushWidth, fill_color, outline_color, BrushWidth); else if (FillShape) dirty = g.FillRoundedRectangle (rect, BrushWidth, outline_color); else dirty = g.DrawRoundedRectangle (rect, BrushWidth, outline_color, BrushWidth); } return dirty; }
protected override Rectangle DrawShape(Rectangle rect, Layer l) { Document doc = PintaCore.Workspace.ActiveDocument; Rectangle dirty; using (Context g = new Context (l.Surface)) { g.AppendPath (doc.SelectionPath); g.FillRule = FillRule.EvenOdd; g.Clip (); g.Antialias = UseAntialiasing ? Antialias.Subpixel : Antialias.None; if (FillShape && StrokeShape) dirty = g.FillStrokedRoundedRectangle (rect, Radius, fill_color, outline_color, BrushWidth); else if (FillShape) dirty = g.FillRoundedRectangle (rect, Radius, outline_color); else dirty = g.DrawRoundedRectangle (rect, Radius, outline_color, BrushWidth); } return dirty; }