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  shape to be examined
13

DESCRIPTION

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

STRUCTURES

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

SEE ALSO

58       XkbComputeRowBounds(3)
59
60
61
62
63X Version 11                     libX11 1.8.7         XkbComputeShapeBounds(3)
Impressum