/* intersectors.c generated by valac 0.56.0, the Vala compiler
 * generated from intersectors.vala, do not modify */

#include "livechart_static.h"
#include <glib-object.h>
#include <glib.h>
#include <float.h>
#include <math.h>
#include <gee.h>
#include <gobject/gvaluecollector.h>

#define _live_chart_region_unref0(var) ((var == NULL) ? NULL : (var = (live_chart_region_unref (var), NULL)))
#define _live_chart_config_unref0(var) ((var == NULL) ? NULL : (var = (live_chart_config_unref (var), NULL)))
#define _live_chart_bezier_curve_free0(var) ((var == NULL) ? NULL : (var = (live_chart_bezier_curve_free (var), NULL)))
typedef struct _Block2Data Block2Data;
#define _live_chart_bezier_intersector_unref0(var) ((var == NULL) ? NULL : (var = (live_chart_bezier_intersector_unref (var), NULL)))
#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))
typedef struct _LiveChartParamSpecBezierIntersector LiveChartParamSpecBezierIntersector;

struct _LiveChartBezierIntersectorPrivate {
	LiveChartRegion* region;
	LiveChartConfig* config;
};

struct _Block2Data {
	int _ref_count_;
	LiveChartBezierIntersector* self;
	LiveChartBezierCurve* path;
};

struct _LiveChartParamSpecBezierIntersector {
	GParamSpec parent_instance;
};

static gint LiveChartBezierIntersector_private_offset;
static gpointer live_chart_bezier_intersector_parent_class = NULL;
static LiveChartIntersectorIface * live_chart_bezier_intersector_live_chart_intersector_parent_iface = NULL;

static GType live_chart_intersector_get_type_once (void);
static void live_chart_bezier_intersector_real_intersect (LiveChartIntersector* base,
                                                   LiveChartIntersections* intersections,
                                                   LiveChartPoint* previous,
                                                   LiveChartPoint* current,
                                                   LiveChartBezierCurve* path);
static Block2Data* block2_data_ref (Block2Data* _data2_);
static void block2_data_unref (void * _userdata_);
static LiveChartCoord* __lambda12_ (Block2Data* _data2_,
                             gdouble value);
static LiveChartCoord* live_chart_bezier_intersector_intersect_at (LiveChartBezierIntersector* self,
                                                            LiveChartConfig* config,
                                                            LiveChartBezierCurve* curve,
                                                            gdouble at_value);
static LiveChartCoord* ___lambda12__live_chart_get_intersection (gdouble at_value,
                                                          gpointer self);
static void live_chart_bezier_intersector_create_intersection_segment_at (LiveChartBezierIntersector* self,
                                                                   LiveChartConfig* config,
                                                                   gdouble at_y,
                                                                   LiveChartSegment* result);
static void live_chart_bezier_intersector_finalize (LiveChartBezierIntersector * obj);
static GType live_chart_bezier_intersector_get_type_once (void);

void
live_chart_intersector_intersect (LiveChartIntersector* self,
                                  LiveChartIntersections* intersections,
                                  LiveChartPoint* previous,
                                  LiveChartPoint* current,
                                  gconstpointer path)
{
	LiveChartIntersectorIface* _iface_;
#line 3 "../src/intersectors.vala"
	g_return_if_fail (self != NULL);
#line 3 "../src/intersectors.vala"
	_iface_ = LIVE_CHART_INTERSECTOR_GET_INTERFACE (self);
#line 3 "../src/intersectors.vala"
	if (_iface_->intersect) {
#line 3 "../src/intersectors.vala"
		_iface_->intersect (self, intersections, previous, current, path);
#line 79 "intersectors.c"
	}
}

static void
live_chart_intersector_default_init (LiveChartIntersectorIface * iface,
                                     gpointer iface_data)
{
}

static GType
live_chart_intersector_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (LiveChartIntersectorIface), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) live_chart_intersector_default_init, (GClassFinalizeFunc) NULL, NULL, 0, 0, (GInstanceInitFunc) NULL, NULL };
	GType live_chart_intersector_type_id;
	live_chart_intersector_type_id = g_type_register_static (G_TYPE_INTERFACE, "LiveChartIntersector", &g_define_type_info, 0);
	return live_chart_intersector_type_id;
}

GType
live_chart_intersector_get_type (void)
{
	static volatile gsize live_chart_intersector_type_id__once = 0;
	if (g_once_init_enter (&live_chart_intersector_type_id__once)) {
		GType live_chart_intersector_type_id;
		live_chart_intersector_type_id = live_chart_intersector_get_type_once ();
		g_once_init_leave (&live_chart_intersector_type_id__once, live_chart_intersector_type_id);
	}
	return live_chart_intersector_type_id__once;
}

static inline gpointer
live_chart_bezier_intersector_get_instance_private (LiveChartBezierIntersector* self)
{
	return G_STRUCT_MEMBER_P (self, LiveChartBezierIntersector_private_offset);
}

static gpointer
_live_chart_region_ref0 (gpointer self)
{
#line 11 "../src/intersectors.vala"
	return self ? live_chart_region_ref (self) : NULL;
#line 121 "intersectors.c"
}

static gpointer
_live_chart_config_ref0 (gpointer self)
{
#line 12 "../src/intersectors.vala"
	return self ? live_chart_config_ref (self) : NULL;
#line 129 "intersectors.c"
}

LiveChartBezierIntersector*
live_chart_bezier_intersector_construct (GType object_type,
                                         LiveChartRegion* region,
                                         LiveChartConfig* config)
{
	LiveChartBezierIntersector* self = NULL;
	LiveChartRegion* _tmp0_;
	LiveChartConfig* _tmp1_;
#line 10 "../src/intersectors.vala"
	g_return_val_if_fail (region != NULL, NULL);
#line 10 "../src/intersectors.vala"
	g_return_val_if_fail (config != NULL, NULL);
#line 10 "../src/intersectors.vala"
	self = (LiveChartBezierIntersector*) g_type_create_instance (object_type);
#line 11 "../src/intersectors.vala"
	_tmp0_ = _live_chart_region_ref0 (region);
#line 11 "../src/intersectors.vala"
	_live_chart_region_unref0 (self->priv->region);
#line 11 "../src/intersectors.vala"
	self->priv->region = _tmp0_;
#line 12 "../src/intersectors.vala"
	_tmp1_ = _live_chart_config_ref0 (config);
#line 12 "../src/intersectors.vala"
	_live_chart_config_unref0 (self->priv->config);
#line 12 "../src/intersectors.vala"
	self->priv->config = _tmp1_;
#line 10 "../src/intersectors.vala"
	return self;
#line 160 "intersectors.c"
}

LiveChartBezierIntersector*
live_chart_bezier_intersector_new (LiveChartRegion* region,
                                   LiveChartConfig* config)
{
#line 10 "../src/intersectors.vala"
	return live_chart_bezier_intersector_construct (LIVE_CHART_TYPE_BEZIER_INTERSECTOR, region, config);
#line 169 "intersectors.c"
}

static gpointer
_live_chart_bezier_curve_dup0 (gpointer self)
{
#line 15 "../src/intersectors.vala"
	return self ? live_chart_bezier_curve_dup (self) : NULL;
#line 177 "intersectors.c"
}

static Block2Data*
block2_data_ref (Block2Data* _data2_)
{
#line 15 "../src/intersectors.vala"
	g_atomic_int_inc (&_data2_->_ref_count_);
#line 15 "../src/intersectors.vala"
	return _data2_;
#line 187 "intersectors.c"
}

