# Way to scale canvas to fit on monitor?

**URL:** <https://discourse.processing.org/t/way-to-scale-canvas-to-fit-on-monitor/39656>\
**Category:** Beginners\
**Created:** [November 10, 2022, 12:34pm UTC](https://discourse.processing.org/t/way-to-scale-canvas-to-fit-on-monitor/39656 "2022-11-10T12:34:57Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![i-draw-monkeys](https://avatars.discourse-cdn.com/v4/letter/i/c6cbf5/32.png) [@i-draw-monkeys](https://discourse.processing.org/u/i-draw-monkeys)\
**Post date:** [November 10, 2022, 12:34pm UTC](https://discourse.processing.org/t/way-to-scale-canvas-to-fit-on-monitor/39656/1 "2022-11-10T12:34:57Z")

</div>

I am making very large sketches at the moment. The current one is 1900 x 2800.

Despite my large monitor, the canvas doesn’t fit. I don’t see the entire image until after I have saved it as an SVG and throw it into Inkscape where I can zoom out. Is there anyway to have the canvas/sketch window display at 50% of the size so I can see the whole thing?

Is there a workaround that doesn’t involve simply making a smaller canvas?

Thanks!

---

<div class="post-metadata">

**Author:** ![mnse](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/mnse/32/16520_2.png) [@mnse](https://discourse.processing.org/u/mnse)\
**Post date:** [November 10, 2022, 12:58pm UTC](https://discourse.processing.org/t/way-to-scale-canvas-to-fit-on-monitor/39656/2 "2022-11-10T12:58:08Z")

</div>

Hi @i-draw-monkeys,

you can do s.th. like this …

```auto
int gWidth = 2800;
int gHeight = 1900;

PGraphics g;

void setup() {
  size(960,540,P2D);
  // create for full size
  g = createGraphics(gWidth, gHeight, P2D);
}

void draw() {
  // paint for full size
  g.beginDraw();
  g.background(0);
  g.fill(0, 255, 0);
  g.stroke(255, 0, 0);
  g.strokeWeight(20);
  g.pushMatrix();
  g.translate(gWidth/2, gHeight/2);  
  g.ellipse(0, 0, gWidth/2-20, gHeight/2-20);
  g.popMatrix();  
  g.endDraw();

  // display scaled
  image(g, 0, 0, width, height);
}

```

Cheers  
— mnse
