5.3 RasterPaint

In a RasterPaint a PixMap is used to describe an image, and this PixMap is positioned in the shape to be filled. This is done by positioning the hotspot of the PixMap at the hotspot of the shape. Instead of using the PixMap as weights, the pixel values of the map are used directly, and the shape to be filled determines which parts of the image in the PixMap will be shown [4].

The application programmer should specify what to do if the PixMap given is not big enough to fill the shape: either the PixMap should just be repeated (tiled) as needed, or a solid color to use in the uncovered places of the interior of the shape should be specified. The RasterPaint has the following additional properties compared to Paint:

ThePixMap.
Refers to the PixMap.
PaddingSolidColor.
If PaddingSolidColor is none then the PixMap will be tiled, otherwise the PaddingSolidColor will be used where the PixMap does not cover.


[4] Notice the difference between RasterPaint and TiledSolidColor: In a RasterPaint, thePixMap is used directly as Paint, in a TiledSolidColor, the BitMap determines where the SolidColor should be applied. Possibly 'PixmapPaint' or 'ImagePaint' would be a better name than 'RasterPaint'


The Bifrost Graphics System - Reference Manual
© 1991-2002 Mjølner Informatics
[Modified: Monday October 23rd 2000 at 21:21]