/// <summary> /// Run concrete drawing of instance. /// </summary> /// <param name="instance">The drawn instance.</param> private void concreteDrawing(DrawedInstance instance) { var drawer = Runtime.GetDrawer(instance.WrappedInstance); if (drawer != null) { drawer.Draw(instance); } }
/// <summary> /// Gets instance drawing. /// </summary> /// <param name="instance">The instance which drawing is requested.</param> /// <returns>Instance drawing.</returns> private DrawedInstance getDrawing(Instance instance) { DrawedInstance result; if (!_instanceDrawings.TryGetValue(instance, out result)) { var runtimeTypeDefinition = Runtime.GetTypeDefinition(instance); result = new DrawedInstance(runtimeTypeDefinition, instance, this); _instanceDrawings[instance] = result; _toDrawQueue.Enqueue(result); } return(result); }
/// <summary> /// Run general drawing of instance. /// </summary> /// <param name="instance">The instance.</param> private void generalDrawing(DrawedInstance instance) { _drawer(instance); }
/// <summary> /// Draws the specified item for given instance. /// </summary> /// <param name="instance">Instance which is represented by given drawing item</param> /// <param name="item">Item drawing.</param> internal void DrawItem(DrawedInstance instance, DiagramItemDefinition item) { Context.DrawItem(item); _displayedInstances.Add(instance.WrappedInstance); }