# Is parent parameter of Capture ever not "this"?

**URL:** <https://discourse.processing.org/t/is-parent-parameter-of-capture-ever-not-this/12543>\
**Category:** Libraries\
**Created:** [July 6, 2019, 9:21pm UTC](https://discourse.processing.org/t/is-parent-parameter-of-capture-ever-not-this/12543 "2019-07-06T21:21:53Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![cyanblue](https://avatars.discourse-cdn.com/v4/letter/c/ec9cab/32.png) [@cyanblue](https://discourse.processing.org/u/cyanblue)\
**Post date:** [July 6, 2019, 9:21pm UTC](https://discourse.processing.org/t/is-parent-parameter-of-capture-ever-not-this/12543/1 "2019-07-06T21:21:53Z")

</div>

I’ve just been playing around with the Capture class, and the default first (_parent_) parameter when declaring a new Capture object is “_this_” - which I understand to refer to the parent of the object…i.e. the current sketch that the object is being declared in. My question is, is there ever a situation where it wouldn’t be referring to the current sketch?

---

<div class="post-metadata">

**Author:** ![GoToLoop](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/gotoloop/32/86_2.png) [@GoToLoop](https://discourse.processing.org/u/GoToLoop)\
**Post date:** [July 6, 2019, 10:15pm UTC](https://discourse.processing.org/t/is-parent-parameter-of-capture-ever-not-this/12543/2 "2019-07-06T22:15:46Z")

</div>

> [@cyanblue](#):
>
> My question is, is there ever a situation where it wouldn’t be referring to the current sketch?

Java’s keyword `this` refers to an instance of the same datatype of the `class` it is in. ☕

Capture’s 1st parameter is of datatype PApplet, btW. 🤓

---

<div class="post-metadata">

**Author:** ![jeremydouglass](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/jeremydouglass/32/20_2.png) [@jeremydouglass](https://discourse.processing.org/u/jeremydouglass)\
**Post date:** [July 9, 2019, 3:16pm UTC](https://discourse.processing.org/t/is-parent-parameter-of-capture-ever-not-this/12543/3 "2019-07-09T15:16:19Z")

</div>

If you look at the source code for the library, you will see that the constructors always take PApplet as the first argument. This is true for most Processing libraries – having a copy of the sketch object is how they gain access to Processing canvas methods like image, pixels, etc.

> <https://github.com/processing/processing-video/blob/master/src/processing/video/Capture.java#L106-L117>