static void
block2_data_unref (void * _userdata_)
{
	Block2Data* _data2_;
	_data2_ = (Block2Data*) _userdata_;
#line 15 "../src/intersectors.vala"
	if (g_atomic_int_dec_and_test (&_data2_->_ref_count_)) {
#line 197 "intersectors.c"
		LiveChartBezierIntersector* self;
#line 15 "../src/intersectors.vala"
		self = _data2_->self;
#line 15 "../src/intersectors.vala"
		_live_chart_bezier_curve_free0 (_data2_->path);
#line 15 "../src/intersectors.vala"
		_live_chart_bezier_intersector_unref0 (self);
#line 15 "../src/intersectors.vala"
		g_slice_free (Block2Data, _data2_);
#line 207 "intersectors.c"
	}
}

static LiveChartCoord*
__lambda12_ (Block2Data* _data2_,
             gdouble value)
{
	LiveChartBezierIntersector* self;
	LiveChartConfig* _tmp0_;
	LiveChartBezierCurve _tmp1_;
	LiveChartCoord* _tmp2_;
	LiveChartCoord* result;
#line 16 "../src/intersectors.vala"
	self = _data2_->self;
#line 17 "../src/intersectors.vala"
	_tmp0_ = self->priv->config;
#line 17 "../src/intersectors.vala"
	_tmp1_ = *_data2_->path;
#line 17 "../src/intersectors.vala"
	_tmp2_ = live_chart_bezier_intersector_intersect_at (self, _tmp0_, &_tmp1_, value);
#line 17 "../src/intersectors.vala"
	result = _tmp2_;
#line 17 "../src/intersectors.vala"
	return result;
#line 232 "intersectors.c"
}

static LiveChartCoord*
___lambda12__live_chart_get_intersection (gdouble at_value,
                                          gpointer self)
{
	LiveChartCoord* result;
	result = __lambda12_ (self, at_value);
#line 16 "../src/intersectors.vala"
	return result;
#line 243 "intersectors.c"
}

static void
live_chart_bezier_intersector_real_intersect (LiveChartIntersector* base,
                                              LiveChartIntersections* intersections,
                                              LiveChartPoint* previous,
                                              LiveChartPoint* current,
                                              LiveChartBezierCurve* path)
{
	LiveChartBezierIntersector * self;
	Block2Data* _data2_;
	LiveChartBezierCurve* _tmp0_;
	LiveChartRegion* _tmp1_;
	LiveChartPoint _tmp2_;
	LiveChartPoint _tmp3_;
#line 15 "../src/intersectors.vala"
	self = (LiveChartBezierIntersector*) base;
#line 15 "../src/intersectors.vala"
	g_return_if_fail (intersections != NULL);
#line 15 "../src/intersectors.vala"
	g_return_if_fail (previous != NULL);
#line 15 "../src/intersectors.vala"
	g_return_if_fail (current != NULL);
#line 15 "../src/intersectors.vala"
	_data2_ = g_slice_new0 (Block2Data);
#line 15 "../src/intersectors.vala"
	_data2_->_ref_count_ = 1;
#line 15 "../src/intersectors.vala"
	_data2_->self = live_chart_bezier_intersector_ref (self);
#line 15 "../src/intersectors.vala"
	_tmp0_ = _live_chart_bezier_curve_dup0 (path);
#line 15 "../src/intersectors.vala"
	_live_chart_bezier_curve_free0 (_data2_->path);
#line 15 "../src/intersectors.vala"
	_data2_->path = _tmp0_;
#line 16 "../src/intersectors.vala"
	_tmp1_ = self->priv->region;
#line 16 "../src/intersectors.vala"
	_tmp2_ = *previous;
#line 16 "../src/intersectors.vala"
	_tmp3_ = *current;
#line 16 "../src/intersectors.vala"
	live_chart_region_handle (_tmp1_, intersections, &_tmp2_, &_tmp3_, ___lambda12__live_chart_get_intersection, _data2_);
#line 15 "../src/intersectors.vala"
	block2_data_unref (_data2_);
#line 15 "../src/intersectors.vala"
	_data2_ = NULL;
#line 291 "intersectors.c"
}

