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

/*
Copyright (C) 2015 Johan Mattsson

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 3 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.
*/

#include "birdfont.h"
#include <glib.h>
#include <stdlib.h>
#include <string.h>
#include <glib-object.h>
#include <gee.h>
#include <float.h>
#include <math.h>
#include <stdio.h>

#if !defined(VALA_STRICT_C)
#if !defined(__clang__) && defined(__GNUC__) && (__GNUC__ >= 14)
#pragma GCC diagnostic warning "-Wincompatible-pointer-types"
#elif defined(__clang__) && (__clang_major__ >= 16)
#pragma clang diagnostic ignored "-Wincompatible-function-pointer-types"
#pragma clang diagnostic ignored "-Wincompatible-pointer-types"
#endif
#endif

enum  {
	BIRD_FONT_LAYER_0_PROPERTY,
	BIRD_FONT_LAYER_NUM_PROPERTIES
};
static GParamSpec* bird_font_layer_properties[BIRD_FONT_LAYER_NUM_PROPERTIES];
#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))
#define _g_free0(var) (var = (g_free (var), NULL))

static gpointer bird_font_layer_parent_class = NULL;

static void bird_font_layer_finalize (GObject * obj);
static GType bird_font_layer_get_type_once (void);

BirdFontLayer*
bird_font_layer_construct (GType object_type)
{
	BirdFontLayer * self = NULL;
	BirdFontPathList* _tmp0_;
	GeeArrayList* _tmp1_;
	self = (BirdFontLayer*) g_object_new (object_type, NULL);
	_tmp0_ = bird_font_path_list_new ();
	_g_object_unref0 (self->paths);
	self->paths = _tmp0_;
	_tmp1_ = gee_array_list_new (BIRD_FONT_TYPE_LAYER, (GBoxedCopyFunc) g_object_ref, (GDestroyNotify) g_object_unref, NULL, NULL, NULL);
	_g_object_unref0 (self->subgroups);
	self->subgroups = _tmp1_;
	return self;
}

BirdFontLayer*
bird_font_layer_new (void)
{
	return bird_font_layer_construct (BIRD_FONT_TYPE_LAYER);
}

gint
bird_font_layer_index_of (BirdFontLayer* self,
                          BirdFontLayer* sublayer)
{
	GeeArrayList* _tmp0_;
	gint result;
	g_return_val_if_fail (self != NULL, 0);
	g_return_val_if_fail (sublayer != NULL, 0);
	_tmp0_ = self->subgroups;
	result = gee_abstract_list_index_of ((GeeAbstractList*) _tmp0_, sublayer);
	return result;
}

BirdFontPathList*
bird_font_layer_get_all_paths (BirdFontLayer* self)
{
	BirdFontPathList* p = NULL;
	BirdFontPathList* _tmp0_;
	BirdFontPathList* _tmp1_;
	BirdFontPathList* _tmp2_;
	BirdFontPathList* result;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = bird_font_path_list_new ();
	p = _tmp0_;
	_tmp1_ = p;
	_tmp2_ = self->paths;
	bird_font_path_list_append (_tmp1_, _tmp2_);
	{
		GeeArrayList* _sublayer_list = NULL;
		GeeArrayList* _tmp3_;
		gint _sublayer_size = 0;
		GeeArrayList* _tmp4_;
		gint _tmp5_;
		gint _tmp6_;
		gint _sublayer_index = 0;
		_tmp3_ = self->subgroups;
		_sublayer_list = _tmp3_;
		_tmp4_ = _sublayer_list;
		_tmp5_ = gee_abstract_collection_get_size ((GeeAbstractCollection*) _tmp4_);
		_tmp6_ = _tmp5_;
		_sublayer_size = _tmp6_;
		_sublayer_index = -1;
		while (TRUE) {
			gint _tmp7_;
			gint _tmp8_;
			BirdFontLayer* sublayer = NULL;
			GeeArrayList* _tmp9_;
			gpointer _tmp10_;
			BirdFontPathList* _tmp11_;
			BirdFontLayer* _tmp12_;
			BirdFontPathList* _tmp13_;
			BirdFontPathList* _tmp14_;
			_sublayer_index = _sublayer_index + 1;
			_tmp7_ = _sublayer_index;
			_tmp8_ = _sublayer_size;
			if (!(_tmp7_ < _tmp8_)) {
				break;
			}
			_tmp9_ = _sublayer_list;
			_tmp10_ = gee_abstract_list_get ((GeeAbstractList*) _tmp9_, _sublayer_index);
			sublayer = (BirdFontLayer*) _tmp10_;
			_tmp11_ = p;
			_tmp12_ = sublayer;
			_tmp13_ = bird_font_layer_get_all_paths (_tmp12_);
			_tmp14_ = _tmp13_;
			bird_font_path_list_append (_tmp11_, _tmp14_);
			_g_object_unref0 (_tmp14_);
			_g_object_unref0 (sublayer);
		}
	}
	result = p;
	return result;
}

