#include "include/core/SkPath.h" #include "include/core/SkCanvas.h" #include "include/core/SkColor.h" int main() { SkPath path; // ... add lines, beziers to path ... if (path.isConvex()) { // draw the path in green if it is convex sk_spIn this example, we create a new `SkPath` object and add lines, beziers, and other geometric shapes to it. Then we check if the path is convex or not using the `isConvex()` method. If it is convex, we draw the path on a canvas with a green color. Package/library: Skia, a cross-platform 2D graphics library maintained by Google.surface = SkSurface::MakeRasterN32Premul(640, 480); sk_sp canvas(surface->getCanvas()); canvas->drawPath(path, SkPaint().setColor(SK_ColorGREEN)); } return 0; }