From b59b3d2d9e027af6b547d2fd32c87b4b69f7e253 Mon Sep 17 00:00:00 2001 From: JC <20929510+UnfinishedStuff@users.noreply.github.com> Date: Wed, 27 Jan 2021 20:26:03 +0000 Subject: [PATCH] Added clip image to MicroPython pico_display docs Updated the text and added clip.jpg to the MicroPython Pico Display docs to help communicate the use of clips. --- micropython/modules/pico_display/README.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/micropython/modules/pico_display/README.md b/micropython/modules/pico_display/README.md index d80bc2df..c2e73790 100644 --- a/micropython/modules/pico_display/README.md +++ b/micropython/modules/pico_display/README.md @@ -176,12 +176,14 @@ picodisplay.text(string,x,y,wrap, scale) ### set_clip -This function defines a rectangular area outside which no drawing actions will take effect. If a drawing action crosses the boundary of the clip then only the pixels inside the clip will be drawn. Note that `clip` does not remove pixels which have already been drawn, it only prevents new pixels being drawn outside the described area. Only one clip can be active at a time, and defining a new clip replaces any previous clips. The `x` and `y` parameters describe the upper-left corner of the clip area, `w` and `h` describe the width and height in pixels. +This function defines a rectangular area outside which no drawing actions will take effect. If a drawing action crosses the boundary of the clip then only the pixels inside the clip will be drawn. Note that `clip` does not remove pixels which have already been drawn, it only prevents new pixels being drawn outside the described area. A more visual description of the function of clips can be found below. Only one clip can be active at a time, and defining a new clip replaces any previous clips. The `x` and `y` parameters describe the upper-left corner of the clip area, `w` and `h` describe the width and height in pixels. ```python picodisplay.set_clip(x,y,w,h) ``` +![A diagram explaining clips](/micropython/modules/pico_display/clip.jpg) + ### remove_clip This function removes any currently implemented clip.