# Is there a similar function to pushMatrix() and popMatrix() but instead for transforms its for functions like stroke() and strokeWeight()?

**URL:** <https://discourse.processing.org/t/is-there-a-similar-function-to-pushmatrix-and-popmatrix-but-instead-for-transforms-its-for-functions-like-stroke-and-strokeweight/6088>\
**Category:** Coding Questions\
**Created:** [November 29, 2018, 10:25pm UTC](https://discourse.processing.org/t/is-there-a-similar-function-to-pushmatrix-and-popmatrix-but-instead-for-transforms-its-for-functions-like-stroke-and-strokeweight/6088 "2018-11-29T22:25:12Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![klaik30](https://avatars.discourse-cdn.com/v4/letter/k/c57346/32.png) [@klaik30](https://discourse.processing.org/u/klaik30)\
**Post date:** [November 29, 2018, 10:25pm UTC](https://discourse.processing.org/t/is-there-a-similar-function-to-pushmatrix-and-popmatrix-but-instead-for-transforms-its-for-functions-like-stroke-and-strokeweight/6088/1 "2018-11-29T22:25:12Z")

</div>

pushMatrix() and popMatrix() are super useful when I want to not destroy the current coordinate system and basically switch reference frame but in that reference frame, I might want to apply settings that only apply to that specific reference frame.

Is there any way I can “keep” my drawing settings like stroke(),strokeWeight() and noFill() so I don’t have to keep track of every function, method or line of code where this might be changed?

Thanks! \<3

---

<div class="post-metadata">

**Author:** ![kll](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/kll/32/964_2.png) [@kll](https://discourse.processing.org/u/kll)\
**Post date:** [November 30, 2018, 12:09am UTC](https://discourse.processing.org/t/is-there-a-similar-function-to-pushmatrix-and-popmatrix-but-instead-for-transforms-its-for-functions-like-stroke-and-strokeweight/6088/2 "2018-11-30T00:09:18Z")

</div>

yes, it is very much with the same thinking like you ask,  
it might be a little bit misplaced at the  
[https://processing.org/reference/](https://processing.org/reference/)  
page, pls. see:  
[https://processing.org/reference/pushStyle\_.html](https://processing.org/reference/pushStyle_.html)  
…  
[https://processing.org/reference/popStyle\_.html](https://processing.org/reference/popStyle_.html)

---

<div class="post-metadata">

**Author:** ![klaik30](https://avatars.discourse-cdn.com/v4/letter/k/c57346/32.png) [@klaik30](https://discourse.processing.org/u/klaik30)\
**Post date:** [November 30, 2018, 12:39am UTC](https://discourse.processing.org/t/is-there-a-similar-function-to-pushmatrix-and-popmatrix-but-instead-for-transforms-its-for-functions-like-stroke-and-strokeweight/6088/3 "2018-11-30T00:39:42Z")

</div>

Thank you very much!