BirdFontPathList*
bird_font_layer_get_visible_paths (BirdFontLayer* self)
{
	BirdFontPathList* p = NULL;
	BirdFontPathList* _tmp0_;
	BirdFontPathList* result;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = bird_font_path_list_new ();
	p = _tmp0_;
	if (self->visible) {
		BirdFontPathList* _tmp1_;
		BirdFontPathList* _tmp2_;
		_tmp1_ = p;
		_tmp2_ = self->paths;
		bird_font_path_list_append (_tmp1_, _tmp2_);
	}
	{
		GeeArrayList* _sublayer_list = NULL;
		GeeArrayList* _tmp3_;
		gint _sublayer_size = 0;
		GeeArrayList* _tmp4_;
		gint _tmp5_;
		gint _tmp6_;
		gint _sublayer_index = 0;
		_tmp3_ = self->subgroups;
		_sublayer_list = _tmp3_;
		_tmp4_ = _sublayer_list;
		_tmp5_ = gee_abstract_collection_get_size ((GeeAbstractCollection*) _tmp4_);
		_tmp6_ = _tmp5_;
		_sublayer_size = _tmp6_;
		_sublayer_index = -1;
		while (TRUE) {
			gint _tmp7_;
			gint _tmp8_;
			BirdFontLayer* sublayer = NULL;
			GeeArrayList* _tmp9_;
			gpointer _tmp10_;
			BirdFontLayer* _tmp11_;
			_sublayer_index = _sublayer_index + 1;
			_tmp7_ = _sublayer_index;
			_tmp8_ = _sublayer_size;
			if (!(_tmp7_ < _tmp8_)) {
				break;
			}
			_tmp9_ = _sublayer_list;
			_tmp10_ = gee_abstract_list_get ((GeeAbstractList*) _tmp9_, _sublayer_index);
			sublayer = (BirdFontLayer*) _tmp10_;
			_tmp11_ = sublayer;
			if (_tmp11_->visible) {
				BirdFontPathList* _tmp12_;
				BirdFontLayer* _tmp13_;
				BirdFontPathList* _tmp14_;
				BirdFontPathList* _tmp15_;
				_tmp12_ = p;
				_tmp13_ = sublayer;
				_tmp14_ = bird_font_layer_get_all_paths (_tmp13_);
				_tmp15_ = _tmp14_;
				bird_font_path_list_append (_tmp12_, _tmp15_);
				_g_object_unref0 (_tmp15_);
			}
			_g_object_unref0 (sublayer);
		}
	}
	result = p;
	return result;
}

void
bird_font_layer_add_layer (BirdFontLayer* self,
                           BirdFontLayer* layer)
{
	GeeArrayList* _tmp0_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (layer != NULL);
	_tmp0_ = self->subgroups;
	gee_abstract_collection_add ((GeeAbstractCollection*) _tmp0_, layer);
}

