Wc.CompositionGeometry GetCompositionGeometry(Wd.CompositionGeometry obj) { switch (obj.Type) { case Wd.CompositionObjectType.CompositionPathGeometry: return(GetCompositionPathGeometry((Wd.CompositionPathGeometry)obj)); case Wd.CompositionObjectType.CompositionEllipseGeometry: return(GetCompositionEllipseGeometry((Wd.CompositionEllipseGeometry)obj)); case Wd.CompositionObjectType.CompositionRectangleGeometry: return(GetCompositionRectangleGeometry((Wd.CompositionRectangleGeometry)obj)); case Wd.CompositionObjectType.CompositionRoundedRectangleGeometry: return(GetCompositionRoundedRectangleGeometry((Wd.CompositionRoundedRectangleGeometry)obj)); default: throw new InvalidOperationException(); } }
T CacheAndInitializeCompositionGeometry <T>(Wd.CompositionGeometry source, T target) where T : Wc.CompositionGeometry { CacheAndInitializeCompositionObject(source, target); if (source.TrimStart != 0) { target.TrimStart = source.TrimStart; } if (source.TrimEnd != 1) { target.TrimEnd = source.TrimEnd; } if (source.TrimOffset != 0) { target.TrimOffset = source.TrimOffset; } return(target); }