// Generated by gmmproc 2.86.0 -- DO NOT MODIFY!
#ifndef _GSKMM_PATHBUILDER_H
#define _GSKMM_PATHBUILDER_H

#include <gskmmconfig.h>


#include <glibmm/ustring.h>
#include <sigc++/sigc++.h>

/* Copyright (C) 2026 The gtkmm Development Team
 *
 * This library is free software; you can redistribute it and/or
 * modify it under the terms of the GNU Lesser General Public
 * License as published by the Free Software Foundation; either
 * version 2.1 of the License, or (at your option) any later version.
 *
 * This library is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 * Lesser General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public
 * License along with this library. If not, see <http://www.gnu.org/licenses/>.
 */


#include <glibmm/refptr.h>
#include <gdkmm/graphene_point.h>
#include <gdkmm/graphene_rect.h>
#include <gskmm/path.h>
#include <gskmm/pathpoint.h>
#include <gskmm/roundedrect.h>
#include <cairomm/path.h>
#include <pangomm/layout.h>
#include <gsk/gsk.h> // GskPathBuilder

namespace Gsk
{
/** Constructs `Gsk::Path` objects.
 *
 * Adding contours to the path can be done in two ways.
 * The easiest option is to use the `add_*` group of functions that add
 * predefined contours to the current path, either common shapes like
 * add_circle() or by adding from other paths like add_path().
 *
 * The `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 `*_to` group of functions. You start with
 * a call to move_to() 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
 * close() 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 %Gsk::PathBuilder will reduce the degree of added Bézier
 * curves as much as possible, to simplify rendering.
 *
 * @newin{4,24}
 */
class GSKMM_API PathBuilder final
{
  // GskPathBuilder is registered as a boxed type, but it has custom
  // reference-counting instead of copy/free functions, so we use it via RefPtr.
  public:
#ifndef DOXYGEN_SHOULD_SKIP_THIS
  using CppObjectType = PathBuilder;
  using BaseObjectType = GskPathBuilder;
#endif /* DOXYGEN_SHOULD_SKIP_THIS */

  static Glib::RefPtr<PathBuilder> create();

  /** Increment the reference count for this object.
   * You should never need to do this manually - use the object via a RefPtr instead.
   */
  void reference()   const;

  /** Decrement the reference count for this object.
   * You should never need to do this manually - use the object via a RefPtr instead.
   */
  void unreference() const;

  ///Provides access to the underlying C instance.
  GskPathBuilder*       gobj();

  ///Provides access to the underlying C instance.
  const GskPathBuilder* gobj() const;

  ///Provides access to the underlying C instance. The caller is responsible for unrefing it. Use when directly setting fields in structs.
  GskPathBuilder* gobj_copy() const;

  PathBuilder() = delete;

  // noncopyable
  PathBuilder(const PathBuilder&) = delete;
  PathBuilder& operator=(const PathBuilder&) = delete;

protected:
  // Do not derive this.  Gsk::PathBuilder can neither be constructed nor deleted.

  void operator delete(void*, std::size_t);

private:

  // Necessary if used in _WRAP_PROPERTY: _IS_REFCOUNTED_BOXEDTYPE dnl// Generate a Glib::Value specialization
  

public:
  
  /** Creates a new path from the given builder.
   * 
   * The given `Gsk::PathBuilder` is reset to the initial state once this
   * function returns. Calling this function again on the same builder
   * instance will therefore produce an empty path, not a copy of the same
   * path.
   * 
   * This function is intended primarily for language bindings.
   * C code should use free_to_path().
   * 
   * @newin{4,24}
   * 
   * @return The newly created path
   * with all the contours added to the builder.
   */
  Glib::RefPtr<Path> to_path();
  
  
  /** Gets the current point.
   * 
   * The current point is used for relative drawing commands and
   * updated after every operation.
   * 
   * When the builder is created, the default current point is set
   * to `0, 0`. Note that this is different from cairo, which starts
   * out without a current point.
   * 
   * @newin{4,24}
   * 
   * @return The current point.
   */
  Gdk::Graphene::Point get_current_point() const;
  
  /** Appends all of @a path to the builder.
   * 
   * @newin{4,24}
   * 
   * @param path The path to append.
   */
  void add_path(const Glib::RefPtr<const Path>& path);
  
  /** Appends all of @a path to the builder, in reverse order.
   * 
   * @newin{4,24}
   * 
   * @param path The path to append.
   */
  void add_reverse_path(const Glib::RefPtr<const Path>& path);
  
