1XkbComputeShapeBounds(3)         XKB FUNCTIONS        XkbComputeShapeBounds(3)
2
3
4

NAME

6       XkbComputeShapeBounds - Updates the bounding box of a shape
7

SYNOPSIS

9       Bool XkbComputeShapeBounds (XkbShapePtr shape);
10

ARGUMENTS

12       - shape
13              shape to be examined
14

DESCRIPTION

16       Xkb  provides  a number of convenience functions to help use a keyboard
17       geometry. These include functions to  return  the  bounding  box  of  a
18       shape's  top  surface  and to update the bounding box of a shape row or
19       section.
20
21       A shape is made up of a number of outlines. Each outline is  a  polygon
22       made up of a number of points. The bounding box of a shape is a rectan‐
23       gle that contains all the outlines of that shape.
24
25       A ShapeRec contains a BoundsRec that describes the bounds of the shape.
26       If  you  add  or delete an outline to or from a shape, the bounding box
27       must be updated.
28
29       XkbComputeShapeBounds updates the BoundsRec contained in the  shape  by
30       examining  all  the  outlines of the shape and setting the BoundsRec to
31       the minimum x and minimum y, and maximum x and maximum y  values  found
32       in  those  outlines.   XkbComputeShapeBounds  returns False if shape is
33       NULL or if there are no outlines for the shape; otherwise,  it  returns
34       True.
35
36       If you add or delete a key to or from a row, or if you update the shape
37       of one of the keys in that row, you may need to update the bounding box
38       of  that  row.  To update the bounding box of a row, use XkbComputeRow‐
39       Bounds.
40

STRUCTURES

42       typedef struct _XkbShape {
43           Atom           name;         /∗ shape's name */
44           unsigned short num_outlines; /∗ number of outlines for the shape */
45           unsigned short sz_outlines;  /∗ size of the outlines array */
46           XkbOutlinePtr  outlines;     /∗ array of outlines for the shape */
47           XkbOutlinePtr  approx;       /∗ pointer into the array to the approximating outline */
48           XkbOutlinePtr  primary;      /∗ pointer into the array to the primary outline */
49           XkbBoundsRec   bounds;       /∗ bounding box for the shape; encompasses all outlines */
50       } XkbShapeRec, *XkbShapePtr;
51
52       typedef struct _XkbBounds {
53           short x1,y1;    /∗ upper left corner of the bounds, in mm/10 */
54           short x2,y2;    /∗ lower right corner of the bounds, in mm/10 */
55       } XkbBoundsRec, *XkbBoundsPtr;
56
57

SEE ALSO

59       XkbComputeRowBounds(3)
60
61
62
63
64X Version 11                     libX11 1.6.5         XkbComputeShapeBounds(3)
Impressum