// Generated by gmmproc 2.86.0 -- DO NOT MODIFY!


#include <glibmm.h>

#include <gskmm/pathbuilder.h>
#include <gskmm/private/pathbuilder_p.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/>.
 */

namespace
{
} // anonymous namespace


/* Why reinterpret_cast<PathBuilder*>(gobject) is needed:
 *
 * A PathBuilder instance is in fact always a GskPathBuilder instance.
 * Unfortunately, GskPathBuilder cannot be a member of PathBuilder,
 * because it is an opaque struct.  Also, the C interface does not provide
 * any hooks to install a destroy notification handler, thus we cannot
 * wrap it dynamically either.
 *
 * The cast works because PathBuilder does not have any member data, and
 * it is impossible to derive from it.  This is ensured by using final on the
 * class and by using = delete on the default constructor.
 */

namespace Glib
{

Glib::RefPtr<Gsk::PathBuilder> wrap(GskPathBuilder* object, bool take_copy)
{
  if(take_copy && object)
    gsk_path_builder_ref(object);

  // See the comment at the top of this file, if you want to know why the cast works.
  return Glib::make_refptr_for_instance<Gsk::PathBuilder>(reinterpret_cast<Gsk::PathBuilder*>(object));
}

} // namespace Glib


namespace Gsk
{

// static
Glib::RefPtr<PathBuilder> PathBuilder::create()
{
  // See the comment at the top of this file, if you want to know why the cast works.
  return Glib::make_refptr_for_instance<PathBuilder>(reinterpret_cast<PathBuilder*>(gsk_path_builder_new()));
}

void PathBuilder::reference() const
{
  // See the comment at the top of this file, if you want to know why the cast works.
  gsk_path_builder_ref(reinterpret_cast<GskPathBuilder*>(const_cast<PathBuilder*>(this)));
}

void PathBuilder::unreference() const
{
  // See the comment at the top of this file, if you want to know why the cast works.
  gsk_path_builder_unref(reinterpret_cast<GskPathBuilder*>(const_cast<PathBuilder*>(this)));
}

GskPathBuilder* PathBuilder::gobj()
{
  // See the comment at the top of this file, if you want to know why the cast works.
  return reinterpret_cast<GskPathBuilder*>(this);
}

const GskPathBuilder* PathBuilder::gobj() const
{
  // See the comment at the top of this file, if you want to know why the cast works.
  return reinterpret_cast<const GskPathBuilder*>(this);
}

GskPathBuilder* PathBuilder::gobj_copy() const
{
  // See the comment at the top of this file, if you want to know why the cast works.
  const auto gobject = reinterpret_cast<GskPathBuilder*>(const_cast<PathBuilder*>(this));
  gsk_path_builder_ref(gobject);
  return gobject;
}


Glib::RefPtr<Path> PathBuilder::to_path()
{
  return Glib::wrap(gsk_path_builder_to_path(gobj()));
}

Gdk::Graphene::Point PathBuilder::get_current_point() const
{
  return Glib::wrap(const_cast<graphene_point_t*>(gsk_path_builder_get_current_point(const_cast<GskPathBuilder*>(gobj()))), true);
}

void PathBuilder::add_path(const Glib::RefPtr<const Path>& path)
{
  gsk_path_builder_add_path(gobj(), const_cast<GskPath*>(Glib::unwrap(path)));
}

void PathBuilder::add_reverse_path(const Glib::RefPtr<const Path>& path)
{
  gsk_path_builder_add_reverse_path(gobj(), const_cast<GskPath*>(Glib::unwrap(path)));
}

void PathBuilder::add_cairo_path(const Cairo::RefPtr<const Cairo::Path>& path)
{
  gsk_path_builder_add_cairo_path(gobj(), ((path) ? (path)->cobj() : nullptr));
}

void PathBuilder::add_layout(const Glib::RefPtr<const Pango::Layout>& layout)
{
  gsk_path_builder_add_layout(gobj(), const_cast<PangoLayout*>(Glib::unwrap<Pango::Layout>(layout)));
}

void PathBuilder::add_rect(const Gdk::Graphene::Rect& rect)
{
  gsk_path_builder_add_rect(gobj(), (rect).gobj());
}

void PathBuilder::add_rounded_rect(const Gsk::RoundedRect& rect)
{
  gsk_path_builder_add_rounded_rect(gobj(), (rect).gobj());
}

void PathBuilder::add_circle(const Gdk::Graphene::Point& center, float radius)
{
  gsk_path_builder_add_circle(gobj(), (center).gobj(), radius);
}

void PathBuilder::add_segment(const Glib::RefPtr<const Path>& path, const PathPoint& start, const PathPoint& end)
{
  gsk_path_builder_add_segment(gobj(), const_cast<GskPath*>(Glib::unwrap(path)), (start).gobj(), (end).gobj());
}

void PathBuilder::move_to(float x, float y)
{
  gsk_path_builder_move_to(gobj(), x, y);
}

void PathBuilder::rel_move_to(float x, float y)
{
  gsk_path_builder_rel_move_to(gobj(), x, y);
}

void PathBuilder::line_to(float x, float y)
{
  gsk_path_builder_line_to(gobj(), x, y);
}

void PathBuilder::rel_line_to(float x, float y)
{
  gsk_path_builder_rel_line_to(gobj(), x, y);
}

void PathBuilder::quad_to(float x1, float y1, float x2, float y2)
{
  gsk_path_builder_quad_to(gobj(), x1, y1, x2, y2);
}

void PathBuilder::rel_quad_to(float x1, float y1, float x2, float y2)
{
  gsk_path_builder_rel_quad_to(gobj(), x1, y1, x2, y2);
}

void PathBuilder::cubic_to(float x1, float y1, float x2, float y2, float x3, float y3)
{
  gsk_path_builder_cubic_to(gobj(), x1, y1, x2, y2, x3, y3);
}

void PathBuilder::rel_cubic_to(float x1, float y1, float x2, float y2, float x3, float y3)
{
  gsk_path_builder_rel_cubic_to(gobj(), x1, y1, x2, y2, x3, y3);
}

void PathBuilder::conic_to(float x1, float y1, float x2, float y2, float weight)
{
  gsk_path_builder_conic_to(gobj(), x1, y1, x2, y2, weight);
}

void PathBuilder::rel_conic_to(float x1, float y1, float x2, float y2, float weight)
{
  gsk_path_builder_rel_conic_to(gobj(), x1, y1, x2, y2, weight);
}

void PathBuilder::arc_to(float x1, float y1, float x2, float y2)
{
  gsk_path_builder_arc_to(gobj(), x1, y1, x2, y2);
}

void PathBuilder::rel_arc_to(float x1, float y1, float x2, float y2)
{
  gsk_path_builder_rel_arc_to(gobj(), x1, y1, x2, y2);
}

void PathBuilder::svg_arc_to(float rx, float ry, float x_axis_rotation, bool large_arc, bool positive_sweep, float x, float y)
{
  gsk_path_builder_svg_arc_to(gobj(), rx, ry, x_axis_rotation, static_cast<int>(large_arc), static_cast<int>(positive_sweep), x, y);
}

void PathBuilder::rel_svg_arc_to(float rx, float ry, float x_axis_rotation, bool large_arc, bool positive_sweep, float x, float y)
{
  gsk_path_builder_rel_svg_arc_to(gobj(), rx, ry, x_axis_rotation, static_cast<int>(large_arc), static_cast<int>(positive_sweep), x, y);
}

void PathBuilder::html_arc_to(float x1, float y1, float x2, float y2, float radius)
{
  gsk_path_builder_html_arc_to(gobj(), x1, y1, x2, y2, radius);
}

void PathBuilder::rel_html_arc_to(float x1, float y1, float x2, float y2, float radius)
{
  gsk_path_builder_rel_html_arc_to(gobj(), x1, y1, x2, y2, radius);
}

void PathBuilder::close()
{
  gsk_path_builder_close(gobj());
}


} // namespace Gsk


