processing icon indicating copy to clipboard operation
processing copied to clipboard

Implement PGraphicsOpenGL.getMatrix(PMatrix2D) (Issue #5063)

Open Romejanic opened this issue 5 years ago • 1 comments

Hey there,

I implemented a currently unimplemented feature which is to store the current modelview matrix of a P2D sketch into a PMatrix2D object, so that it could be used elsewhere or applied later through applyMatrix().

Test code:

size(200,200,P2D);

translate(50,75);
rotate(0.2);
scale(random(0.5f,2f));
printMatrix();

PMatrix2D matrix = new PMatrix2D();
getMatrix(matrix);
matrix.print();

resetMatrix();
fill(255,0,0);
rect(50,50,50,50);

applyMatrix(matrix);
rect(50,50,50,50);

Romejanic avatar Mar 21 '19 15:03 Romejanic

Looks like this is never gonna be acknowledged lol

Romejanic avatar Feb 24 '20 07:02 Romejanic