I have a custom view (inherits from View) that overrides OnDraw. In this override, I make multiple calls to DrawPath, similar to the following:
canvas.DrawPath(PathParser.CreatePathFromPathData($"M0 {y}H{this.Bids.Count - 1}"), linepaint);
However, because my values for the path data are relatively small, I want to clip the Canvas to the area containing my values, and then have it stretched in the designer. Intellisense claims there is a method named SetViewport, but that causes the Designer to give a java.lang.NoSuchMethodError (which seems correct, since I could not find any documentation for SetViewport, so I don't know why intellisense lists it). If I create a VectorDrawable resource with the appropriate viewportWidth & viewportHeight, it does what I want, but because I need to dynamically determine the path, using a static a VectorDrawable resource will not work. How can I use OnDraw (or some other method, I don't care if I create a custom view or do it some other way) to use path data with dynamic values and be able to stretch it?