void
bird_font_layer_add_path (BirdFontLayer* self,
                          BirdFontPath* path)
{
	BirdFontPathList* _tmp0_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (path != NULL);
	_tmp0_ = self->paths;
	bird_font_path_list_add (_tmp0_, path);
}

void
bird_font_layer_remove_path (BirdFontLayer* self,
                             BirdFontPath* path)
{
	BirdFontPathList* _tmp0_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (path != NULL);
	_tmp0_ = self->paths;
	bird_font_path_list_remove (_tmp0_, path);
	{
		GeeArrayList* _sublayer_list = NULL;
		GeeArrayList* _tmp1_;
		gint _sublayer_size = 0;
		GeeArrayList* _tmp2_;
		gint _tmp3_;
		gint _tmp4_;
		gint _sublayer_index = 0;
		_tmp1_ = self->subgroups;
		_sublayer_list = _tmp1_;
		_tmp2_ = _sublayer_list;
		_tmp3_ = gee_abstract_collection_get_size ((GeeAbstractCollection*) _tmp2_);
		_tmp4_ = _tmp3_;
		_sublayer_size = _tmp4_;
		_sublayer_index = -1;
		while (TRUE) {
			gint _tmp5_;
			gint _tmp6_;
			BirdFontLayer* sublayer = NULL;
			GeeArrayList* _tmp7_;
			gpointer _tmp8_;
			BirdFontLayer* _tmp9_;
			_sublayer_index = _sublayer_index + 1;
			_tmp5_ = _sublayer_index;
			_tmp6_ = _sublayer_size;
			if (!(_tmp5_ < _tmp6_)) {
				break;
			}
			_tmp7_ = _sublayer_list;
			_tmp8_ = gee_abstract_list_get ((GeeAbstractList*) _tmp7_, _sublayer_index);
			sublayer = (BirdFontLayer*) _tmp8_;
			_tmp9_ = sublayer;
			bird_font_layer_remove_path (_tmp9_, path);
			_g_object_unref0 (sublayer);
		}
	}
}

void
bird_font_layer_remove_layer (BirdFontLayer* self,
                              BirdFontLayer* layer)
{
	GeeArrayList* _tmp0_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (layer != NULL);
	_tmp0_ = self->subgroups;
	gee_abstract_collection_remove ((GeeAbstractCollection*) _tmp0_, layer);
	{
		GeeArrayList* _sublayer_list = NULL;
		GeeArrayList* _tmp1_;
		gint _sublayer_size = 0;
		GeeArrayList* _tmp2_;
		gint _tmp3_;
		gint _tmp4_;
		gint _sublayer_index = 0;
		_tmp1_ = self->subgroups;
		_sublayer_list = _tmp1_;
		_tmp2_ = _sublayer_list;
		_tmp3_ = gee_abstract_collection_get_size ((GeeAbstractCollection*) _tmp2_);
		_tmp4_ = _tmp3_;
		_sublayer_size = _tmp4_;
		_sublayer_index = -1;
		while (TRUE) {
			gint _tmp5_;
			gint _tmp6_;
			BirdFontLayer* sublayer = NULL;
			GeeArrayList* _tmp7_;
			gpointer _tmp8_;
			BirdFontLayer* _tmp9_;
			_sublayer_index = _sublayer_index + 1;
			_tmp5_ = _sublayer_index;
			_tmp6_ = _sublayer_size;
			if (!(_tmp5_ < _tmp6_)) {
				break;
			}
			_tmp7_ = _sublayer_list;
			_tmp8_ = gee_abstract_list_get ((GeeAbstractList*) _tmp7_, _sublayer_index);
			sublayer = (BirdFontLayer*) _tmp8_;
			_tmp9_ = sublayer;
			bird_font_layer_remove_layer (_tmp9_, layer);
			_g_object_unref0 (sublayer);
		}
	}
}

