<commit_before>/*
 * Copyright (C) 2009 <NAME> <<EMAIL>>
 *
 * 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, write to the Free Software
 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 */

/**
 * SECTION:champlain-polygon
 * @short_description: A polygon to be drawn on the map
 *
 * A ChamplainPolygon is a set of point forming a shape on the map.  This API is based on Cairo's.
 */

#include "config.h"

#include "champlain-polygon.h"

#include "champlain-defines.h"
#include "champlain-private.h"

#include <clutter/clutter.h>
#include <glib.h>

static ClutterColor DEFAULT_FILL_COLOR = {0xcc, 0x00, 0x00, 0xaa};
static ClutterColor DEFAULT_STROKE_COLOR = {0xa4, 0x00, 0x00, 0xff};

G_DEFINE_TYPE (ChamplainPolygon, champlain_polygon, G_TYPE_OBJECT)

#define GET_PRIVATE(o) \
  (G_TYPE_INSTANCE_GET_PRIVATE ((o), CHAMPLAIN_TYPE_POLYGON, ChamplainPolygonPrivate))

enum
{
  PROP_0,
  PROP_CLOSED_PATH,
  PROP_STROKE_WIDTH,
  PROP_STROKE_COLOR,
  PROP_FILL,
  PROP_FILL_COLOR,
  PROP_STROKE,
  PROP_VISIBLE,
};

static void
champlain_polygon_get_property (GObject *object,
    guint property_id,
    GValue *value,
    GParamSpec *pspec)
{
  ChamplainPolygonPrivate *priv = CHAMPLAIN_POLYGON (object)->priv;

  switch (property_id)
    {
      case PROP_CLOSED_PATH:
        g_value_set_boolean (value, priv->closed_path);
        break;
      case PROP_FILL:<commit_msg>ChamplainPolygon actually inherits from GInitiallyUnowned<commit_after>/*
 * Copyright (C) 2009 <NAME> <<EMAIL>>
 *
 * 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, write to the Free Software
 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 */

/**
 * SECTION:champlain-polygon
 * @short_description: A polygon to be drawn on the map
 *
 * A ChamplainPolygon is a set of point forming a shape on the map.  This API is based on Cairo's.
 */

#include "config.h"

#include "champlain-polygon.h"

#include "champlain-defines.h"
#include "champlain-private.h"

#include <clutter/clutter.h>
#include <glib.h>

static ClutterColor DEFAULT_FILL_COLOR = {0xcc, 0x00, 0x00, 0xaa};
static ClutterColor DEFAULT_STROKE_COLOR = {0xa4, 0x00, 0x00, 0xff};

G_DEFINE_TYPE (ChamplainPolygon, champlain_polygon, G_TYPE_INITIALLY_UNOWNED)

#define GET_PRIVATE(o) \
  (G_TYPE_INSTANCE_GET_PRIVATE ((o), CHAMPLAIN_TYPE_POLYGON, ChamplainPolygonPrivate))

enum
{
  PROP_0,
  PROP_CLOSED_PATH,
  PROP_STROKE_WIDTH,
  PROP_STROKE_COLOR,
  PROP_FILL,
  PROP_FILL_COLOR,
  PROP_STROKE,
  PROP_VISIBLE,
};

static void
champlain_polygon_get_property (GObject *object,
    guint property_id,
    GValue *value,
    GParamSpec *pspec)
{
  ChamplainPolygonPrivate *priv = CHAMPLAIN_POLYGON (object)->priv;

  switch (property_id)
    {
      case PROP_CLOSED_PATH:
        g_value_set_boolean (value, priv->closed_path);
        break;
      case PROP_FILL:
{'fraction_non_alphanumeric': 0.08149068322981366, 'fraction_numerical': 0.017391304347826087, 'mean_word_length': 4.27653997378768, 'pattern_counts': {'":': 0, '<': 13, '<?xml version=': 0, '>': 17, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2825926', 'n_tokens_mistral': 1416, 'n_tokens_neox': 1339, 'n_words': 445}