# Edit/Transform rect() together with the video beneath it?

**URL:** <https://discourse.processing.org/t/edit-transform-rect-together-with-the-video-beneath-it/5990>\
**Category:** Coding Questions\
**Created:** [November 27, 2018, 10:56am UTC](https://discourse.processing.org/t/edit-transform-rect-together-with-the-video-beneath-it/5990 "2018-11-27T10:56:56Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![kratskcinnay](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/kratskcinnay/32/2486_2.png) [@kratskcinnay](https://discourse.processing.org/u/kratskcinnay)\
**Post date:** [November 27, 2018, 10:56am UTC](https://discourse.processing.org/t/edit-transform-rect-together-with-the-video-beneath-it/5990/1 "2018-11-27T10:56:56Z")

</div>

Hey everyone,

I’m pretty sure this should be fairly easy but I couldn’t figure out a way to do it and didn’t find anything online (probably because it’s to obvious :D).  
I am using using a video that i am cutting and cropping into multiple parts, that are then distributed over the screen. But before that I want to ad some shapes (for example a rect()) and lines that work like a fake GUI. Some of them should be cropped and moved with the video. I guess I want to burn some of that GUI into the image. Is there a way to store everything that is drawn so far inside a PImage? Or is there another approach? Basically what I need is the video and the GUI combined so that I can use get() to crop it.

Any hints to what I could do are welcome!  
Thanks in advance!

kratskcinnay

---

<div class="post-metadata">

**Author:** ![Kevin](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/kevin/32/2297_2.png) [@Kevin](https://discourse.processing.org/u/Kevin)\
**Post date:** [November 27, 2018, 6:06pm UTC](https://discourse.processing.org/t/edit-transform-rect-together-with-the-video-beneath-it/5990/2 "2018-11-27T18:06:28Z")

</div>

Sounds like you’re looking for the `createGraphics()` function. You can find more info in [the reference](https://processing.org/reference/).
