Android Question help with passing shape/bmp from sub

Pflichtfeld

Active Member
Licensed User
As I am new here, I am struggling how to layout my code:

I have to draw a figure with a path (polygon), add optional lines within the figure, add optional text, add optional arcs. This figure I need differently drawn but with the same basics.
I drew it once for testing purpose into an imageview and it works well, but I need it in different situations.

So my imagination is something like: draw that stuff in a sub with the requested features and return this stuff (as bmp? as canvas) for further use (scaling, rotating, placing in a view).

What would you do, to accomplish this?

Thank you in advance!
Thomas
 

William Lancee

Well-Known Member
Licensed User
Longtime User
Create a B4XPanel, use B4XCanvas to draw your basic figure on the Panel. The panel can be returned from subs and send to subs, for further processing.
After everything is ready, you can convert to a bitmap (for ImageViews and communication).
 
Upvote 0

Pflichtfeld

Active Member
Licensed User
Create a B4XPanel, use B4XCanvas to draw your basic figure on the Panel. The panel can be returned from subs and send to subs, for further processing.
After everything is ready, you can convert to a bitmap (for ImageViews and communication).
That sounds good! Just the way I imagine it could be.
Have to work it out and will come back, if I cannot cope with it.
Thank you William!

TH
 
Upvote 0
Top