]> Pileus Git - grits/blob - src/objects/gis-object.c
84e5c4722eb3d07af753736cac19f80e2b8921a1
[grits] / src / objects / gis-object.c
1 /*
2  * Copyright (C) 2009-2010 Andy Spencer <andy753421@gmail.com>
3  *
4  * This program is free software: you can redistribute it and/or modify
5  * it under the terms of the GNU General Public License as published by
6  * the Free Software Foundation, either version 3 of the License, or
7  * (at your option) any later version.
8  *
9  * This program is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12  * GNU General Public License for more details.
13  *
14  * You should have received a copy of the GNU General Public License
15  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
16  */
17
18 /**
19  * SECTION:gis-object
20  * @short_description: Base classes for drawing operations
21  *
22  * Objects in libgis are things which can be added to the viewer and will be
23  * displayed to the user. Each object has information such as it's location and
24  * level of detail which are used by the viewer to determine which objects
25  * should be drawn.
26  *
27  * Each #GisObject is also a #GObject, but not every GObject in libgis is a
28  * GisObject. The "Object" part of the name is just coincidence.
29  */
30
31 #include <config.h>
32 #include "gis-object.h"
33
34 /************
35  * GisPoint *
36  ************/
37 /**
38  * gis_point_new:
39  *
40  * Create a new #GisPoint
41  *
42  * Returns: the new point
43  */
44 GisPoint *gis_point_new()
45 {
46         return g_new0(GisPoint, 1);
47 }
48
49 /**
50  * gis_point_set_lle:
51  * @point: the point to modify
52  * @lat:   the new latitude
53  * @lon:   the new longitude
54  * @elev:  the new elevation
55  *
56  * Set the latitude, longitude, and elevation for a point.
57  */
58 void gis_point_set_lle(GisPoint *point, gdouble lat, gdouble lon, gdouble elev)
59 {
60         point->lat  = lat;
61         point->lon  = lon;
62         point->elev = elev;
63 }
64
65 /**
66  * gis_point_free:
67  * @point: The point to free
68  *
69  * Free data used by a #GisPoint
70  */
71 void gis_point_free(GisPoint *point)
72 {
73         g_free(point);
74 }
75
76
77 /*************
78  * GisObject *
79  *************/
80 /* GObject stuff */
81 G_DEFINE_ABSTRACT_TYPE(GisObject, gis_object, G_TYPE_OBJECT);
82 static void gis_object_init(GisObject *object)
83 {
84 }
85
86 static void gis_object_class_init(GisObjectClass *klass)
87 {
88 }