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