BirdFontLayer*
bird_font_layer_copy (BirdFontLayer* self)
{
	BirdFontLayer* layer = NULL;
	BirdFontLayer* _tmp0_;
	BirdFontLayer* _tmp1_;
	const gchar* _tmp2_;
	gchar* _tmp3_;
	BirdFontLayer* _tmp4_;
	BirdFontPathList* _tmp5_;
	BirdFontPathList* _tmp6_;
	BirdFontLayer* _tmp7_;
	BirdFontGradient* _tmp21_;
	BirdFontLayer* _tmp25_;
	BirdFontLayer* result;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = bird_font_layer_new ();
	layer = _tmp0_;
	_tmp1_ = layer;
	_tmp2_ = self->name;
	_tmp3_ = g_strdup (_tmp2_);
	_g_free0 (_tmp1_->name);
	_tmp1_->name = _tmp3_;
	_tmp4_ = layer;
	_tmp5_ = self->paths;
	_tmp6_ = bird_font_path_list_copy (_tmp5_);
	_g_object_unref0 (_tmp4_->paths);
	_tmp4_->paths = _tmp6_;
	_tmp7_ = layer;
	_tmp7_->visible = self->visible;
	{
		GeeArrayList* _l_list = NULL;
		GeeArrayList* _tmp8_;
		gint _l_size = 0;
		GeeArrayList* _tmp9_;
		gint _tmp10_;
		gint _tmp11_;
		gint _l_index = 0;
		_tmp8_ = self->subgroups;
		_l_list = _tmp8_;
		_tmp9_ = _l_list;
		_tmp10_ = gee_abstract_collection_get_size ((GeeAbstractCollection*) _tmp9_);
		_tmp11_ = _tmp10_;
		_l_size = _tmp11_;
		_l_index = -1;
		while (TRUE) {
			gint _tmp12_;
			gint _tmp13_;
			BirdFontLayer* l = NULL;
			GeeArrayList* _tmp14_;
			gpointer _tmp15_;
			BirdFontLayer* _tmp16_;
			GeeArrayList* _tmp17_;
			BirdFontLayer* _tmp18_;
			BirdFontLayer* _tmp19_;
			BirdFontLayer* _tmp20_;
			_l_index = _l_index + 1;
			_tmp12_ = _l_index;
			_tmp13_ = _l_size;
			if (!(_tmp12_ < _tmp13_)) {
				break;
			}
			_tmp14_ = _l_list;
			_tmp15_ = gee_abstract_list_get ((GeeAbstractList*) _tmp14_, _l_index);
			l = (BirdFontLayer*) _tmp15_;
			_tmp16_ = layer;
			_tmp17_ = _tmp16_->subgroups;
			_tmp18_ = l;
			_tmp19_ = bird_font_layer_copy (_tmp18_);
			_tmp20_ = _tmp19_;
			gee_abstract_collection_add ((GeeAbstractCollection*) _tmp17_, _tmp20_);
			_g_object_unref0 (_tmp20_);
			_g_object_unref0 (l);
		}
	}
	_tmp21_ = self->gradient;
	if (_tmp21_ != NULL) {
		BirdFontLayer* _tmp22_;
		BirdFontGradient* _tmp23_;
		BirdFontGradient* _tmp24_;
		_tmp22_ = layer;
		_tmp23_ = self->gradient;
		_tmp24_ = bird_font_gradient_copy (G_TYPE_CHECK_INSTANCE_CAST (_tmp23_, BIRD_FONT_TYPE_GRADIENT, BirdFontGradient));
		_g_object_unref0 (_tmp22_->gradient);
		_tmp22_->gradient = _tmp24_;
	}
	_tmp25_ = layer;
	_tmp25_->single_path = self->single_path;
	result = layer;
	return result;
}

