Package: gsk
GBoxed gsk:path-builder
Declaration(glib:define-gboxed-opaque path-builder "GskPathBuilder" :export t :type-initializer "gsk_path_builder_get_type" :alloc (%path-builder-new)) Details The gsk:path-builder structure is an auxiliary structure for constructing gsk:path instances. A path is constructed like this: GskPath * construct_path (void) { GskPathBuilder *builder;Adding contours to the path can be done in two ways. The easiest option is to use the gsk:path-builder_add-* group of functions that add predefined contours to the current path, either common shapes like a circle with the gsk:path-builder-add-circle function or by adding from other paths like a path with the gsk:path-builder-add-path function. The gsk:path-builder-add-* methods always add complete contours, and do not use or modify the current point. The other option is to define each line and curve manually with the gsk:path-builder-*-to group of functions. You start with a call to the gsk:path-builder-move-to function to set the starting point and then use multiple calls to any of the drawing functions to move the pen along the plane. Once you are done, you can call the gsk:path-builder-close function to close the path by connecting it back with a line to the starting point. This is similar to how paths are drawn in Cairo. Note that the gsk:path-builder instance will reduce the degree of added Bézier curves as much as possible, to simplify rendering. Since 4.14 | Returned bySee also |
2024-11-12