static LiveChartCoord*
live_chart_bezier_intersector_intersect_at (LiveChartBezierIntersector* self,
                                            LiveChartConfig* config,
                                            LiveChartBezierCurve* curve,
                                            gdouble at_value)
{
	LiveChartSegment intersection_segment = {0};
	LiveChartSegment _tmp0_ = {0};
	GeeList* intersections = NULL;
	LiveChartSegment _tmp1_;
	LiveChartBezierCurve _tmp2_;
	GeeList* _tmp3_;
	GeeList* _tmp4_;
	gint _tmp5_;
	gint _tmp6_;
	LiveChartCoord* result;
#line 21 "../src/intersectors.vala"
	g_return_val_if_fail (self != NULL, NULL);
#line 21 "../src/intersectors.vala"
	g_return_val_if_fail (config != NULL, NULL);
#line 21 "../src/intersectors.vala"
	g_return_val_if_fail (curve != NULL, NULL);
#line 22 "../src/intersectors.vala"
	live_chart_bezier_intersector_create_intersection_segment_at (self, config, at_value, &_tmp0_);
#line 22 "../src/intersectors.vala"
	intersection_segment = _tmp0_;
#line 23 "../src/intersectors.vala"
	_tmp1_ = intersection_segment;
#line 23 "../src/intersectors.vala"
	_tmp2_ = *curve;
#line 23 "../src/intersectors.vala"
	_tmp3_ = live_chart_find_intersections_between (&_tmp1_, &_tmp2_);
#line 23 "../src/intersectors.vala"
	intersections = _tmp3_;
#line 24 "../src/intersectors.vala"
	_tmp4_ = intersections;
#line 24 "../src/intersectors.vala"
	_tmp5_ = gee_collection_get_size ((GeeCollection*) _tmp4_);
#line 24 "../src/intersectors.vala"
	_tmp6_ = _tmp5_;
#line 24 "../src/intersectors.vala"
	if (_tmp6_ > 0) {
#line 336 "intersectors.c"
		GeeList* _tmp7_;
		gpointer _tmp8_;
#line 25 "../src/intersectors.vala"
		_tmp7_ = intersections;
#line 25 "../src/intersectors.vala"
		_tmp8_ = gee_list_first (_tmp7_);
#line 25 "../src/intersectors.vala"
		result = (LiveChartCoord*) _tmp8_;
#line 25 "../src/intersectors.vala"
		_g_object_unref0 (intersections);
#line 25 "../src/intersectors.vala"
		return result;
#line 349 "intersectors.c"
	}
#line 27 "../src/intersectors.vala"
	result = NULL;
#line 27 "../src/intersectors.vala"
	_g_object_unref0 (intersections);
#line 27 "../src/intersectors.vala"
	return result;
#line 357 "intersectors.c"
}