  /** Adds a Cairo path to the builder.
   * 
   * You can use cairo_copy_path() to access the path
   * from a Cairo context.
   * 
   * @newin{4,24}
   * 
   * @param path A path.
   */
  void add_cairo_path(const Cairo::RefPtr<const Cairo::Path>& path);
  
  /** Adds the outlines for the glyphs in @a layout to the builder.
   * 
   * @newin{4,24}
   * 
   * @param layout The pango layout to add.
   */
  void add_layout(const Glib::RefPtr<const Pango::Layout>& layout);
  
  /** Adds a rectangle as a new contour.
   * 
   * The path is going around the rectangle in clockwise direction.
   * 
   * If the the width or height are 0, the path will be a closed
   * horizontal or vertical line. If both are 0, it'll be a closed dot.
   * 
   * @newin{4,24}
   * 
   * @param rect The rectangle to create a path for.
   */
  void add_rect(const Gdk::Graphene::Rect& rect);
  
  /** Adds a rounded rectangle as a new contour.
   * 
   * The path is going around the rectangle in clockwise direction.
   * 
   * @newin{4,24}
   * 
   * @param rect The rounded rect.
   */
  void add_rounded_rect(const Gsk::RoundedRect& rect);
  
  /** Adds a circle as a new contour.
   * 
   * The path is going around the circle in clockwise direction.
   * 
   * If @a radius is zero, the contour will be a closed point.
   * 
   * @newin{4,24}
   * 
   * @param center The center of the circle.
   * @param radius The radius of the circle.
   */
  void add_circle(const Gdk::Graphene::Point& center, float radius);
  
  /** Adds a segment of a path to the builder.
   * 
   * If @a start is equal to or after @a end, the path will first add the
   * segment from @a start to the end of the path, and then add the segment
   * from the beginning to @a end. If the path is closed, these segments
   * will be connected.
   * 
   * Note that this method always adds a path with the given start point
   * and end point. To add a closed path, use add_path().
   * 
   * @newin{4,24}
   * 
   * @param path The path to take the segment to.
   * @param start The point on @a path to start at.
   * @param end The point on @a path to end at.
   */
  void add_segment(const Glib::RefPtr<const Path>& path, const PathPoint& start, const PathPoint& end);
  
  /** Starts a new contour by placing the pen at @a x, @a y.
   * 
   * If this function is called twice in succession, the first
   * call will result in a contour made up of a single point.
   * The second call will start a new contour.
   * 
   * @newin{4,24}
   * 
   * @param x X coordinate.
   * @param y Y coordinate.
   */
  void move_to(float x, float y);
  
  /** Starts a new contour by placing the pen at @a x, @a y
   * relative to the current point.
   * 
   * This is the relative version of move_to().
   * 
   * @newin{4,24}
   * 
   * @param x X offset.
   * @param y Y offset.
   */
  void rel_move_to(float x, float y);
  
  /** Draws a line from the current point to @a x, @a y and makes it
   * the new current point.
   * 
   * <picture>
   * <source srcset="line-dark.png" media="(prefers-color-scheme: dark)">
   * <img alt="Line To" src="line-light.png">
   * </picture>
   * 
   * @newin{4,24}
   * 
   * @param x X coordinate.
   * @param y Y coordinate.
   */
  void line_to(float x, float y);
  
  /** Draws a line from the current point to a point offset from it
   * by @a x, @a y and makes it the new current point.
   * 
   * This is the relative version of line_to().
   * 
   * @newin{4,24}
   * 
   * @param x X offset.
   * @param y Y offset.
   */
  void rel_line_to(float x, float y);
  
  /** Adds a [quadratic Bézier curve](https://en.wikipedia.org/wiki/B%C3%A9zier_curve)
   * from the current point to @a x2, @a y2 with @a x1, @a y1 as the control point.
   * 
   * After this, @a x2, @a y2 will be the new current point.
   * 
   * <picture>
   * <source srcset="quad-dark.png" media="(prefers-color-scheme: dark)">
   * <img alt="Quad To" src="quad-light.png">
   * </picture>
   * 
   * @newin{4,24}
   * 
   * @param x1 X coordinate of control point.
   * @param y1 Y coordinate of control point.
   * @param x2 X coordinate of the end of the curve.
   * @param y2 Y coordinate of the end of the curve.
   */
  void quad_to(float x1, float y1, float x2, float y2);
  
