/// <summary> /// Merges partial styles. /// </summary> public static void Merge(PartialFontStyle style1, PartialFontStyle style2, float weight, out IFill fill, out Pen pen) { if (style1 == null && style2 == null) { fill = null; pen = null; return; } if (style2 != null && style1 == null) { Merge(style2, style1, 1.0f - weight, out fill, out pen); return; } if (style2 == null) { fill = style1.Fill; pen = style1.Pen; return; } fill = BlendedFill.BlendFills(style1.Fill, style2.Fill, weight); pen = Pen.BlendPens(style1.Pen, style2.Pen, weight); return; }
public ISubStyle Clone() { PartialFontStyle style = new PartialFontStyle(); style.Parent = parent; style.Pen = pen; style.Fill = fill; return(style); }