Quantcast
Channel: Library Questions - Processing 2.x and 3.x Forum
Viewing all articles
Browse latest Browse all 2896

Centering video in fullscreen()? overriding aspect ratio?

$
0
0

I'd like to take a capture and center it within any fullscreen() condition, such as different output devices and always have it be centered, both vertically and horizontally.

Also, can I override the caputre device's aspect ratio/resolution?

Here is the code below:

import processing.video.*;

int cellSize = 5;
int cols, rows;
Capture video;

void setup() {
  fullScreen();
  frameRate(10);
  cols = 1280 / cellSize;
  rows = 960 / cellSize;
  colorMode(RGB, 255, 255, 255, 100);
  video = new Capture(this, 1280, 960);
  video.start();  
  background(0);
}

Viewing all articles
Browse latest Browse all 2896

Trending Articles