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.

OEColorForceField cff = new OEColorForceField();
cff.Init(OEColorFFType.ImplicitMillsDean);

OEColorForceFieldDisplay cffdisp = new OEColorForceFieldDisplay(cff);
uint rows = 2;
uint cols = 4;
OEColorForceFieldLegendDisplayOptions opts = new OEColorForceFieldLegendDisplayOptions(rows, cols);

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

Example of using the OEDrawColorForceFieldLegend function