Skip to content

Adding a note about the related get_pixels() methods on the copy() documentation pages #138

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions reference/py5graphics_copy.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ This function ignores [](py5graphics_image_mode).

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).

If you want to create a new image with the contents of a rectangular region of a `Py5Graphics` object, check out the [`.get_pixels(x, y, w, h)`](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`.

Underlying Processing method: PGraphics.copy

## Signatures
Expand Down
2 changes: 2 additions & 0 deletions reference/py5image_copy.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,8 @@ Copies a region of pixels from one image into another. If the source and destina

This function ignores [](sketch_image_mode).

If you want to create a new image with the contents of a rectangular region of a `Py5Image` object, check out the [`.get_pixels(x, y, w, h)`](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`.

Underlying Processing method: [PImage.copy](https://processing.org/reference/PImage_copy_.html)

## Signatures
Expand Down
2 changes: 2 additions & 0 deletions reference/sketch_copy.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@ Copies a region of pixels from the display window to another area of the display

This function ignores [](sketch_image_mode).

If you want to create a new image with the contents of a rectangular region of the screen, check out [`get_pixels(x, y, w, h)`](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.

Underlying Processing method: [copy](https://processing.org/reference/copy_.html)

## Signatures
Expand Down