PS_BEGIN_PATTERN(3)
β¨ PS_BEGIN_PATTERN(3) β¨
okay bestie, welcome to the Library Functions Manual π this is the one about starting a brand new pattern, let's get into it π
πΈ NAME πΈ
PS_begin_pattern β starts a new pattern β¨
π¦ SYNOPSIS π¦
#include <pslib.h>
int PS_begin_pattern(PSDoc *psdoc, float width, float height, float
xstep, float ystep, int painttype)
yes it's a chunky little signature, but she's worth it π
π DESCRIPTION π
okay so picture this: a pattern is basically like a color but for drawing and filling. iconic concept, no notes π
And like β actually, PS_setcolor is the one you use to apply a pattern. That's the vibe. π«Ά
The pattern itself has a given dimension and a stepping in the horizontal and vertical direction. The stepping only really kicks in when the area you're filling is bigger than the pattern itself. And when that happens? The pattern just gets repeated, with a distance of xstep going horizontal and ystep going vertical. tile tile tile, she's serving repetition π
β οΈ and this is the part you do NOT skip: every single call ofPS_begin_patternmust be accompanied by a call toPS_end_pattern(3). fr fr, do not leave her hanging, it's giving unfinished business and the library will not be happy π
π RETURN VALUE π
she returns the identifier of the pattern, or zero if something went wrong π
And just so we're clear: that identifier is a positive number greater than 0. so if you got a 0, that's not a pattern, that's a whole error, bestie π
π SEE ALSO π
PS_end_pattern(3)β her other half, the closing act πPS_set_color(3)β how you actually put a pattern to work β¨
π AUTHOR π
This manual page was written by Uwe Steinmann uwe@steinmann.cx. shoutout to Uwe, the original main character of this page π
and that's the whole PS_BEGIN_PATTERN(3) situation, straight outta the Library Functions Manual, page three, no cap β¨ go forth, start your patterns, end your patterns, stay iconic π¦π π
π¦ where this page comes from
- debian bookworm: pslib-dev 0.4.7-1+b1
- debian trixie: pslib-dev 0.4.8-1+b1
- ubuntu jammy: pslib-dev 0.4.7-1
- ubuntu noble: pslib-dev 0.4.7-1build2
- ubuntu questing: pslib-dev 0.4.8-1
- ubuntu resolute: pslib-dev 0.4.8-1build1
- ubuntu stonking: pslib-dev 0.4.8-3 Β· GPL-2.0-or-later OR LGPL-2.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms