OEDrawTextToCenter¶
void OEDrawTextToCenter(OEImageBase &image, const std::string &text,
const OEFont &font)
Draws the given text to the center of the image.
See code snippet below and the corresponding image in Figure: Example of using the OEDrawTextToCenter function.
const auto width = 100u;
const auto height = 50u;
OEImage image(width, height);
OEDrawTextToCenter(image, "center", OEDefaultFont);
OEDrawBorder(image, OELightGreyPen);
OEWriteImage("OEDrawTextToCenter.png", image);
See also
OEImageBase class
OEFont class
OEDrawBorder
functionOEDrawText
function