We are about to switch to a new forum software. Until then we have removed the registration on this forum.
Hi! I'm a beginner. I'm trying to create a circular shaped display window inside the main window so that I can generate graphics inside using controls from controlP5 library and graphics get cropped automatically in the circular shape. I got familiar with PGraphics but it only generates squared windows... is it possible to change the shape of the window? Or maybe you have a workaround for the same problem. Thank you in advance!
Answers
mask...?
https://www.processing.org/reference/PImage_mask_.html
Hopefully you don't mean for the frame of the window itself to be circular.
I actually meant that, what is absurd of having a circular display window?
I don't think that is even possible.
Have you ever seen one? If so, post a screenshot of it here.
It used to be possible and it may still well be possible to define the shape of the window, which allows for non-rectangular windows. It might still work for the Java2D (default renderer) but probably not for P2D and P3D which now uses OpenGL.
If you look at the links provided by PhiLho in this discussion you might get something to work.
I would expect the controlP5 controls will also be clipped to the new window shape.
@Ultramarine --
Just to make sure I understand -- do you mean that you want to use soft clipping / soft borders on the processing sketch window frame itself -- the thing that normally has minimize buttons, or scroll bars, etc? (as in the Swing / SWT examples):
Or that you want always circular content within the customary rectangular sketch window?