I have the requirement to build a sketch where the Frame is very width but have quite a compressed height, say for instance 1024×100 pixel dimension. However, any width or height less than 130pixel, do get a gray border.
For instance the following example:
size(100,100);
background(#FF00FF);
you will have a 15pixel gray border all around the purple area of the sketch, as attached example.
Is there any way to avoid this, please?
Found it.
The issue is originating in the
PAppletwhich every sketch extends, and the minimum windows height and width are hardcoded to value 128.The workaround I found was to continuously call
frame.setSize()in thedraw()method.Alternatively another solution could be to extend
PAppletmethods to overcome the hardcoding, but for me it worked very well the previously mentioned workaround.