Beispiel #1
0
        public override void Clear(Graphics g)
        {
            int x, y, w, h;

            x = Location.X; y = Location.Y;
            w = Size.Width; h = Size.Height;

            g.TranslateTransform(x, y);
            g.RotateTransform(Angle);

            Pen pen = new Pen(Settings.Default.CircuitBackColor);

            g.DrawEllipse(
                pen,
                new Rectangle(0, 0, w, h));

            g.FillEllipse(new SolidBrush(Settings.Default.CircuitBackColor),
                          new Rectangle(2, 2, w - 4, h - 4));
            g.DrawLine(pen,
                       new Point(-10, 15), new Point(0, 15));
            input.Clear(g);

            g.RotateTransform(-Angle);
            g.TranslateTransform(-x, -y);

            base.Clear(g);
        }
Beispiel #2
0
        public override void Clear(Graphics g)
        {
            int x, y, w, h;

            w    = 30; h = 30;
            x    = Location.X; y = Location.Y;
            Size = new Size(w, h);
            g.TranslateTransform(x, y);
            g.RotateTransform(Angle);

            Pen pen = new Pen(Settings.Default.CircuitBackColor);

            g.DrawRectangle(pen, new Rectangle(0, 0, w, h));
            g.FillEllipse(new SolidBrush(Settings.Default.CircuitBackColor), new Rectangle(2, 2, w - 4, h - 4));
            g.DrawLine(pen, new Point(w, h / 2), new Point(w + 10, h / 2));
            output.Clear(g);
            if (Selected)
            {
                g.DrawRectangle(pen, new Rectangle(0, 0, Size.Width, Size.Height));
            }

            g.RotateTransform(-Angle);
            g.TranslateTransform(-x, -y);

            base.Clear(g);
        }