Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

Romejanic
Copy link

@Romejanic Romejanic commented Mar 21, 2019

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
Copy link
Author

Looks like this is never gonna be acknowledged lol

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant