XIntersectRegion(3)

๐Ÿ’… XIntersectRegion(3) โ€” XLIB FUNCTIONS ๐Ÿ’…

okay bestie, welcome to region arithmetic โ€” it's lowkey giving geometry group chat, and I'm obsessed. This page is all about the Xlib functions that intersect, union, subtract, xor, offset, and shrink regions. No cap, the facts are staying exactly as they are; I'm just making them iconic. ๐Ÿซถโœจ

โœจ NAME โœจ

XIntersectRegion, XUnionRegion, XUnionRectWithRegion, XSubtractRegion, XXorRegion, XOffsetRegion, XShrinkRegion โ€” region arithmetic ๐Ÿ’–

๐ŸŒธ SYNTAX ๐ŸŒธ

Here's the exact contract, bestie โ€” copy it character for character, iykyk:

int XIntersectRegion(Region sra, Region srb, Region dr_return);

int XUnionRegion(Region sra, Region srb, Region dr_return);

int XUnionRectWithRegion(XRectangle *rectangle, Region src_region,
       Region dest_region_return);

int XSubtractRegion(Region sra, Region srb, Region dr_return);

int XXorRegion(Region sra, Region srb, Region dr_return);

int XOffsetRegion(Region r, int dx, int dy);

int XShrinkRegion(Region r, int dx, int dy);

๐ŸŽ€ ARGUMENTS ๐ŸŽ€

  • dest_region_return โ€” returns the destination region. It's the "where the result lands" bestie. ๐Ÿ’ซ
  • dr_return โ€” returns the result of the computation. Your math output slot, fr fr. ๐Ÿงฎ
  • dx, dy โ€” specify the x and y coordinates, which define the amount you want to move or shrink the specified region. The coordinate duo ate. ๐Ÿ‘ฏ
  • r โ€” specifies the region. Main character region energy, periodt. ๐Ÿ‘‘
  • rectangle โ€” specifies the rectangle. Literally the rectangle. ๐ŸŸช
  • sra, srb โ€” specify the two regions with which you want to perform the computation. Two regions, one computation, highkey iconic. ๐Ÿ’…
  • src_region โ€” specifies the source region to be used. The source region, the blueprint, the vibe. ๐Ÿฆ‹

๐Ÿ”ฅ DESCRIPTION ๐Ÿ”ฅ

  • XIntersectRegion โ€” computes the intersection of two regions. It's the overlap, the "we both have this" moment. ๐Ÿ’–
  • XUnionRegion โ€” computes the union of two regions. Everything from both, holding hands. ๐Ÿซถ
  • XUnionRectWithRegion โ€” updates the destination region from a union of the specified rectangle and the specified source region. Rectangle plus source region, combined, into the destination. โœจ
  • XSubtractRegion โ€” subtracts srb from sra and stores the results in dr_return. Bye-bye, srb bits. ๐Ÿ’€
  • XXorRegion โ€” calculates the difference between the union and intersection of two regions. The "only one of you, not both" vibe check. ๐Ÿ”ฅ
  • XOffsetRegion โ€” moves the specified region by a specified amount. Scoot scoot, region. ๐Ÿ›ผ
  • XShrinkRegion โ€” reduces the specified region by a specified amount. Positive values shrink the size of the region, and negative values expand the region. So positive = smaller, negative = bigger โ€” don't mix that up, bestie. ๐Ÿ˜ญ

๐Ÿ”ฅ SEE ALSO ๐Ÿ”ฅ


Signed with sparkle: X Version 11, libX11 1.8.14, and the one and only XIntersectRegion(3) โ€” byeee, go slay those regions ๐Ÿ’–โœจ

๐Ÿ“ฆ where this page comes from