circlePath.arc(x, y, radius, radius, 0, 360); gc->fillPath(circlePath, gc->solidBrush(gc->red()));
rectPath.addRectangle(x, y, width, height); gc->fillPath(rectPath, gc->gradientBrush(gc->blue(), gc->green()));This code creates a rectangular path with the given dimensions, and fills it with a gradient brush that goes from blue to green. These examples illustrate the use of fillPath in C++ graphics. The package library used in these examples is probably a proprietary graphics library provided by a specific vendor, or a third-party library such as Qt or wxWidgets.