// Generated by gmmproc 2.86.0 -- DO NOT MODIFY!
#ifndef _GSKMM_STROKE_H
#define _GSKMM_STROKE_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 <gskmm/enums.h>
#include <cairomm/context.h>
#include <gsk/gsk.h> // GskStroke
#include <vector>

#ifndef DOXYGEN_SHOULD_SKIP_THIS
extern "C" { typedef struct _GskStroke GskStroke; }
#endif

namespace Gsk
{
/** Collects the parameters that are needed when stroking a path.
 *
 * @newin{4,24}
 */
class GSKMM_API Stroke
{
  public:
#ifndef DOXYGEN_SHOULD_SKIP_THIS
  using CppObjectType = Stroke;
  using BaseObjectType = GskStroke;
#endif /* DOXYGEN_SHOULD_SKIP_THIS */

  /** Get the GType for this class, for use with the underlying GObject type system.
   */
  static GType get_type() G_GNUC_CONST;

  Stroke();

  explicit Stroke(GskStroke* gobject, bool make_a_copy = true);

  Stroke(const Stroke& other);
  Stroke& operator=(const Stroke& other);

  Stroke(Stroke&& other) noexcept;
  Stroke& operator=(Stroke&& other) noexcept;

  ~Stroke() noexcept;

  void swap(Stroke& other) noexcept;

  ///Provides access to the underlying C instance.
  GskStroke*       gobj()       { return gobject_; }

  ///Provides access to the underlying C instance.
  const GskStroke* gobj() const { return gobject_; }

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

protected:
  GskStroke* gobject_;

private:

  
public:
  Stroke(float line_width);

  
  /** Checks if two strokes are identical.
   * 
   * @newin{4,24}
   * 
   * @param stroke2 The second stroke.
   * @return True if the two strokes are equal, false otherwise.
   */
  bool equal(const Stroke& stroke2) const;
  
  /** Sets the line width to be used when stroking.
   * 
   * The line width must be >= 0.
   * 
   * @newin{4,24}
   * 
   * @param line_width Width of the line in pixels.
   */
  void set_line_width(float line_width);
  
  /** Gets the line width used.
   * 
   * @newin{4,24}
   * 
   * @return The line width.
   */
  float get_line_width() const;
  
  /** Sets the line cap to be used when stroking.
   * 
   * See Gsk::LineCap for details.
   * 
   * @newin{4,24}
   * 
   * @param line_cap The line cap.
   */
  void _set_line_cap(LineCap line_cap);
  
  /** Gets the line cap used.
   * 
   * See Gsk::LineCap for details.
   * 
   * @newin{4,24}
   * 
   * @return The line cap.
   */
  LineCap get_line_cap() const;
  
  /** Sets the line join to be used when stroking.
   * 
   * See Gsk::LineJoin for details.
   * 
   * @newin{4,24}
   * 
   * @param line_join The line join to use.
   */
  void _set_line_join(LineJoin line_join);
  
  /** Gets the line join used.
   * 
   * See Gsk::LineJoin for details.
   * 
   * @newin{4,24}
   * 
   * @return The line join.
   */
  LineJoin get_line_join() const;
  
  /** Sets the miter limit to be used when stroking.
   * 
   * The miter limit is the distance from the corner where sharp
   * turns of joins get cut off.
   * 
   * The limit is specfied in units of line width and must be non-negative.
   * 
   * For joins of type [enum@Gsk.LineJoin.miter] that exceed the miter limit,
   * the join gets rendered as if it was of type [enum@Gsk.LineJoin.bevel].
   * 
   * @newin{4,24}
   * 
   * @param limit The miter limit.
   */
  void set_miter_limit(float limit);
  
  /** Gets the miter limit.
   * 
   * @newin{4,24}
   * 
   * @return The miter limit.
   */
  float get_miter_limit() const;

  /** Sets the dash pattern to use.
   *
   * A dash pattern is specified by a vector of alternating non-negative
   * values. Each value provides the length of alternate "on" and "off"
   * portions of the stroke.
   *
   * Each "on" segment will have caps applied as if the segment were a
   * separate contour. In particular, it is valid to use an "on" length
   * of 0 with Gsk::LineCap::ROUND or Gsk::LineCap::SQUARE
   * to draw dots or squares along a path.
   * 
   * If @a dash is an empty vector, if all elements in @a dash are 0, or if there are
   * negative values in @a dash, then dashing is disabled.
   *
   * If @a dash.size() is 1, an alternating "on" and "off" pattern with the
   * single dash length provided is assumed.
   *
   * If @a dash.size() is uneven, the dash vector will be used with the first
   * element in @a dash defining an "on" or "off" in alternating passes
   * through the vector.
   *
   * You can specify a starting offset into the dash with set_dash_offset().
   *
   * @newin{4,24}
   *
   * @param dash The vector of dashes.
   */
  void set_dash(const std::vector<float>& dash);
  

  /** Gets the dash vector in use.
   *
   * @newin{4,24}
   *
   * @return The dash vector. Can be empty.
   */
  std::vector<float> get_dash() const;
  

  /** Sets the offset into the dash pattern where dashing should begin.
   * 
   * This is an offset into the length of the path, not an index into
   * the array values of the dash array.
   * 
   * See set_dash() for more details on dashing.
   * 
   * @newin{4,24}
   * 
   * @param offset Offset into the dash pattern.
   */
  void set_dash_offset(float offset);
  
  /** Gets the dash offset.
   * 
   * @newin{4,24}
   * 
   * @return The dash offset.
   */
  float get_dash_offset() const;
  
  /** A helper function that sets the stroke parameters
   * of a cairo context from a `Gsk::Stroke`.
   * 
   * @newin{4,24}
   * 
   * @param cr The cairo context to configure.
   */
  void to_cairo(const ::Cairo::RefPtr< ::Cairo::Context>& cr) const;


};

} // namespace Gsk


namespace Gsk
{

/** @relates Gsk::Stroke
 * @param lhs The left-hand side
 * @param rhs The right-hand side
 */
inline void swap(Stroke& lhs, Stroke& rhs) noexcept
  { lhs.swap(rhs); }

} // 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::Stroke
 */
GSKMM_API
Gsk::Stroke wrap(GskStroke* object, bool take_copy = false);

#ifndef DOXYGEN_SHOULD_SKIP_THIS
template <>
class GSKMM_API Value<Gsk::Stroke> : public Glib::Value_Boxed<Gsk::Stroke>
{};
#endif /* DOXYGEN_SHOULD_SKIP_THIS */

} // namespace Glib


#endif /* _GSKMM_STROKE_H */

