Showing
1 changed file
with
33 additions
and
0 deletions
FigStart.cs
0 → 100644
| 1 | +using System; | ||
| 2 | +using System.Collections.Generic; | ||
| 3 | +using System.Drawing; | ||
| 4 | +using System.Linq; | ||
| 5 | +using System.Text; | ||
| 6 | +using System.Threading.Tasks; | ||
| 7 | + | ||
| 8 | +namespace flowchart | ||
| 9 | +{ | ||
| 10 | + // 프로세스 원을 그리는 클래스(FigureBase를 상속) | ||
| 11 | + // Draw 함수에서 원을 그린다. | ||
| 12 | + class FigStart : FigBase | ||
| 13 | + { | ||
| 14 | + // 생성자도 상속해서 사용. | ||
| 15 | + public FigStart(Point location, Size size) : base(location, size) | ||
| 16 | + { | ||
| 17 | + | ||
| 18 | + } | ||
| 19 | + | ||
| 20 | + public override void Draw(Graphics g) | ||
| 21 | + { | ||
| 22 | + using (Pen pen = new Pen(Color.Red, 1)) | ||
| 23 | + { | ||
| 24 | + System.Drawing.Rectangle rect = new System.Drawing.Rectangle(this.Location, this.Size); | ||
| 25 | + g.DrawEllipse(pen, rect); // 원을 그리는 함수 | ||
| 26 | + | ||
| 27 | + | ||
| 28 | + } | ||
| 29 | + | ||
| 30 | + base.Draw(g); | ||
| 31 | + } | ||
| 32 | + } | ||
| 33 | +} |
-
Please register or login to post a comment