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

**URL:** <https://discourse.processing.org/t/possible-to-have-size-smaller-than-full-screen-positioned-top-left/941>\
**Category:** Processing\
**Created:** [June 14, 2018, 2:08am UTC](https://discourse.processing.org/t/possible-to-have-size-smaller-than-full-screen-positioned-top-left/941 "2018-06-14T02:08:31Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Grow](https://avatars.discourse-cdn.com/v4/letter/g/e56c9b/32.png) [@Grow](https://discourse.processing.org/u/Grow)\
**Post date:** [June 14, 2018, 2:08am UTC](https://discourse.processing.org/t/possible-to-have-size-smaller-than-full-screen-positioned-top-left/941/1 "2018-06-14T02:08:32Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![Grimtin10](https://avatars.discourse-cdn.com/v4/letter/g/e47c2d/32.png) [@Grimtin10](https://discourse.processing.org/u/Grimtin10)\
**Post date:** [June 14, 2018, 7:58am UTC](https://discourse.processing.org/t/possible-to-have-size-smaller-than-full-screen-positioned-top-left/941/2 "2018-06-14T07:58:55Z")

</div>

Use surface.setLocation(0,0).

---

<div class="post-metadata">

**Author:** ![Grow](https://avatars.discourse-cdn.com/v4/letter/g/e56c9b/32.png) [@Grow](https://discourse.processing.org/u/Grow)\
**Post date:** [June 14, 2018, 2:10pm UTC](https://discourse.processing.org/t/possible-to-have-size-smaller-than-full-screen-positioned-top-left/941/3 "2018-06-14T14:10:20Z")

</div>

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.

![Move%20to%200%200](https://canada1.discourse-cdn.com/flex036/uploads/processingfoundation1/original/1X/ce88f2db45ca667067b32e38eb5045dd2d017f5b.png)

---

<div class="post-metadata">

**Author:** ![kfrajer](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/kfrajer/32/196_2.png) [@kfrajer](https://discourse.processing.org/u/kfrajer)\
**Post date:** [June 15, 2018, 12:33am UTC](https://discourse.processing.org/t/possible-to-have-size-smaller-than-full-screen-positioned-top-left/941/4 "2018-06-15T00:33:01Z")

</div>

Check this post:

> [Processing 3: init() disappearance - Processing 2.x and 3.x Forum](https://forum.processing.org/two/discussion/12260/processing-3-init-disappearance)

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

> [@Grow](#):
>
> There is still extra window space too.

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?

Kf

```java
//===========================================================================
// IMPORTS:
import processing.awt.PSurfaceAWT;

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

void setup() {

  PSurfaceAWT awtSurface = (PSurfaceAWT)surface;
  PSurfaceAWT.SmoothCanvas smoothCanvas = (PSurfaceAWT.SmoothCanvas)awtSurface.getNative();
  smoothCanvas.getFrame().setAlwaysOnTop(true);
  smoothCanvas.getFrame().removeNotify();
  smoothCanvas.getFrame().setUndecorated(true);
  //smoothCanvas.getFrame().setLocation(0, 0);
  smoothCanvas.getFrame().addNotify();

  textAlign(CENTER, CENTER);
  rectMode(CENTER);

  fill(255);
  strokeWeight(2);
}

void draw() {
  background(0);
}

```

---

<div class="post-metadata">

**Author:** ![Grow](https://avatars.discourse-cdn.com/v4/letter/g/e56c9b/32.png) [@Grow](https://discourse.processing.org/u/Grow)\
**Post date:** [June 15, 2018, 8:58pm UTC](https://discourse.processing.org/t/possible-to-have-size-smaller-than-full-screen-positioned-top-left/941/5 "2018-06-15T20:58:56Z")

</div>

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.
