PS_RECT(3)

πŸ’– PS_RECT β€” the manual page, but make it a group chat πŸ’–

okay bestie, gather round, because today we're talking about PS_rect from the Library Functions Manual (section 3, the library-call girlies) and honestly? she's a whole vibe. let's get into it ✨


πŸŽ€ NAME πŸŽ€

PS_rect β€” she draws a rectangle. that's it. that's the girl. iconic behavior, no notes πŸ’…


🌸 SYNOPSIS 🌸

#include <pslib.h>

void PS_rect(PSDoc *psdoc, float x, float y, float width, float height)

like. look at her. five args, zero drama. we love a low-maintenance queen πŸ‘‘


πŸ¦‹ DESCRIPTION πŸ¦‹

so here's the tea β˜• β€” PS_rect draws a rectangle, and the lower left corner of that rectangle sits at (x, y). that's the anchor point. that's home base. that's where she lives.

and the important part, bestie, is that the rectangle starts and ends in its lower left corner. full circle moment. she begins there, she returns there. main character energy fr fr πŸ”₯

now, the path situation β€” this is where it gets spicy:

  • if you call this function outside a path, it will start a new path. fresh start, clean slate, new era πŸ’«
  • if you call it within a path, it will add the rectangle as a subpath. nesting era. she's flexible like that 🫢
⚠️ and now the caveat, listen up: if the last drawing operation does not end in the lower left corner, then there will be a gab in the path. 😭 no cap. a literal gap in your path. so like… check where your last operation ended, because she is NOT coming to pick you up from that coordinate. know your coordinates bestie πŸ’€

πŸ’œ SEE ALSO πŸ’œ

go give these siblings some love too:

  • PS_cirle(3) 🌈 (yes it's spelled like that in the original, i am not fixing her, she's perfect)
  • PS_arc(3) πŸŽ€
  • PS_lineto(3) ⭐

πŸ‘‘ AUTHOR πŸ‘‘

this manual page was written by Uwe Steinmann uwe@steinmann.cx. thank you for your service, legend πŸ«‘πŸ’–


and that's the whole page, bestie! this one came from the Library Functions Manual, PS_RECT(3), and it's serving exactly what it needed to serve. no more, no less, periodt. πŸ’…βœ¨πŸŒΈπŸ¦‹πŸ’œ

πŸ“¦ where this page comes from