Skip to content

Commit 0e7af0c

Browse files
authored
Merge pull request #695 from villares/copy-pixels-docs
Adds notes about the related get_pixels() methods on the copy() methods documentation pages
2 parents b86a863 + b3f56d1 commit 0e7af0c

File tree

3 files changed

+6
-0
lines changed

3 files changed

+6
-0
lines changed

py5_docs/Reference/api_en/Py5Graphics_copy.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,3 +28,5 @@ Copies a region of pixels from the `Py5Graphics` object to another area of the c
2828
This function ignores [](py5graphics_image_mode).
2929

3030
This method is the same as [](sketch_copy) but linked to a `Py5Graphics` object. To see example code for how it can be used, see [](sketch_copy).
31+
32+
If you want to create a new image with the contents of a rectangular region of a `Py5Graphics` object, check out the [](py5graphics_get_pixels) method, where x, y, w, h, are the position and dimensions of the area to be copied. It will return a `Py5Image object`.

py5_docs/Reference/api_en/Py5Image_copy.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,8 @@ Copies a region of pixels from one image into another. If the source and destina
2727

2828
This function ignores [](sketch_image_mode).
2929

30+
If you want to create a new image with the contents of a rectangular region of a `Py5Image` object, check out the [](py5image_get_pixels) method, where x, y, w, h, are the position and dimensions of the area to be copied. It will return a `Py5Image object`.
31+
3032
@@ example
3133
image = Py5Image_copy_0.png
3234

py5_docs/Reference/api_en/Sketch_copy.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,8 @@ Copies a region of pixels from the display window to another area of the display
2727

2828
This function ignores [](sketch_image_mode).
2929

30+
If you want to create a new image with the contents of a rectangular region of the sketch, check out [](sketch_get_pixels) where x, y, w, h, are the position and dimensions of the area to be copied. It will return a `Py5Image` object.
31+
3032
@@ example
3133
image = Sketch_copy_0.png
3234

0 commit comments

Comments
 (0)