public (IComponent[], IAsset[]) Render(XdObjectJson xdObject, Obb obb, XdAssetHolder assetHolder) { var(imageComponent, assets) = ShapeObjectParser.RenderImage(xdObject, obb, assetHolder); IComponent scrollbar = new VerticalScrollbarComponent(imageComponent); if (xdObject.HasParameter("horizontal")) { scrollbar = new HorizontalScrollbarComponent(imageComponent); } return(new[] { scrollbar }, assets); }
public (IComponent[], IAsset[]) Render(XdObjectJson xdObject, XdAssetHolder assetHolder, IObbGetter obbGetter) { var obb = obbGetter.Get(xdObject); var clipPath = xdObject.Meta.Ux.ClipPathResources.Children[0]; if (SvgUtil.IsAlphaOnly(clipPath)) { return(new IComponent[] { }, new IAsset[] { }); } var(imageComponent, assets) = ShapeObjectParser.RenderImage(clipPath, obb, assetHolder); return(new IComponent[] { new MaskComponent(imageComponent.Sprite) }, assets); }