|The RG_Tileview widget displays the contents of a RG_Tile(3) and provides an interface for implementing different types of graphical editors and tools. Built-in graphical editors for tile pixmaps, sketches and features are provided.|
The RG_TileviewColor3i(), RG_TileviewColor4i(), RG_TileviewColor() and RG_TileviewAlpha() functions modify the current RGBA value describing the color to use for subsequent primitive calls.
The RG_TileviewPixel() function plots a pixel at the specified tile coordinates. The pixel will not be visible until the tile is regenerated.
The RG_TileviewPixelCached() function overwrites the pixel on the cached, generated tile used by RG_Tileview, as opposed to the source tile. The pixel will be visible immediately, but the source tile will be unchanged.
The RG_TileviewRect() function draws a filled rectangle of dimensions w, h at tile coordinates x, y. The RG_TileviewRectOut() variant draws a rectangle outline.
The RG_TileviewCircle() function draws a circle outline of radius r with the origin at x, y.
The RG_Tileview widget implements generic graphical controls. It is used for moving and resizing pixmaps/sketches inside tiles and controlling particular features. A control may manipulate multiple integral and floating-point variables.
The RG_TileviewAddCtrl() function creates a new graphical control of the given type:
RG_TILEVIEW_POINT controls a single point value. It is used for setting the position of the origin of a tile, for instance. RG_TILEVIEW_RECTANGLE controls both the coordinates and geometry of a rectangle. It is used for things like pixmaps and sketches. RG_TILEVIEW_RDIMENSIONS controls the dimensions of a non-movable rectangle. It is used for changing the geometry of the tile itself when no sketches, pixmaps or features are selected. RG_TILEVIEW_CIRCLE controls the position and radius of a circle.
The special format string fmt and subsequent arguments specify the variables to edit. Acceptable sequences include %i (int), %u (Uint), %f (float) and %d (double). Sequences such as %*i specify that the argument is a pointer to the given type.
The RG_TileviewDelCtrl() function destroys the given control.
The remaining tileview_*() and tileview_set_*() functions respectively retrieve and modify the given value associated with the given control.
The RG_TileviewSelectTool() and RG_TileviewUnselectTool() functions select or deselect the current edition tool.
The generic features of all edition tools are defined by the structure:
Two specialized derivates are available, one for bitmap-specific tools and another for vector-specific tools:
|The RG_Tileview widget does not generate any event.|
|RG(3), RG_Anim(3), RG_Feature(3), RG_Pixmap(3), RG_Sketch(3), RG_Texture(3), RG_Tile(3)|