Way to scale canvas to fit on monitor?

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!

Hi @i-draw-monkeys,

you can do s.th. like this …

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

2 Likes