Exemplo n.º 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);
        }
Exemplo n.º 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);
        }
Exemplo n.º 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);
            }
        }
Exemplo n.º 4
0
 public override void Update(RenderingEngine e, DrawableBase parent, DrawableBase previous)
 {
     base.Update(e, parent, previous);
     Translation = GetTranslation(parent);
 }
Exemplo n.º 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);
        }
Exemplo n.º 6
0
 public virtual void Draw(Graphics g, RenderingEngine e, DrawableBase parent)
 {
 }
Exemplo n.º 7
0
 public virtual void UpdateMouseUp(RenderingEngine e, DrawableBase parent, DrawableBase previous)
 {
 }
Exemplo n.º 8
0
 public virtual void UpdateMouseService(RenderingEngine e)
 {
     IsMouseOver = e.MouseService.IsOver(this, Translation);
 }
Exemplo n.º 9
0
 public virtual void Update(RenderingEngine e, DrawableBase parent, DrawableBase previous)
 {
     Translation = new PointF(Position.X, Position.Y);
 }