public PathShape ToStrokePathShape(IToolContext context, IBaseShape shape) { using (var geometry = ToPath(context, shape)) { if (geometry != null) { var style = context.DocumentContainer?.StyleLibrary?.Get(shape.StyleId); if (style == null) { style = context.DocumentContainer?.StyleLibrary?.CurrentItem; } using (var disposable = new CompositeDisposable()) { var path = SkiaUtil.ToStrokePath(context, style.StrokePaint, shape.Effects, geometry, disposable.Disposables); if (path != null) { disposable.Disposables.Add(path); var union = SkiaUtil.Op(SKPathOp.Union, new[] { path, path }); if (union != null && !union.IsEmpty) { disposable.Disposables.Add(union); return(SkiaUtil.ToPathShape(context, union, context.DocumentContainer?.StyleLibrary?.CurrentItem, context?.DocumentContainer?.PointTemplate)); } } } } } return(null); }