A glyph in XRENDER is an alpha mask and an associated orgin, advancement and numeric id. The application refers to them by the numeric id.
Glyphs are stored in a glyph-set. The client is responsible for making sure the glyphs it uses are stored in the glyph-set, or there will be a Glyph-error.
render-create-glyph-set | format &key glyph-set | Function |
Creates an initially empty glyph-set for the client to use. Format must be a Direct format. When it contains RGB values, the glyphs are composited using component-alpha True, otherwise they are composited using component-alpha False. |
render-reference-glyph-set | existing-glyph-set &key glyph-set | Function |
Creates a new id refering to the existing-glyph-set. The glyph-set itself will not be freed until all ids has been removed. |
render-free-glyph-set | glyph-set | Function |
Removes an id to a glyph-set. When all ids have been removed the glyph-set itself is removed. |
render-add-glyph | glyph-set id &key x-origin y-origin x-advance y-advance data | Function |
Associates id with the given description of a glyph. An existing glyph with the same id is replaced. At the time of writing, only 8bit alpha masks are supported. Experimentation with glyph-sets in other pict-formats needed. |
render-add-glyph-from-picture | glyph-set picture &key x-origin y-origin x-advance y-advance width height | Function |
Existing glyphs with the same names are replaced. The source picture may be in a different picture-format than glyph-set, in which case the images are converted to the glyph-set's format. |
render-free-glyphs | glyph-set glyphs | Function |
This request removes glyphs from glyph-set. Each glyph must exist in glyph-set (else a Match error results). |