void
bird_font_layer_get_boundaries (BirdFontLayer* self,
                                gdouble* x,
                                gdouble* y,
                                gdouble* w,
                                gdouble* h)
{
	gdouble _vala_x = 0.0;
	gdouble _vala_y = 0.0;
	gdouble _vala_w = 0.0;
	gdouble _vala_h = 0.0;
	gdouble px = 0.0;
	gdouble py = 0.0;
	gdouble px2 = 0.0;
	gdouble py2 = 0.0;
	g_return_if_fail (self != NULL);
	px = BIRD_FONT_GLYPH_CANVAS_MAX;
	py = BIRD_FONT_GLYPH_CANVAS_MAX;
	px2 = BIRD_FONT_GLYPH_CANVAS_MIN;
	py2 = BIRD_FONT_GLYPH_CANVAS_MIN;
	{
		GeeArrayList* _p_list = NULL;
		BirdFontPathList* _tmp0_;
		BirdFontPathList* _tmp1_;
		GeeArrayList* _tmp2_;
		GeeArrayList* _tmp3_;
		gint _p_size = 0;
		GeeArrayList* _tmp4_;
		gint _tmp5_;
		gint _tmp6_;
		gint _p_index = 0;
		_tmp0_ = bird_font_layer_get_all_paths (self);
		_tmp1_ = _tmp0_;
		_tmp2_ = _tmp1_->paths;
		_tmp3_ = _tmp2_;
		_g_object_unref0 (_tmp1_);
		_p_list = _tmp3_;
		_tmp4_ = _p_list;
		_tmp5_ = gee_abstract_collection_get_size ((GeeAbstractCollection*) _tmp4_);
		_tmp6_ = _tmp5_;
		_p_size = _tmp6_;
		_p_index = -1;
		while (TRUE) {
			gint _tmp7_;
			gint _tmp8_;
			BirdFontPath* p = NULL;
			GeeArrayList* _tmp9_;
			gpointer _tmp10_;
			BirdFontPath* _tmp11_;
			BirdFontPath* _tmp13_;
			BirdFontPath* _tmp15_;
			BirdFontPath* _tmp17_;
			_p_index = _p_index + 1;
			_tmp7_ = _p_index;
			_tmp8_ = _p_size;
			if (!(_tmp7_ < _tmp8_)) {
				break;
			}
			_tmp9_ = _p_list;
			_tmp10_ = gee_abstract_list_get ((GeeAbstractList*) _tmp9_, _p_index);
			p = (BirdFontPath*) _tmp10_;
			_tmp11_ = p;
			if (px > _tmp11_->xmin) {
				BirdFontPath* _tmp12_;
				_tmp12_ = p;
				px = _tmp12_->xmin;
			}
			_tmp13_ = p;
			if (py > _tmp13_->ymin) {
				BirdFontPath* _tmp14_;
				_tmp14_ = p;
				py = _tmp14_->ymin;
			}
			_tmp15_ = p;
			if (px2 < _tmp15_->xmax) {
				BirdFontPath* _tmp16_;
				_tmp16_ = p;
				px2 = _tmp16_->xmax;
			}
			_tmp17_ = p;
			if (py2 < _tmp17_->ymax) {
				BirdFontPath* _tmp18_;
				_tmp18_ = p;
				py2 = _tmp18_->ymax;
			}
			_g_object_unref0 (p);
		}
	}
	_vala_w = px2 - px;
	_vala_h = py2 - py;
	_vala_x = px;
	_vala_y = py2;
	if (x) {
		*x = _vala_x;
	}
	if (y) {
		*y = _vala_y;
	}
	if (w) {
		*w = _vala_w;
	}
	if (h) {
		*h = _vala_h;
	}
}

static gchar*
bool_to_string (gboolean self)
{
	gchar* result;
	if (self) {
		gchar* _tmp0_;
		_tmp0_ = g_strdup ("true");
		result = _tmp0_;
		return result;
	} else {
		gchar* _tmp1_;
		_tmp1_ = g_strdup ("false");
		result = _tmp1_;
		return result;
	}
}

