private void btnPencilStyle_Paint(object sender, PaintEventArgs e) { // Ask the style to draw itself on the button canvas. Button btn = (Button)sender; LineStyle stl = (LineStyle)btn.Tag; stl.Draw(e.Graphics, true, Color.Black); }
private void btn_Paint(object sender, PaintEventArgs e) { // Ask each and every preconfigured style to draw itself on its button's canvas. Button btn = (Button)sender; LineStyle stl = (LineStyle)btn.Tag; stl.Draw(e.Graphics, m_ToolType == DrawingToolType.Pencil, Color.Black); }