  /** Adds a [quadratic Bézier curve](https://en.wikipedia.org/wiki/B%C3%A9zier_curve)
   * from the current point to @a x2, @a y2 with @a x1, @a y1 the control point.
   * 
   * All coordinates are given relative to the current point.
   * 
   * This is the relative version of quad_to().
   * 
   * @newin{4,24}
   * 
   * @param x1 X offset of control point.
   * @param y1 Y offset of control point.
   * @param x2 X offset of the end of the curve.
   * @param y2 Y offset of the end of the curve.
   */
  void rel_quad_to(float x1, float y1, float x2, float y2);
  
  /** Adds a [cubic Bézier curve](https://en.wikipedia.org/wiki/B%C3%A9zier_curve)
   * from the current point to @a x3, @a y3 with @a x1, @a y1 and @a x2, @a y2 as the control
   * points.
   * 
   * After this, @a x3, @a y3 will be the new current point.
   * 
   * <picture>
   * <source srcset="cubic-dark.png" media="(prefers-color-scheme: dark)">
   * <img alt="Cubic To" src="cubic-light.png">
   * </picture>
   * 
   * @newin{4,24}
   * 
   * @param x1 X coordinate of first control point.
   * @param y1 Y coordinate of first control point.
   * @param x2 X coordinate of second control point.
   * @param y2 Y coordinate of second control point.
   * @param x3 X coordinate of the end of the curve.
   * @param y3 Y coordinate of the end of the curve.
   */
  void cubic_to(float x1, float y1, float x2, float y2, float x3, float y3);
  
  /** Adds a [cubic Bézier curve](https://en.wikipedia.org/wiki/B%C3%A9zier_curve)
   * from the current point to @a x3, @a y3 with @a x1, @a y1 and @a x2, @a y2 as the control
   * points.
   * 
   * All coordinates are given relative to the current point.
   * 
   * This is the relative version of cubic_to().
   * 
   * @newin{4,24}
   * 
   * @param x1 X offset of first control point.
   * @param y1 Y offset of first control point.
   * @param x2 X offset of second control point.
   * @param y2 Y offset of second control point.
   * @param x3 X offset of the end of the curve.
   * @param y3 Y offset of the end of the curve.
   */
  void rel_cubic_to(float x1, float y1, float x2, float y2, float x3, float y3);
  
  /** Adds a [conic curve](https://en.wikipedia.org/wiki/Non-uniform_rational_B-spline)
   * from the current point to @a x2, @a y2 with the given @a weight and @a x1, @a y1 as the
   * control point.
   * 
   * The weight determines how strongly the curve is pulled towards the control point.
   * A conic with weight 1 is identical to a quadratic Bézier curve with the same points.
   * 
   * Conic curves can be used to draw ellipses and circles. They are also known as
   * rational quadratic Bézier curves.
   * 
   * After this, @a x2, @a y2 will be the new current point.
   * 
   * <picture>
   * <source srcset="conic-dark.png" media="(prefers-color-scheme: dark)">
   * <img alt="Conic To" src="conic-light.png">
   * </picture>
   * 
   * @newin{4,24}
   * 
   * @param x1 X coordinate of control point.
   * @param y1 Y coordinate of control point.
   * @param x2 X coordinate of the end of the curve.
   * @param y2 Y coordinate of the end of the curve.
   * @param weight Weight of the control point, must be greater than zero.
   */
  void conic_to(float x1, float y1, float x2, float y2, float weight);
  
  /** Adds a [conic curve](https://en.wikipedia.org/wiki/Non-uniform_rational_B-spline)
   * from the current point to @a x2, @a y2 with the given @a weight and @a x1, @a y1 as the
   * control point.
   * 
   * All coordinates are given relative to the current point.
   * 
   * This is the relative version of conic_to().
   * 
   * @newin{4,24}
   * 
   * @param x1 X offset of control point.
   * @param y1 Y offset of control point.
   * @param x2 X offset of the end of the curve.
   * @param y2 Y offset of the end of the curve.
   * @param weight Weight of the curve, must be greater than zero.
   */
  void rel_conic_to(float x1, float y1, float x2, float y2, float weight);
  
  /** Adds an elliptical arc from the current point to @a x2, @a y2
   * with @a x1, @a y1 determining the tangent directions.
   * 
   * After this, @a x2, @a y2 will be the new current point.
   * 
   * @note Two points and their tangents do not determine
   * a unique ellipse, so GSK just picks one. If you need more
   * precise control, use conic_to()
   * or svg_arc_to().
   * 
   * <picture>
   * <source srcset="arc-dark.png" media="(prefers-color-scheme: dark)">
   * <img alt="Arc To" src="arc-light.png">
   * </picture>
   * 
   * @newin{4,24}
   * 
   * @param x1 X coordinate of first control point.
   * @param y1 Y coordinate of first control point.
   * @param x2 X coordinate of second control point.
   * @param y2 Y coordinate of second control point.
   */
  void arc_to(float x1, float y1, float x2, float y2);
  
