PS_SHFILL(3)

πŸ’… PS_SHFILL β€” ok bestie, let's talk about drawing a shading

So this page lives in the Library Functions Manual, and the function is literally called PS_shfill. Yes, that name is a whole lie, and we're gonna get into that. Sit down, hydrate, let's go. πŸ¦‹


✨ SYNOPSIS ✨

#include <pslib.h>

void PS_shfill(PSDoc *psdoc, int shading)

That's it. That's the whole signature. Two args, no return value, no drama. 🌸


πŸ’– DESCRIPTION πŸ’–

Okay so what this does: it draws the shading whose id you hand it in the parameter shading. That's it, that's the job.

Now. The name. The name of this function is somewhat misleading, and I need you to internalise that, because the vibes are off. It does not fill an area the way PS_fill(3) does. It's not that girl. What it actually does is simply draw the shading without any bounding box. No box, no border, no boundaries, no containment β€” it just goes. 😭

So if you do want to restrict the shading to a certain area? You're gonna have to call PS_clip(3) before you call this. That's the move. Clip first, then shade. No cap.

Also lowkey a pro tip from the manpage itself: using PS_shfill(3) is often easier than creating a shading pattern with PS_shading_pattern(3) and then using that pattern for filling. So like... just do the easy thing?? The easy thing ate. πŸ’…


πŸ‘‘ SEE ALSO πŸ‘‘


πŸŽ€ AUTHOR πŸŽ€

This manual page was written by Uwe Steinmann uwe@steinmann.cx. Respect the author, always. 🫢


and that's the whole page, bestie β€” you're now fluent in PS_shfill πŸ’–

Signing off from the Library Functions Manual, page PS_SHFILL(3), because that's what the footer says and I'm nothing if not honest about my sources. Slay, go clip something, mwah 🧚✨

πŸ“¦ where this page comes from