static void
live_chart_bezier_intersector_create_intersection_segment_at (LiveChartBezierIntersector* self,
                                                              LiveChartConfig* config,
                                                              gdouble at_y,
                                                              LiveChartSegment* result)
{
	LiveChartBoundaries boundaries = {0};
	LiveChartBoundaries _tmp0_ = {0};
	gdouble y = 0.0;
	LiveChartBoundaries _tmp1_;
	LiveChartBoundary _tmp2_;
	LiveChartYAxis* _tmp3_;
	LiveChartBoundaries _tmp4_;
	LiveChartBoundary _tmp5_;
	LiveChartCoord _tmp6_ = {0};
	LiveChartBoundaries _tmp7_;
	LiveChartBoundary _tmp8_;
	LiveChartCoord _tmp9_ = {0};
	LiveChartSegment _tmp10_ = {0};
#line 30 "../src/intersectors.vala"
	g_return_if_fail (self != NULL);
#line 30 "../src/intersectors.vala"
	g_return_if_fail (config != NULL);
#line 31 "../src/intersectors.vala"
	live_chart_config_boundaries (config, &_tmp0_);
#line 31 "../src/intersectors.vala"
	boundaries = _tmp0_;
#line 32 "../src/intersectors.vala"
	_tmp1_ = boundaries;
#line 32 "../src/intersectors.vala"
	_tmp2_ = _tmp1_.y;
#line 32 "../src/intersectors.vala"
	_tmp3_ = config->y_axis;
#line 32 "../src/intersectors.vala"
	y = _tmp2_.max - (at_y * live_chart_yaxis_get_ratio (_tmp3_));
#line 33 "../src/intersectors.vala"
	_tmp4_ = boundaries;
#line 33 "../src/intersectors.vala"
	_tmp5_ = _tmp4_.x;
#line 33 "../src/intersectors.vala"
	_tmp6_.x = (gdouble) _tmp5_.min;
#line 33 "../src/intersectors.vala"
	_tmp6_.y = y;
#line 33 "../src/intersectors.vala"
	_tmp7_ = boundaries;
#line 33 "../src/intersectors.vala"
	_tmp8_ = _tmp7_.x;
#line 33 "../src/intersectors.vala"
	_tmp9_.x = (gdouble) _tmp8_.max;
#line 33 "../src/intersectors.vala"
	_tmp9_.y = y;
#line 33 "../src/intersectors.vala"
	_tmp10_.from = _tmp6_;
#line 33 "../src/intersectors.vala"
	_tmp10_.to = _tmp9_;
#line 33 "../src/intersectors.vala"
	*result = _tmp10_;
#line 33 "../src/intersectors.vala"
	return;
#line 419 "intersectors.c"
}

static void
live_chart_value_bezier_intersector_init (GValue* value)
{
#line 6 "../src/intersectors.vala"
	value->data[0].v_pointer = NULL;
#line 427 "intersectors.c"
}

static void
live_chart_value_bezier_intersector_free_value (GValue* value)
{
#line 6 "../src/intersectors.vala"
	if (value->data[0].v_pointer) {
#line 6 "../src/intersectors.vala"
		live_chart_bezier_intersector_unref (value->data[0].v_pointer);
#line 437 "intersectors.c"
	}
}

static void
live_chart_value_bezier_intersector_copy_value (const GValue* src_value,
                                                GValue* dest_value)
{
#line 6 "../src/intersectors.vala"
	if (src_value->data[0].v_pointer) {
#line 6 "../src/intersectors.vala"
		dest_value->data[0].v_pointer = live_chart_bezier_intersector_ref (src_value->data[0].v_pointer);
#line 449 "intersectors.c"
	} else {
#line 6 "../src/intersectors.vala"
		dest_value->data[0].v_pointer = NULL;
#line 453 "intersectors.c"
	}
}

static gpointer
live_chart_value_bezier_intersector_peek_pointer (const GValue* value)
{
#line 6 "../src/intersectors.vala"
	return value->data[0].v_pointer;
#line 462 "intersectors.c"
}

static gchar*
live_chart_value_bezier_intersector_collect_value (GValue* value,
                                                   guint n_collect_values,
                                                   GTypeCValue* collect_values,
                                                   guint collect_flags)
{
#line 6 "../src/intersectors.vala"
	if (collect_values[0].v_pointer) {
#line 473 "intersectors.c"
		LiveChartBezierIntersector * object;
		object = collect_values[0].v_pointer;
#line 6 "../src/intersectors.vala"
		if (object->parent_instance.g_class == NULL) {
#line 6 "../src/intersectors.vala"
			return g_strconcat ("invalid unclassed object pointer for value type `", G_VALUE_TYPE_NAME (value), "'", NULL);
#line 480 "intersectors.c"
		} else if (!g_value_type_compatible (G_TYPE_FROM_INSTANCE (object), G_VALUE_TYPE (value))) {
#line 6 "../src/intersectors.vala"
			return g_strconcat ("invalid object type `", g_type_name (G_TYPE_FROM_INSTANCE (object)), "' for value type `", G_VALUE_TYPE_NAME (value), "'", NULL);
#line 484 "intersectors.c"
		}
#line 6 "../src/intersectors.vala"
		value->data[0].v_pointer = live_chart_bezier_intersector_ref (object);
#line 488 "intersectors.c"
	} else {
#line 6 "../src/intersectors.vala"
		value->data[0].v_pointer = NULL;
#line 492 "intersectors.c"
	}
#line 6 "../src/intersectors.vala"
	return NULL;
#line 496 "intersectors.c"
}

