B4J Question Filled Triangle: Which lib/ How to?

JeffT

Member
Licensed User
I want to draw a filled triangle.
DrawPath should do it
My layout has a 'Canvas', referenced as a canvas.
If I add
B4X:
Dim p1 as Path

I get an error telling me that Path doesn't exist, and I cant find a library I can include that makes the error go away.

I tried referencing my Canvas as a B4XView, but that loses me most of the drawing methods that a Canvas offers.
There is no option to reference it as a B4XCanvas , in the layout editor.. just canvas or B4Xview
I tried casting it in code:

B4X:
dim b4xc as B4XCanvas

b4xc.initialise(mycanvas)
But that blew up too.

I have searched here and google for 'which library contains Path for B4X' but cant get any results.


So:
How do I tell the system that this canvas is a B4XCanvas?
and /or
What lib do I include so that Dim p1 as Path will work?



SHould I always be using B4XCanvas instead of Canvas? (Working in B4J at the mo, but I actually want to develop for Android and Im developing what I hope is reusable code while I wait for a device to arrive)
 
Top