void
bird_font_layer_print (BirdFontLayer* self,
                       gint indent)
{
	g_return_if_fail (self != NULL);
	{
		GeeArrayList* _p_list = NULL;
		BirdFontPathList* _tmp0_;
		GeeArrayList* _tmp1_;
		gint _p_size = 0;
		GeeArrayList* _tmp2_;
		gint _tmp3_;
		gint _tmp4_;
		gint _p_index = 0;
		_tmp0_ = self->paths;
		_tmp1_ = _tmp0_->paths;
		_p_list = _tmp1_;
		_tmp2_ = _p_list;
		_tmp3_ = gee_abstract_collection_get_size ((GeeAbstractCollection*) _tmp2_);
		_tmp4_ = _tmp3_;
		_p_size = _tmp4_;
		_p_index = -1;
		while (TRUE) {
			gint _tmp5_;
			gint _tmp6_;
			BirdFontPath* p = NULL;
			GeeArrayList* _tmp7_;
			gpointer _tmp8_;
			FILE* _tmp12_;
			BirdFontPath* _tmp13_;
			gchar* _tmp14_;
			gchar* _tmp15_;
			gchar* _tmp16_;
			gchar* _tmp17_;
			BirdFontPath* _tmp18_;
			BirdFontColor* _tmp19_;
			FILE* _tmp25_;
			_p_index = _p_index + 1;
			_tmp5_ = _p_index;
			_tmp6_ = _p_size;
			if (!(_tmp5_ < _tmp6_)) {
				break;
			}
			_tmp7_ = _p_list;
			_tmp8_ = gee_abstract_list_get ((GeeAbstractList*) _tmp7_, _p_index);
			p = (BirdFontPath*) _tmp8_;
			{
				gint i = 0;
				i = 0;
				{
					gboolean _tmp9_ = FALSE;
					_tmp9_ = TRUE;
					while (TRUE) {
						FILE* _tmp11_;
						if (!_tmp9_) {
							gint _tmp10_;
							_tmp10_ = i;
							i = _tmp10_ + 1;
						}
						_tmp9_ = FALSE;
						if (!(i < indent)) {
							break;
						}
						_tmp11_ = stdout;
						fprintf (_tmp11_, "\t");
					}
				}
			}
			_tmp12_ = stdout;
			_tmp13_ = p;
			_tmp14_ = bool_to_string (bird_font_path_is_open (_tmp13_));
			_tmp15_ = _tmp14_;
			_tmp16_ = g_strconcat ("Path open: ", _tmp15_, NULL);
			_tmp17_ = _tmp16_;
			fprintf (_tmp12_, "%s", _tmp17_);
			_g_free0 (_tmp17_);
			_g_free0 (_tmp15_);
			_tmp18_ = p;
			_tmp19_ = _tmp18_->color;
			if (_tmp19_ != NULL) {
				FILE* _tmp20_;
				BirdFontPath* _tmp21_;
				BirdFontColor* _tmp22_;
				gchar* _tmp23_;
				gchar* _tmp24_;
				_tmp20_ = stdout;
				_tmp21_ = p;
				_tmp22_ = _tmp21_->color;
				_tmp23_ = bird_font_color_to_rgb_hex (G_TYPE_CHECK_INSTANCE_CAST (_tmp22_, BIRD_FONT_TYPE_COLOR, BirdFontColor));
				_tmp24_ = _tmp23_;
				fprintf (_tmp20_, " %s", _tmp24_);
				_g_free0 (_tmp24_);
			}
			_tmp25_ = stdout;
			fprintf (_tmp25_, "\n");
			_g_object_unref0 (p);
		}
	}
	{
		GeeArrayList* _l_list = NULL;
		GeeArrayList* _tmp26_;
		gint _l_size = 0;
		GeeArrayList* _tmp27_;
		gint _tmp28_;
		gint _tmp29_;
		gint _l_index = 0;
		_tmp26_ = self->subgroups;
		_l_list = _tmp26_;
		_tmp27_ = _l_list;
		_tmp28_ = gee_abstract_collection_get_size ((GeeAbstractCollection*) _tmp27_);
		_tmp29_ = _tmp28_;
		_l_size = _tmp29_;
		_l_index = -1;
		while (TRUE) {
			gint _tmp30_;
			gint _tmp31_;
			BirdFontLayer* l = NULL;
			GeeArrayList* _tmp32_;
			gpointer _tmp33_;
			FILE* _tmp37_;
			BirdFontLayer* _tmp38_;
			const gchar* _tmp39_;
			BirdFontLayer* _tmp40_;
			_l_index = _l_index + 1;
			_tmp30_ = _l_index;
			_tmp31_ = _l_size;
			if (!(_tmp30_ < _tmp31_)) {
				break;
			}
			_tmp32_ = _l_list;
			_tmp33_ = gee_abstract_list_get ((GeeAbstractList*) _tmp32_, _l_index);
			l = (BirdFontLayer*) _tmp33_;
			{
				gint i = 0;
				i = 0;
				{
					gboolean _tmp34_ = FALSE;
					_tmp34_ = TRUE;
					while (TRUE) {
						FILE* _tmp36_;
						if (!_tmp34_) {
							gint _tmp35_;
							_tmp35_ = i;
							i = _tmp35_ + 1;
						}
						_tmp34_ = FALSE;
						if (!(i < indent)) {
							break;
						}
						_tmp36_ = stdout;
						fprintf (_tmp36_, "\t");
					}
				}
			}
			_tmp37_ = stdout;
			_tmp38_ = l;
			_tmp39_ = _tmp38_->name;
			fprintf (_tmp37_, "%s\n", _tmp39_);
			_tmp40_ = l;
			bird_font_layer_print (_tmp40_, indent + 1);
			_g_object_unref0 (l);
		}
	}
}

