예제 #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;
            }
        }
예제 #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);
        }
예제 #3
0
        public void AddTransitionCallback(ArcCallback method)
        {
            ArcCallbackInvoker aci = new ArcCallbackInvoker(method);

            _transitCallbacks.Add(aci);
        }
예제 #4
0
 public TransitionCallbackInvoker(ArcCallback <TState> callback)
 {
     Callback = callback;
 }
예제 #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);
        }
예제 #6
0
 public void AddTransitionCallback(ArcCallback method)
 {
     ArcCallbackInvoker aci = new ArcCallbackInvoker(method);
     _transitCallbacks.Add(aci);
 }
예제 #7
0
 public ArcCallbackInvoker(ArcCallback callback)
 {
     Callback = callback;
 }
예제 #8
0
 public ArcCallbackInvoker(ArcCallback callback)
 {
     Callback = callback;
 }