MoraviaVenus Member Licensed User Longtime User Apr 30, 2015 #1 Hi all, please, is it possible to create an element in B4A, which will behave like window? I mean e.g. combination of two red panels covering each other, where the intersection will be transparent (or let's say cut out). Example is attached (over the picture with horse there is red panel with window). Thank you.
Hi all, please, is it possible to create an element in B4A, which will behave like window? I mean e.g. combination of two red panels covering each other, where the intersection will be transparent (or let's say cut out). Example is attached (over the picture with horse there is red panel with window). Thank you.
NJDude Expert Licensed User Longtime User Apr 30, 2015 #2 No need to be a panel, create a PNG with a "transparent" window. Upvote 0
MoraviaVenus Member Licensed User Longtime User May 1, 2015 #3 Good idea, but, unfortunately, I need to manage the size of the overall object (has to be size of screen) and the size of transparent window. Any other suggestions, please? Upvote 0
Good idea, but, unfortunately, I need to manage the size of the overall object (has to be size of screen) and the size of transparent window. Any other suggestions, please?
MoraviaVenus Member Licensed User Longtime User May 6, 2015 #4 In the meantime I implement dirty solution, that works for rectangle window. It is composed from four separate panels: More challenging will it be with rounded window Upvote 0
In the meantime I implement dirty solution, that works for rectangle window. It is composed from four separate panels: More challenging will it be with rounded window
MaFu Well-Known Member Licensed User Longtime User May 7, 2015 #5 Create a mutable bitmap with your needed dimensions. Use paint functions to draw a rect in the bitmap with your favorite color. Draw another smaller rect (or circle ) with full transparency. Now create a BitmapDrawable, initialize it with your bitmap and assign it to the panel background. The ABExtDrawing lib can help you with the paint functions. Upvote 0
Create a mutable bitmap with your needed dimensions. Use paint functions to draw a rect in the bitmap with your favorite color. Draw another smaller rect (or circle ) with full transparency. Now create a BitmapDrawable, initialize it with your bitmap and assign it to the panel background. The ABExtDrawing lib can help you with the paint functions.