summaryrefslogtreecommitdiffstats
path: root/src/proj_pt.cpp
diff options
context:
space:
mode:
authorJabier Arraiza Cenoz <jabier.arraiza@marker.es>2014-11-23 23:36:49 +0000
committerJabiertxof <jtx@jtx.marker.es>2014-11-23 23:36:49 +0000
commit0969085ddf607a7a98cf7fd6d9b10da5fbebe62d (patch)
tree59b2bc9ed3412ab2de4c703ef30342dfe2401704 /src/proj_pt.cpp
parentrefactor from lastApplied (diff)
parentFixed a bug pointed by suv running from comand line, also removed another des... (diff)
downloadinkscape-0969085ddf607a7a98cf7fd6d9b10da5fbebe62d.tar.gz
inkscape-0969085ddf607a7a98cf7fd6d9b10da5fbebe62d.zip
fixing to trunk
(bzr r12588.1.34)
Diffstat (limited to 'src/proj_pt.cpp')
-rw-r--r--src/proj_pt.cpp20
1 files changed, 10 insertions, 10 deletions
diff --git a/src/proj_pt.cpp b/src/proj_pt.cpp
index 28286948d..311b9a034 100644
--- a/src/proj_pt.cpp
+++ b/src/proj_pt.cpp
@@ -1,6 +1,4 @@
-#define __PROJ_PT_C__
-
-/*
+/**
* 3x4 transformation matrix to map points from projective 3-space into the projective plane
*
* Authors:
@@ -11,12 +9,14 @@
* Released under GNU GPL, read the file 'COPYING' for more information
*/
+#include <glib.h>
+
#include "proj_pt.h"
#include "svg/stringstream.h"
namespace Proj {
-Pt2::Pt2(const gchar *coord_str) {
+Pt2::Pt2(const char *coord_str) {
if (!coord_str) {
pt[0] = 0.0;
pt[1] = 0.0;
@@ -24,7 +24,7 @@ Pt2::Pt2(const gchar *coord_str) {
g_warning ("Coordinate string is empty. Creating default Pt2\n");
return;
}
- gchar **coords = g_strsplit(coord_str, ":", 0);
+ char **coords = g_strsplit(coord_str, ":", 0);
if (coords[0] == NULL || coords[1] == NULL || coords[2] == NULL) {
g_strfreev (coords);
g_warning ("Malformed coordinate string.\n");
@@ -54,7 +54,7 @@ Pt2::affine() {
return Geom::Point (pt[0]/pt[2], pt[1]/pt[2]);
}
-gchar *
+char *
Pt2::coord_string() {
Inkscape::SVGOStringStream os;
os << pt[0] << " : "
@@ -63,7 +63,7 @@ Pt2::coord_string() {
return g_strdup(os.str().c_str());
}
-Pt3::Pt3(const gchar *coord_str) {
+Pt3::Pt3(const char *coord_str) {
if (!coord_str) {
pt[0] = 0.0;
pt[1] = 0.0;
@@ -72,7 +72,7 @@ Pt3::Pt3(const gchar *coord_str) {
g_warning ("Coordinate string is empty. Creating default Pt2\n");
return;
}
- gchar **coords = g_strsplit(coord_str, ":", 0);
+ char **coords = g_strsplit(coord_str, ":", 0);
if (coords[0] == NULL || coords[1] == NULL ||
coords[2] == NULL || coords[3] == NULL) {
g_strfreev (coords);
@@ -96,7 +96,7 @@ Pt3::normalize() {
pt[3] = 1.0;
}
-gchar *
+char *
Pt3::coord_string() {
Inkscape::SVGOStringStream os;
os << pt[0] << " : "
@@ -117,4 +117,4 @@ Pt3::coord_string() {
fill-column:99
End:
*/
-// vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:fileencoding=utf-8:textwidth=99 :
+// vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:fileencoding=utf-8 :