B4J Question Canvas question

rspitzer

Active Member
I use the visual designer to layout a canvas object.
The default state of the canvas is white.
I place the canvas on the form that has a different background.
I then load an image onto the canvas, the image is a png file with transparency.
So I have then a canvas that has white areas for where the png file is transparent, against a different background.
Is there a way to set the default canvas to be transparent?

Or am I using the wrong object here?
 

rspitzer

Active Member
I will have to study - the videos on XUI usage and the booklets.
Unfortunately, not clear to me as how to use it, just drawing a simple rectangle is giving me null point errors, so something I am initializing is not quite right.
Thanks for the reference though.
 
Upvote 0

rspitzer

Active Member
Thanks for the response, I am still feeling my way around this, if I have a question, I will open a new thread that's a bit more specific.
 
Upvote 0

rspitzer

Active Member
I also spent a while or more working out canvas, etc. Eventually I got something working. See if this example I posted helps. It uses transparent views.
https://www.b4x.com/android/forum/threads/mark-and-count-items-on-an-image.115435/
I just wanted to take a moment to thank you for the response. You are a gentleman and a scholar. Luckily I figured out the issues I was having with the transparency. Your program is great, very nice. I am sure that there are people on this forum, who would look at the program and say they could do the same thing in like 10 lines - whatever, you documentation was outstanding. The main issue I had other than understanding - graphic, then XUI, then Canvas then etc. etc. etc. is that the visual designer makes you a bit lazy, it provides a lot of functionality in laying out the GUI for a program, so when I ran into the transparency - canvas issue, it threw me for a bit of a loop. It would probably be nice if the visual designer has in the future that added functionality. But be that as it may, learned quite a few new things here. Again thank you for the response, truly appreciated the time you took. Keep well.
 
Upvote 0
Top