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.
width, height = 100, 50
image = oedepict.OEImage(width, height)
oedepict.OEDrawTextToCenter(image, "center", oedepict.OEDefaultFont)
oedepict.OEDrawBorder(image, oedepict.OELightGreyPen)
oedepict.OEWriteImage("OEDrawTextToCenter.png", image)
See also
OEImageBase class
OEFont class
OEDrawBorder
functionOEDrawText
function