static void
bird_font_layer_class_init (BirdFontLayerClass * klass,
                            gpointer klass_data)
{
	bird_font_layer_parent_class = g_type_class_peek_parent (klass);
	G_OBJECT_CLASS (klass)->finalize = bird_font_layer_finalize;
}

static void
bird_font_layer_instance_init (BirdFontLayer * self,
                               gpointer klass)
{
	gchar* _tmp0_;
	self->visible = TRUE;
	_tmp0_ = g_strdup ("Layer");
	self->name = _tmp0_;
	self->is_counter = FALSE;
	self->gradient = NULL;
	self->single_path = FALSE;
}

static void
bird_font_layer_finalize (GObject * obj)
{
	BirdFontLayer * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, BIRD_FONT_TYPE_LAYER, BirdFontLayer);
	_g_object_unref0 (self->paths);
	_g_object_unref0 (self->subgroups);
	_g_free0 (self->name);
	_g_object_unref0 (self->gradient);
	G_OBJECT_CLASS (bird_font_layer_parent_class)->finalize (obj);
}

static GType
bird_font_layer_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (BirdFontLayerClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) bird_font_layer_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (BirdFontLayer), 0, (GInstanceInitFunc) bird_font_layer_instance_init, NULL };
	GType bird_font_layer_type_id;
	bird_font_layer_type_id = g_type_register_static (G_TYPE_OBJECT, "BirdFontLayer", &g_define_type_info, 0);
	return bird_font_layer_type_id;
}

GType
bird_font_layer_get_type (void)
{
	static volatile gsize bird_font_layer_type_id__once = 0;
	if (g_once_init_enter (&bird_font_layer_type_id__once)) {
		GType bird_font_layer_type_id;
		bird_font_layer_type_id = bird_font_layer_get_type_once ();
		g_once_init_leave (&bird_font_layer_type_id__once, bird_font_layer_type_id);
	}
	return bird_font_layer_type_id__once;
}

