Possible to have size smaller than full screen positioned top left?

I have an led pixel matrix that is 180 W x 30 H. It is driven by a sending card from HDMI output from a computer. When the computer hooks up it sees the “pixel matrix” as a 1920 x 1080 screen even though it is only 180 x 30.

I want to set the size in my sketch to the size of the matrix so I can use the width and height parameters.

I also want the sketch to be full screen. If I set the size to size(180,30); then the display is in the middle of the virtual 1920 x 1080 screen and not on my matrix. The matrix starts on the upper left (0,0)

Can I keep the size 180 x 30 but have the canvas start at 0,0 of the monitor?

Thank you in advance.

Use surface.setLocation(0,0).

1 Like

Thank you, that put the window up at the top but I want the “canvas” to be at (0,0) Now the OS menu bar and the window menu bar are in the way. There is still extra window space too.

I attached an image. Is there a way to have the image start at (0,0)?

Thank you.


Check this post:


Try this code. It removes the menu bar (max,min buttons) of the sketch window.

I guess you can do this by adding a translation operation in your sketch before you draw anything. Are you familiar with this concept? Can you provide some code of what you have so far?


import processing.awt.PSurfaceAWT;

void settings() {
  size(400, 600);

void setup() {

  PSurfaceAWT awtSurface = (PSurfaceAWT)surface;
  PSurfaceAWT.SmoothCanvas smoothCanvas = (PSurfaceAWT.SmoothCanvas)awtSurface.getNative();
  //smoothCanvas.getFrame().setLocation(0, 0);

  textAlign(CENTER, CENTER);


void draw() {
1 Like

Thank you. That works for the menu bar and thank you for showing me the concept of translation operations. 2 of 3 problems solved.

I figured a way to solve the OS X menu bar, problem #3. The final installation will run on a Raspberry Pi or if necessary a Win 10 laptop. On both of those OS’s I can position the UI on the bottom of the screen and then position the 180 x 30 surface at the top left (0,0)

I am developing the code on a mac and wanted to simulate everything there first but now I realize that I can move the task bar in the other OS’s, unfortunately that cannot happen on OSX.