same type that is used for RGB color. For information about the COLORREF structure,
see COLORREF.
To resolve color IDs in the EMF back to the extend color space, the add-in calls back to
Publisher through the HrResolveColor method of the IMsoDocExporterSite interface.
The add-in passes Publisher an interface pointer to an IDOCEXCOLOR interface as one
of the parameters to HrResolveColor. Publisher takes the color IDs, also specified in the
call to HrResolveColor, converts them to extended color (RGB, CMYK, or spot color), and
passes them back to the add-in through the methods in the IDOCEXCOLOR interface.
Vector colors are any COLORREF values that the add-in receives from Publisher. For
example, text color, line stroke color, and color for metafile recolor. When color
mapping is enabled, Publisher uses a color ID for COLORREF rather than a real RGB
color value. If Publisher provides the add-in an IMsoDocExporterSite interface pointer
by calling the SetDocExporterSite method of the IMsoDocExporter interface, the add-in
should always call the IMsoDocExporterSite::HrResolveColor method to convert the
COLORREF to an extended color, which the add-in receives through the methods in the
IDOCEXCOLOR interface.
To support vector color mapping, the add-in needs to do the following:
Implement class support for an IDOCEXCOLOR interface. The methods in this
interface enable Publisher to pass extended color back to the add-in.
Cache the following color state values from the semantic records in the EMF.
Set foreground color for recoloring. This is set through the
DocExComment_ColorInfo structure.
Set background color for recoloring. This is set through the
DocExComment_ColorInfo structure.
Determine when color mapping is enabled. This is set through the
DocExComment_ColorEnable structure.
For a vector color, create an IDOCEXCOLOR interface with the color ID, so that
IDOCEXCOLOR::GetUnresolvedRGB returns the color ID. The add-in should call the
IMsoDocExporterSite::HrResolveColor method with the IDOCEXCOLOR interface
and cached color states. Publisher calls the IDOCEXCOLOR interface methods with
the final color, which can be RGB, CMYK, spot, or registration tint.
Vector Color and Recolored Images