# Fill() doesn't accept pattern

**URL:** <https://discourse.processing.org/t/fill-doesnt-accept-pattern/27035>\
**Category:** Beginners\
**Created:** [January 13, 2021, 6:40pm UTC](https://discourse.processing.org/t/fill-doesnt-accept-pattern/27035 "2021-01-13T18:40:47Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![j0b](https://avatars.discourse-cdn.com/v4/letter/j/b5ac83/32.png) [@j0b](https://discourse.processing.org/u/j0b)\
**Post date:** [January 13, 2021, 6:40pm UTC](https://discourse.processing.org/t/fill-doesnt-accept-pattern/27035/1 "2021-01-13T18:40:47Z")

</div>

i am used to js canvas which accept any pattern (or image) as fillStyle() or strokeStyle(). p5js fill() apparently only works with colors. curious if there is any workaround?

---

<div class="post-metadata">

**Author:** ![CodeMasterX](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/codemasterx/32/2942_2.png) [@CodeMasterX](https://discourse.processing.org/u/CodeMasterX)\
**Post date:** [January 13, 2021, 10:45pm UTC](https://discourse.processing.org/t/fill-doesnt-accept-pattern/27035/2 "2021-01-13T22:45:18Z")

</div>

I have no idea how to use a pattern to fill, but you can use image(PImage,x,y); function to place an image
