I use the Einhugur plugin in a desktop app to take a Picture and stretch it using PictureEffectsRaw, but now I want to do the same in a Web app.
The code moves across and has only a couple of issues before it will compile (and hopefully work!):
RawBitmapConverter doesn’t seem to be available
Dim frontBitmap As RawBitmap
cubePicture = 'get the picture
frontBitmap = RawBitmapConverter.FromPicture(cubePicture) 'RawBitmapConverter does not exist
PolygonF.Draw(g) cannot handle WebGraphics
Dim frontFrame As PolygonF
frontFrame.Draw(g) 'cannot handle g as WebGraphics, only Graphics object
For the PolygonF.Draw(g), I would recommend creating a simple Method
Sub DrawPolyGonF(poly as PolygonF, g as WebGraphics)
// Use the PolygonF points here to feed into the WebGraphics DrawPolygon function
End sub
This should be very simple method. I do not know if I can conditionally put WebGraphics reference directly in the plugin. So making simple method like that in Xojo might be the best bet.
I just realized that there is a WebOnly flag, so maybe I can also make internal function for you that just works direction on WebGraphics. (I will report back)
First tests look good so you might have updated TypeLibF maybe as early as tonight, where the Draw PolygonF, RectF and LineF can draw into WebGraphics.