Skip to content

Commit b625969

Browse files
committed
Merge pull request processing#1717 from ybakos/p5_web_45_examples_HandbookExtensionsMobile_ex01
Examples patch (1 of 9)
2 parents c0c07cb + e3595d4 commit b625969

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

  • java/examples/Books/Processing Handbook/Extensions/Mobile/Ex_01

java/examples/Books/Processing Handbook/Extensions/Mobile/Ex_01/Ex_01.pde

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,6 @@ PImage img = loadImage("sprite.png");
55
// The coordinates (0, 0) refer to the top-left corder of the screen
66
image(img, 0, 0);
77
// The following coordinate calculations will center the image in the screen
8-
image(img, (width img.width) / 2, (height img.height) / 2);
8+
image(img, (width - img.width) / 2, (height - img.height) / 2);
99
// Finally, the next line will position the image in the bottom-right corner
10-
image(img, width img.width, height img.height);
10+
image(img, width - img.width, height - img.height);

0 commit comments

Comments
 (0)