static gchar*
live_chart_value_bezier_intersector_lcopy_value (const GValue* value,
                                                 guint n_collect_values,
                                                 GTypeCValue* collect_values,
                                                 guint collect_flags)
{
	LiveChartBezierIntersector ** object_p;
	object_p = collect_values[0].v_pointer;
#line 6 "../src/intersectors.vala"
	if (!object_p) {
#line 6 "../src/intersectors.vala"
		return g_strdup_printf ("value location for `%s' passed as NULL", G_VALUE_TYPE_NAME (value));
#line 511 "intersectors.c"
	}
#line 6 "../src/intersectors.vala"
	if (!value->data[0].v_pointer) {
#line 6 "../src/intersectors.vala"
		*object_p = NULL;
#line 517 "intersectors.c"
	} else if (collect_flags & G_VALUE_NOCOPY_CONTENTS) {
#line 6 "../src/intersectors.vala"
		*object_p = value->data[0].v_pointer;
#line 521 "intersectors.c"
	} else {
#line 6 "../src/intersectors.vala"
		*object_p = live_chart_bezier_intersector_ref (value->data[0].v_pointer);
#line 525 "intersectors.c"
	}
#line 6 "../src/intersectors.vala"
	return NULL;
#line 529 "intersectors.c"
}

GParamSpec*
live_chart_param_spec_bezier_intersector (const gchar* name,
                                          const gchar* nick,
                                          const gchar* blurb,
                                          GType object_type,
                                          GParamFlags flags)
{
	LiveChartParamSpecBezierIntersector* spec;
#line 6 "../src/intersectors.vala"
	g_return_val_if_fail (g_type_is_a (object_type, LIVE_CHART_TYPE_BEZIER_INTERSECTOR), NULL);
#line 6 "../src/intersectors.vala"
	spec = g_param_spec_internal (G_TYPE_PARAM_OBJECT, name, nick, blurb, flags);
#line 6 "../src/intersectors.vala"
	G_PARAM_SPEC (spec)->value_type = object_type;
#line 6 "../src/intersectors.vala"
	return G_PARAM_SPEC (spec);
#line 548 "intersectors.c"
}

gpointer
live_chart_value_get_bezier_intersector (const GValue* value)
{
#line 6 "../src/intersectors.vala"
	g_return_val_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, LIVE_CHART_TYPE_BEZIER_INTERSECTOR), NULL);
#line 6 "../src/intersectors.vala"
	return value->data[0].v_pointer;
#line 558 "intersectors.c"
}

void
live_chart_value_set_bezier_intersector (GValue* value,
                                         gpointer v_object)
{
	LiveChartBezierIntersector * old;
#line 6 "../src/intersectors.vala"
	g_return_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, LIVE_CHART_TYPE_BEZIER_INTERSECTOR));
#line 6 "../src/intersectors.vala"
	old = value->data[0].v_pointer;
#line 6 "../src/intersectors.vala"
	if (v_object) {
#line 6 "../src/intersectors.vala"
		g_return_if_fail (G_TYPE_CHECK_INSTANCE_TYPE (v_object, LIVE_CHART_TYPE_BEZIER_INTERSECTOR));
#line 6 "../src/intersectors.vala"
		g_return_if_fail (g_value_type_compatible (G_TYPE_FROM_INSTANCE (v_object), G_VALUE_TYPE (value)));
#line 6 "../src/intersectors.vala"
		value->data[0].v_pointer = v_object;
#line 6 "../src/intersectors.vala"
		live_chart_bezier_intersector_ref (value->data[0].v_pointer);
#line 580 "intersectors.c"
	} else {
#line 6 "../src/intersectors.vala"
		value->data[0].v_pointer = NULL;
#line 584 "intersectors.c"
	}
#line 6 "../src/intersectors.vala"
	if (old) {
#line 6 "../src/intersectors.vala"
		live_chart_bezier_intersector_unref (old);
#line 590 "intersectors.c"
	}
}

void
live_chart_value_take_bezier_intersector (GValue* value,
                                          gpointer v_object)
{
	LiveChartBezierIntersector * old;
#line 6 "../src/intersectors.vala"
	g_return_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, LIVE_CHART_TYPE_BEZIER_INTERSECTOR));
#line 6 "../src/intersectors.vala"
	old = value->data[0].v_pointer;
#line 6 "../src/intersectors.vala"
	if (v_object) {
#line 6 "../src/intersectors.vala"
		g_return_if_fail (G_TYPE_CHECK_INSTANCE_TYPE (v_object, LIVE_CHART_TYPE_BEZIER_INTERSECTOR));
#line 6 "../src/intersectors.vala"
		g_return_if_fail (g_value_type_compatible (G_TYPE_FROM_INSTANCE (v_object), G_VALUE_TYPE (value)));
#line 6 "../src/intersectors.vala"
		value->data[0].v_pointer = v_object;
#line 611 "intersectors.c"
	} else {
#line 6 "../src/intersectors.vala"
		value->data[0].v_pointer = NULL;
#line 615 "intersectors.c"
	}
#line 6 "../src/intersectors.vala"
	if (old) {
#line 6 "../src/intersectors.vala"
		live_chart_bezier_intersector_unref (old);
#line 621 "intersectors.c"
	}
}

static void
live_chart_bezier_intersector_class_init (LiveChartBezierIntersectorClass * klass,
                                          gpointer klass_data)
{
#line 6 "../src/intersectors.vala"
	live_chart_bezier_intersector_parent_class = g_type_class_peek_parent (klass);
#line 6 "../src/intersectors.vala"
	((LiveChartBezierIntersectorClass *) klass)->finalize = live_chart_bezier_intersector_finalize;
#line 6 "../src/intersectors.vala"
	g_type_class_adjust_private_offset (klass, &LiveChartBezierIntersector_private_offset);
#line 635 "intersectors.c"
}

static void
live_chart_bezier_intersector_live_chart_intersector_interface_init (LiveChartIntersectorIface * iface,
                                                                     gpointer iface_data)
{
#line 6 "../src/intersectors.vala"
	live_chart_bezier_intersector_live_chart_intersector_parent_iface = g_type_interface_peek_parent (iface);
#line 6 "../src/intersectors.vala"
	iface->intersect = (void (*) (LiveChartIntersector*, LiveChartIntersections*, LiveChartPoint*, LiveChartPoint*, gconstpointer)) live_chart_bezier_intersector_real_intersect;
#line 646 "intersectors.c"
}

static void
live_chart_bezier_intersector_instance_init (LiveChartBezierIntersector * self,
                                             gpointer klass)
{
#line 6 "../src/intersectors.vala"
	self->priv = live_chart_bezier_intersector_get_instance_private (self);
#line 6 "../src/intersectors.vala"
	self->ref_count = 1;
#line 657 "intersectors.c"
}

