OEDrawColorForceFieldLegend

void OEDrawColorForceFieldLegend(OEDepict::OEImageBase &image,
                                 const OEColorForceFieldDisplay &cffdisp,
                                 const OEColorForceFieldLegendDisplayOptions &opts)

Draws a legend of the color force field.

image

The image on which the color force field legend is drawn.

cffdisp

The OEColorForceFieldDisplay object that holds the data necessary to depict the color force field.

opts

The OEColorForceFieldLegendDisplayOptions object that determine how the legend of color force field is depicted.

The following code snippet shows how to use the OEDrawColorForceFieldLegend function. The image created is shown in Figure: Example of using the OEDrawColorForceFieldLegend function.

OEShape::OEColorForceField cff;
cff.Init(OEShape::OEColorFFType::ImplicitMillsDean);
OEColorForceFieldDisplay cffdisp(cff);

const unsigned rows = 2u;
const unsigned cols = 4u;
OEColorForceFieldLegendDisplayOptions opts(rows, cols);

OEImage image(450u, 150u);
OEDrawColorForceFieldLegend(image, cffdisp, opts);
../../_images/DrawColorForceFieldLegend.png

Example of using the OEDrawColorForceFieldLegend function