XkbComputeShapeTop(3)
π NAME
XkbComputeShapeTop(3) is here from the XKB FUNCTIONS manual, and it determines the bounding box of the top surface of a shape. Slay.
β¨ SYNOPSIS
Bool XkbComputeShapeTop (XkbShapePtr shape, XkbBoundsPtr bounds_rtrn);
π ARGUMENTS
shapeβ the shape being examined. That's the one getting the vibe check.bounds_rtrnβ gets backfilled with the bounding box for the shape. It comes back with the rectangle info.
πΈ DESCRIPTION
Okay so Xkb gives you a bunch of convenience functions to help use a keyboard geometry. These include functions to return the bounding box of a shape's top surface and to update the bounding box of a shape row or section. Convenient? Very.
A shape is made up of a number of outlines. Each outline is a polygon made up of a number of points. The bounding box of a shape is a rectangle that contains all the outlines of that shape. Geometry but make it contained, iykyk.
XkbComputeShapeTop returns a BoundsRec that contains two x and y coordinates. These coordinates describe the corners of a rectangle that contains the outline that describes the top surface of the shape. The top surface is defined to be the approximating outline if the approx field of shape is not NULL. If approx is NULL, the top surface is defined as the last outline in the shape's array of outlines. XkbComputeShapeTop returns False if shape is NULL or if there are no outlines for the shape; otherwise, it returns True. No cap.
π¦ STRUCTURES
typedef struct _XkbBounds {
short x1,y1; /* upper left corner of the bounds, in mm/10 */
short x2,y2; /* lower right corner of the bounds, in mm/10 */
} XkbBoundsRec, *XkbBoundsPtr;
That's the whole page, bestie π β footer shoutout: X Version 11, libX11 1.8.14. No date line was listed, so I'm not inventing one π€β¨
π¦ where this page comes from
- alpine 3.24: libx11-doc 1.8.14-r0 Β· X11
- arch rolling: libx11 1.8.14-1 Β· MIT AND X11
- nixos 26.05: libx11 1.8.14
- nixpkgs unstable: libx11 1.8.14
- Copyright (c) 1999, Oracle and/or its affiliates
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms