Exemple #1
0
        public void EnumerateSegments(LineCallback lc, ArcCallback ac, BezierCallback bc)
        {
            double penx = 0.0, peny = 0.0;

            foreach (GFXPathMoveTo mt in PathPoints)
            {
                if (mt is GFXPathBezierTo)
                {
                    var bez = mt as GFXPathBezierTo;
                    bc(penx, peny, bez.XC1, bez.YC1, bez.XC2, bez.YC2, bez.X, bez.Y);
                }
                else if (mt is GFXPathArcTo)
                {
                    var arc = mt as GFXPathArcTo;
                    ac(penx, peny, arc.X, arc.Y, arc.Bulge);
                }
                else if (mt is GFXPathLineTo)
                {
                    lc(penx, peny, mt.X, mt.Y);
                }

                penx = mt.X;
                peny = mt.Y;
            }
        }
Exemple #2
0
        public void AddTransitArcCallback(string target, ArcCallback method)
        {
            if (!_arcsMap.ContainsKey(target))
            {
                throw new StateMachineException(ErrorCodes.UnknownArc, StateMachineException.MakeArcName(Name, target));
            }

            Arc a = _arcsMap[target];

            a.AddTransitionCallback(method);
        }
Exemple #3
0
        public void AddTransitionCallback(ArcCallback method)
        {
            ArcCallbackInvoker aci = new ArcCallbackInvoker(method);

            _transitCallbacks.Add(aci);
        }
Exemple #4
0
 public TransitionCallbackInvoker(ArcCallback <TState> callback)
 {
     Callback = callback;
 }
Exemple #5
0
        public void AddTransitArcCallback(string target, ArcCallback method)
        {
            if (!_arcsMap.ContainsKey(target))
            {
                throw new StateMachineException(ErrorCodes.UnknownArc, StateMachineException.MakeArcName(Name, target));
            }

            Arc a = _arcsMap[target];

            a.AddTransitionCallback(method);
        }
Exemple #6
0
 public void AddTransitionCallback(ArcCallback method)
 {
     ArcCallbackInvoker aci = new ArcCallbackInvoker(method);
     _transitCallbacks.Add(aci);
 }
 public ArcCallbackInvoker(ArcCallback callback)
 {
     Callback = callback;
 }
 public ArcCallbackInvoker(ArcCallback callback)
 {
     Callback = callback;
 }