prisonerjohn / processing-web

0 stars 0 forks source link

[CLOSED] PGraphic.mask(anotherPGraphic) not working correctly #108

Open prisonerjohn opened 10 years ago

prisonerjohn commented 10 years ago

Issue by mattg73 Monday Apr 29, 2013 at 17:48 GMT Originally opened as https://github.com/processing/processing-web/issues/108


The code below should(?) display a red circle moving over a black background but the red background is not masked.

Problem occurs in 2.0b8 on Windows7 with up to date graphics drivers.

This code has been reported as working on 1.5.1. on osX 10.8

//begin code

PGraphics maskGraphic; PGraphics displayGraphic;

void setup() { size(1000, 600, P2D); maskGraphic = createGraphics(1000, 600, P2D); displayGraphic = createGraphics(1000, 600, P2D); }

void draw() { background(0);

maskGraphic.beginDraw(); maskGraphic.background(0); maskGraphic.noStroke(); maskGraphic.fill(255); maskGraphic.ellipse(mouseX, mouseY, 300, 300); maskGraphic.endDraw();

displayGraphic.beginDraw(); displayGraphic.background(255, 0, 0);
displayGraphic.endDraw();

displayGraphic.mask(maskGraphic);

image(displayGraphic, 0, 0); }

prisonerjohn commented 10 years ago

Comment by REAS Tuesday Apr 30, 2013 at 07:47 GMT


This is a bug report for processing/processing, not processing/processing-web. Please report it there.

prisonerjohn commented 10 years ago

Comment by REAS Tuesday Apr 30, 2013 at 07:49 GMT


It looks like this is a repeat of processing/processing#1738