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.

cff = oeshape.OEColorForceField()
cff.Init(oeshape.OEColorFFType_ImplicitMillsDean)
cffdisp = oegrapheme.OEColorForceFieldDisplay(cff)

rows, cols = 2, 3
opts = oegrapheme.OEColorForceFieldLegendDisplayOptions(rows, cols)

image = oedepict.OEImage(450, 150)
oegrapheme.OEDrawColorForceFieldLegend(image, cffdisp, opts)
../../_images/DrawColorForceFieldLegend.png

Example of using the OEDrawColorForceFieldLegend function