  /** Adds an elliptical arc from the current point to @a x2, @a y2
   * with @a x1, @a y1 determining the tangent directions.
   * 
   * All coordinates are given relative to the current point.
   * 
   * This is the relative version of arc_to().
   * 
   * @newin{4,24}
   * 
   * @param x1 X coordinate of first control point.
   * @param y1 Y coordinate of first control point.
   * @param x2 X coordinate of second control point.
   * @param y2 Y coordinate of second control point.
   */
  void rel_arc_to(float x1, float y1, float x2, float y2);
  
  /** Implements arc-to according to the SVG spec.
   * 
   * A convenience function that implements the
   * [SVG arc_to](https://www.w3.org/TR/SVG11/paths.htmlPath::DataEllipticalArcCommands)
   * functionality.
   * 
   * After this, @a x, @a y will be the new current point.
   * 
   * @newin{4,24}
   * 
   * @param rx X radius.
   * @param ry Y radius.
   * @param x_axis_rotation The rotation of the ellipsis.
   * @param large_arc Whether to add the large arc.
   * @param positive_sweep Whether to sweep in the positive direction.
   * @param x X coordinate of the endpoint.
   * @param y Y coordinate of the endpoint.
   */
  void svg_arc_to(float rx, float ry, float x_axis_rotation, bool large_arc, bool positive_sweep, float x, float y);
  
  /** Implements arc-to according to the SVG spec.
   * 
   * All coordinates are given relative to the current point.
   * 
   * This is the relative version of svg_arc_to().
   * 
   * @newin{4,24}
   * 
   * @param rx X radius.
   * @param ry Y radius.
   * @param x_axis_rotation The rotation of the ellipsis.
   * @param large_arc Whether to add the large arc.
   * @param positive_sweep Whether to sweep in the positive direction.
   * @param x X coordinate of the endpoint.
   * @param y Y coordinate of the endpoint.
   */
  void rel_svg_arc_to(float rx, float ry, float x_axis_rotation, bool large_arc, bool positive_sweep, float x, float y);
  
  /** Implements arc-to according to the HTML Canvas spec.
   * 
   * A convenience function that implements the
   * [HTML arc_to](https://html.spec.whatwg.org/multipage/canvas.html#dom-context-2d-arcto-dev)
   * functionality.
   * 
   * After this, the current point will be the point where
   * the circle with the given radius touches the line from
   *  @a x1, @a y1 to @a x2, @a y2.
   * 
   * @newin{4,24}
   * 
   * @param x1 X coordinate of first control point.
   * @param y1 Y coordinate of first control point.
   * @param x2 X coordinate of second control point.
   * @param y2 Y coordinate of second control point.
   * @param radius Radius of the circle.
   */
  void html_arc_to(float x1, float y1, float x2, float y2, float radius);
  
  /** Implements arc-to according to the HTML Canvas spec.
   * 
   * All coordinates are given relative to the current point.
   * 
   * This is the relative version of html_arc_to().
   * 
   * @newin{4,24}
   * 
   * @param x1 X coordinate of first control point.
   * @param y1 Y coordinate of first control point.
   * @param x2 X coordinate of second control point.
   * @param y2 Y coordinate of second control point.
   * @param radius Radius of the circle.
   */
  void rel_html_arc_to(float x1, float y1, float x2, float y2, float radius);
  
  /** Ends the current contour with a line back to the start point.
   * 
   * Note that this is different from calling line_to()
   * with the start point in that the contour will be closed. A closed
   * contour behaves differently from an open one. When stroking, its
   * start and end point are considered connected, so they will be
   * joined via the line join, and not ended with line caps.
   * 
   * @newin{4,24}
   */
  void close();


};

} // namespace Gsk


namespace Glib
{

/** A Glib::wrap() method for this object.
 *
 * @param object The C instance.
 * @param take_copy False if the result should take ownership of the C instance. True if it should take a new copy or ref.
 * @result A C++ instance that wraps this C instance.
 *
 * @relates Gsk::PathBuilder
 */
GSKMM_API
Glib::RefPtr<Gsk::PathBuilder> wrap(GskPathBuilder* object, bool take_copy = false);

} // namespace Glib


#endif /* _GSKMM_PATHBUILDER_H */

