public InsetsD GetInsets(INode node) { InsetsD result = InsetsD.Empty; foreach (ILabel label in node.Labels) { INodeInsetsProvider provider = label.LayoutParameter.Model.Lookup <INodeInsetsProvider>(); if (provider != null) { InsetsD insets = provider.GetInsets(node); result = result.CreateUnion(insets); } } return(result.CreateUnion(outerInsets)); }
public InsetsD GetInsets(INode item) { InsetsD result = InsetsD.Empty; if (innnerProvider != null) { result = innnerProvider.GetInsets(item); } foreach (ILabel label in item.Labels) { var provider = label.LayoutParameter.Model.Lookup <INodeInsetsProvider>(); if (provider != null) { InsetsD insets = provider.GetInsets(item); result = result.CreateUnion(insets); } } return(result); }