示例#1
0
 public ArtboardSnapEngineContext(ArtboardSnapEngine engine, ArtboardSnapEngineContextParameters parameters)
 {
     Engine               = engine;
     Parameters           = parameters;
     SourceSnapPrimitives = new ReadOnlyCollection <ArtboardSnapSourcePrimitive>(Engine.GetSourcesInternal(Parameters.Element).SelectMany(snapSource => snapSource.GetSnapPrimitives(Parameters)).ToList());
     TargetSnapPrimitives = new ReadOnlyCollection <ArtboardSnapTargetPrimitive>(Engine.GetTargetsInternal(Parameters.Element).SelectMany(snapTarget => snapTarget.GetSnapPrimitives(Parameters)).ToList());
     DynamicTargets       = new ReadOnlyCollection <ArtboardSnapTargetPrimitive>(TargetSnapPrimitives.Where(p => p.IsFixed == false).ToList());
 }
 internal ArtboardSnapTargetCollection(ArtboardSnapEngine engine)
 {
     Engine = engine;
 }