Beispiel #1
0
        public override void Draw(Graphics g, RenderingEngine e, DrawableBase parent, InputOutputBase previous)
        {
            var transform = g.Transform;

            g.TranslateTransform(Translation.X, Translation.Y);

            DrawInputOutput(g, e, parent, previous);

            g.Transform = transform;

            base.Draw(g, e, parent, previous);
        }
Beispiel #2
0
        public static GraphicsPath CalculatePath(RenderingEngine e, Graphics g, Pen pen, PointF p1, PointF p2)
        {
            var extX = CalculateExtensionX(p1, p2);
            var extY = CalculateExtensionY(p1, p2);
            var b1   = CalculateB1(p1, p2, extX, extY);
            var b2   = CalculateB2(p1, p2, extX, extY);

            GraphicsPath p = new GraphicsPath();

            p.AddBezier(p1, b1, b2, p2);
            return(p);
        }
Beispiel #3
0
        protected virtual void DrawInputOutput(Graphics g, RenderingEngine e, DrawableBase parent, InputOutputBase previous)
        {
            var r = Rectangle;

            if (Signature is ActionSignature)
            {
                DrawAction(g, e, parent, previous, r);
            }
            else
            {
                DrawData(g, e, parent, previous, r);
            }
        }
Beispiel #4
0
 public override void Update(RenderingEngine e, DrawableBase parent, DrawableBase previous)
 {
     base.Update(e, parent, previous);
     Translation = GetTranslation(parent);
 }
Beispiel #5
0
        public static void Draw(RenderingEngine e, Graphics g, Pen pen, PointF p1, PointF p2)
        {
            var p = CalculatePath(e, g, pen, p1, p2);

            Draw(e, g, pen, p, p1, p2);
        }
Beispiel #6
0
 public virtual void Draw(Graphics g, RenderingEngine e, DrawableBase parent)
 {
 }
Beispiel #7
0
 public virtual void UpdateMouseUp(RenderingEngine e, DrawableBase parent, DrawableBase previous)
 {
 }
Beispiel #8
0
 public virtual void UpdateMouseService(RenderingEngine e)
 {
     IsMouseOver = e.MouseService.IsOver(this, Translation);
 }
Beispiel #9
0
 public virtual void Update(RenderingEngine e, DrawableBase parent, DrawableBase previous)
 {
     Translation = new PointF(Position.X, Position.Y);
 }