I am using a Bitmap object and it seemed to work until I used some .pngwith alpha layer to 0. Then I understood that there was an ambiguity in the dimensions definitions, which are obvious with a transparent layer.
The image is a file with a given dimension (say, for a square, an edge of size Fsize in pixels). Then the bitmap has another dimension, (shape), say Bitsize. Finally, the button has also another size (Butsize, specified by parameters widthand height).
If Bitsize << Butsize, then a square is drawn around the button, the image might be too small but everything seems fine. If Bitsize = Butsize, the image appears larger than the button (we can see the frame of the button being smaller than the image), with potential overlap between the images of different buttons. Buttons clickable area is within the frame, as expected.
I don't think Fsize affects anything.
I am wondering if this is an expected behaviour, but I doubt...
I am using a
Bitmap
object and it seemed to work until I used some.png
with alpha layer to 0. Then I understood that there was an ambiguity in the dimensions definitions, which are obvious with a transparent layer. The image is a file with a given dimension (say, for a square, an edge of size Fsize in pixels). Then the bitmap has another dimension, (shape
), say Bitsize. Finally, the button has also another size (Butsize, specified by parameterswidth
andheight
). If Bitsize << Butsize, then a square is drawn around the button, the image might be too small but everything seems fine. If Bitsize = Butsize, the image appears larger than the button (we can see the frame of the button being smaller than the image), with potential overlap between the images of different buttons. Buttons clickable area is within the frame, as expected. I don't think Fsize affects anything. I am wondering if this is an expected behaviour, but I doubt...Here is an example code: