File tree Expand file tree Collapse file tree 1 file changed +20
-22
lines changed Expand file tree Collapse file tree 1 file changed +20
-22
lines changed Original file line number Diff line number Diff line change @@ -854,6 +854,26 @@ function loadingDisplaying(p5, fn){
854
854
* destination image's top left corner. See
855
855
* <a href="#/p5/imageMode">imageMode()</a> for other ways to position images.
856
856
*
857
+ * ```js, example
858
+ * let img;
859
+ *
860
+ * // Load the image.
861
+ * function preload() {
862
+ * img = loadImage('assets/laDefense.jpg');
863
+ * }
864
+ *
865
+ * function setup() {
866
+ * createCanvas(100, 100);
867
+ *
868
+ * background(50);
869
+ *
870
+ * // Draw the image.
871
+ * image(img, 0, 0);
872
+ *
873
+ * describe('An image of the underside of a white umbrella with a gridded ceiling above.');
874
+ * }
875
+ * ```
876
+ *
857
877
* Here's a diagram that explains how optional parameters work in `image()`:
858
878
*
859
879
* <img src="assets/drawImage.png"></img>
@@ -907,28 +927,6 @@ function loadingDisplaying(p5, fn){
907
927
* background(50);
908
928
*
909
929
* // Draw the image.
910
- * image(img, 0, 0);
911
- *
912
- * describe('An image of the underside of a white umbrella with a gridded ceiling above.');
913
- * }
914
- * </code>
915
- * </div>
916
- *
917
- * <div>
918
- * <code>
919
- * let img;
920
- *
921
- * // Load the image.
922
- * function preload() {
923
- * img = loadImage('assets/laDefense.jpg');
924
- * }
925
- *
926
- * function setup() {
927
- * createCanvas(100, 100);
928
- *
929
- * background(50);
930
- *
931
- * // Draw the image.
932
930
* image(img, 10, 10);
933
931
*
934
932
* describe('An image of the underside of a white umbrella with a gridded ceiling above. The image has dark gray borders on its left and top.');
You can’t perform that action at this time.
0 commit comments