### Transfer Modes

A transfer mode is the specification of an interaction that takes place on the color of the primitive being drawn, on the current color at the destination location, or between both of these colors.

Transfer modes are algorithms that determine the resulting color when pixels of one color (source color) overlay pixels of another color (destination color) when 2D 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 2D images.

One IGrafBundle can own a transfer mode for a fill, frame, and image. The transfer mode adopted for fill and frame applies to the 2D graphic that owns that bundle only when that graphic is drawn to a 2D image. The transfer mode adopted for an image applies to a 2D image when it is drawn to a view or when one 2D image is drawn on top of another 2D 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.

For information on mode type definitions, see texts on Windows graphics systems.

### IColorTransferMode

The color transfer mode applies for color paint of fill and frame for the geometry to be rendered. In the case of rendering a geometry of IGImage or the IGImage set in the IPaint for image pattern fill, the color transfer mode implies the color is applied using such mode to the area the IGImage is rendered.

The default behavior of IColorTransferMode is source-replaces-destination or source copy mode.

The enumerated type EColorMode describes a set of supported color transfer modes:

- kSourceCopy
- kInvertSource
- kDestinationCopy
- kInvertDestination
- kOR
- kAND
- kXOR
- kInvertedSourceAND
- kInvertedSourceOR
- kInvertedDestinationAND
- kInvertedDestinationOR
- kInvertedAND
- kInvertedOR
- kInvertedXOR
- kONES
- kZEROS

### IImageTransferMode

The image transfer mode applies for the geometry of IGImage. The default behavior of IImageTransferMode is source-replaces-destination or source copy.

The enumerated type EImageMode describes the supported set of image transfer modes:

- kSrcCopy
- kSrcORDst
- kSrcANDDst
- kSrcXORDst
- kSrcANDInvertDst
- kInvertSrc
- kInvertResultOfSrcORDst
- kSrcANDPattern
- kInvertSrcORDst
- kPatternCopy
- kPatternORInvertSrcORDst
- kPatternXORDst
- kInvertDst
- kAllZeros
- kAllOnes