OEDrawCurvedBorder

void OEDrawCurvedBorder(OEImageBase &image, const OEPen &pen, double radius);

Draws a round rectangle around the image with the given pen.

image

The image around which the border is drawn.

pen

The graphical properties of the border.

radius

The parameter that determines the roundedness of the corners of the rectangle.

See code snippet below and the corresponding image in Figure: Example of using the OEDrawCurvedBorder function.

width, height = 100, 50
image = oedepict.OEImage(width, height)

pen = oedepict.OEPen(oechem.OEWhite, oechem.OELightGreen, oedepict.OEFill_Off, 4.0)
oedepict.OEDrawCurvedBorder(image, pen, 15)

oedepict.OEWriteImage("OEDrawCurvedBorder.png", image)
../../_images/OEDrawCurvedBorder.png

Example of using the OEDrawCurvedBorder function

See also