Created
November 26, 2019 00:43
-
-
Save sampottinger/36ca3e3c57f510380b8be597c95f1eb8 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
PGraphics pg; | |
void settings() { | |
size(100, 100, FX2D); | |
pixelDensity(2); | |
} | |
void setup() { | |
pg = createGraphics(40, 40); | |
println(displayDensity()); | |
} | |
void draw() { | |
pg.beginDraw(); | |
pg.background(100); | |
pg.stroke(255); | |
pg.line(20, 20, mouseX, mouseY); | |
pg.endDraw(); | |
image(pg, 9, 30); | |
image(pg, 51, 30); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment