Transfer modes

Transfer modes are algorithms that determine the resulting color when pixels of one color (source color) overlay pixels of another color (destination color). Pixels overlay other pixels when 2-D graphics are drawn. There is a wide range of transfer modes so that you can blend colors to achieve different visual effects when you work with 2-D images. 2-D images are described in Chapter 6.

One TGrafBundle can own a transfer mode for a fill, frame, and image as shown in Figure 113. The transfer mode adopted for fill and frame applies to the 2-D graphic that owns that bundle only when that graphic is drawn to a 2-D image. The transfer mode adopted for an image applies to a 2-D image when it is drawn to a view or when one 2-D image is drawn on top of another 2-D image.

Most transfer modes operate within a specific color space, which makes transfer modes device-independent. When no transfer mode is adopted, the source color is completely copied over the destination color.


Figure 114 shows the TTransferMode derived classes available.


TSrcActiveTransferMode and TDstActiveTransferMode: These abstract base classes provide a number of classes for changing the source and destination colors.

TMinZDepthComposite: This transfer operates outside the context of a color space with the z-Buffer.

HSL, HSV, Gray scale, and RGB: The following categories represent transfer mode classes for operating within those color spaces: hue, saturation, and light (HSL); hue, saturation, and value (HSV); Gray scale; and red, green, and blue (RGB),

When you set up an attribute bundle, you might be using TRGBColor, THSVColor, TGrayColor, or TXYZColor to define your fill or frame specifications. You can use any transfer mode you want, however. If you are using TRGBColor, you do not have to use one of the RGB transfer modes. If you use, for example, one of the HSV transfer modes instead, TRGBColor is converted to the HSV color space and s the HSV transfer mode applied to it.

Color spaces will be described in Chapter 7.


[Contents] [Previous] [Next]
Click the icon to mail questions or corrections about this material to Taligent personnel.
Copyright©1995 Taligent,Inc. All rights reserved.

Generated with WebMaker