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);
int rows = 2;
int cols = 4;
OEColorForceFieldLegendDisplayOptions opts = new OEColorForceFieldLegendDisplayOptions(rows, cols);
OEImage image = new OEImage(450, 150);
oegrapheme.OEDrawColorForceFieldLegend(image, cffdisp, opts);
See also