static void
live_chart_bezier_intersector_finalize (LiveChartBezierIntersector * obj)
{
	LiveChartBezierIntersector * self;
#line 6 "../src/intersectors.vala"
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, LIVE_CHART_TYPE_BEZIER_INTERSECTOR, LiveChartBezierIntersector);
#line 6 "../src/intersectors.vala"
	g_signal_handlers_destroy (self);
#line 7 "../src/intersectors.vala"
	_live_chart_region_unref0 (self->priv->region);
#line 8 "../src/intersectors.vala"
	_live_chart_config_unref0 (self->priv->config);
#line 672 "intersectors.c"
}

static GType
live_chart_bezier_intersector_get_type_once (void)
{
	static const GTypeValueTable g_define_type_value_table = { live_chart_value_bezier_intersector_init, live_chart_value_bezier_intersector_free_value, live_chart_value_bezier_intersector_copy_value, live_chart_value_bezier_intersector_peek_pointer, "p", live_chart_value_bezier_intersector_collect_value, "p", live_chart_value_bezier_intersector_lcopy_value };
	static const GTypeInfo g_define_type_info = { sizeof (LiveChartBezierIntersectorClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) live_chart_bezier_intersector_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (LiveChartBezierIntersector), 0, (GInstanceInitFunc) live_chart_bezier_intersector_instance_init, &g_define_type_value_table };
	static const GTypeFundamentalInfo g_define_type_fundamental_info = { (G_TYPE_FLAG_CLASSED | G_TYPE_FLAG_INSTANTIATABLE | G_TYPE_FLAG_DERIVABLE | G_TYPE_FLAG_DEEP_DERIVABLE) };
	static const GInterfaceInfo live_chart_intersector_info = { (GInterfaceInitFunc) live_chart_bezier_intersector_live_chart_intersector_interface_init, (GInterfaceFinalizeFunc) NULL, NULL};
	GType live_chart_bezier_intersector_type_id;
	live_chart_bezier_intersector_type_id = g_type_register_fundamental (g_type_fundamental_next (), "LiveChartBezierIntersector", &g_define_type_info, &g_define_type_fundamental_info, 0);
	g_type_add_interface_static (live_chart_bezier_intersector_type_id, LIVE_CHART_TYPE_INTERSECTOR, &live_chart_intersector_info);
	LiveChartBezierIntersector_private_offset = g_type_add_instance_private (live_chart_bezier_intersector_type_id, sizeof (LiveChartBezierIntersectorPrivate));
	return live_chart_bezier_intersector_type_id;
}

GType
live_chart_bezier_intersector_get_type (void)
{
	static volatile gsize live_chart_bezier_intersector_type_id__once = 0;
	if (g_once_init_enter (&live_chart_bezier_intersector_type_id__once)) {
		GType live_chart_bezier_intersector_type_id;
		live_chart_bezier_intersector_type_id = live_chart_bezier_intersector_get_type_once ();
		g_once_init_leave (&live_chart_bezier_intersector_type_id__once, live_chart_bezier_intersector_type_id);
	}
	return live_chart_bezier_intersector_type_id__once;
}

gpointer
live_chart_bezier_intersector_ref (gpointer instance)
{
	LiveChartBezierIntersector * self;
	self = instance;
#line 6 "../src/intersectors.vala"
	g_atomic_int_inc (&self->ref_count);
#line 6 "../src/intersectors.vala"
	return instance;
#line 710 "intersectors.c"
}

void
live_chart_bezier_intersector_unref (gpointer instance)
{
	LiveChartBezierIntersector * self;
	self = instance;
#line 6 "../src/intersectors.vala"
	if (g_atomic_int_dec_and_test (&self->ref_count)) {
#line 6 "../src/intersectors.vala"
		LIVE_CHART_BEZIER_INTERSECTOR_GET_CLASS (self)->finalize (self);
#line 6 "../src/intersectors.vala"
		g_type_free_instance ((GTypeInstance *) self);
#line 724 "intersectors.c"
	}
}

