Commit 1c0b586e authored by Dave Neary's avatar Dave Neary Committed by David Neary

app/vectors/gimpvectors.[ch] app/vectors/gimpstroke.[ch] Cleanup - removed


2003-09-07  Dave Neary  <bolsh@gimp.org>

        * app/vectors/gimpvectors.[ch]
        * app/vectors/gimpstroke.[ch]
        * app/vectors/gimpbezierstroke.c: Cleanup - removed libart
        from the included headers in the .h files, don't pass around
        libart objects any more. Still stub code.
parent 078d575b
2003-09-07 Dave Neary <bolsh@gimp.org>
* app/vectors/gimpvectors.[ch]
* app/vectors/gimpstroke.[ch]
* app/vectors/gimpbezierstroke.c: Cleanup - removed libart
from the included headers in the .h files, don't pass around
libart objects any more. Still stub code.
2003-09-07 Sven Neumann <sven@gimp.org>
* tools/gimp-remote.c: accept URLs with https protocol.
......@@ -148,9 +148,7 @@ static GList * gimp_stroke_real_get_draw_anchors (const GimpStroke *stroke);
static GList * gimp_stroke_real_get_draw_controls (const GimpStroke *stroke);
static GArray * gimp_stroke_real_get_draw_lines (const GimpStroke *stroke);
static void gimp_stroke_real_to_art_point (const GimpStroke *vectors,
ArtVpath *vec);
static void gimp_stroke_art_stroke (const GimpStroke *stroke);
/* private variables */
......@@ -243,7 +241,7 @@ gimp_stroke_class_init (GimpStrokeClass *klass)
klass->get_draw_controls = gimp_stroke_real_get_draw_controls;
klass->get_draw_lines = gimp_stroke_real_get_draw_lines;
klass->to_art_point = gimp_stroke_real_to_art_point;
klass->art_stroke = gimp_stroke_art_stroke;
}
static void
......@@ -1214,21 +1212,12 @@ gimp_stroke_real_get_draw_lines (const GimpStroke *stroke)
}
void
gimp_stroke_to_art_point (const GimpStroke *stroke,
ArtVpath *vec)
static void
gimp_stroke_art_stroke (const GimpStroke *stroke)
{
g_return_if_fail (GIMP_IS_STROKE (stroke));
GIMP_STROKE_GET_CLASS (stroke)->to_art_point (stroke, vec);
}
static void
gimp_stroke_real_to_art_point (const GimpStroke *stroke,
ArtVpath *vec)
{
g_printerr ("gimp_stroke_to_art_point: default implementation\n");
GIMP_STROKE_GET_CLASS (stroke)->art_stroke (stroke);
return;
}
......@@ -22,8 +22,6 @@
#ifndef __GIMP_STROKE_H__
#define __GIMP_STROKE_H__
#include <libart_lgpl/libart.h>
#include "core/gimpobject.h"
......@@ -166,8 +164,7 @@ struct _GimpStrokeClass
GList * (* get_draw_controls) (const GimpStroke *stroke);
GArray * (* get_draw_lines) (const GimpStroke *stroke);
void (* to_art_point) (const GimpStroke *stroke,
ArtVpath *vec);
void (* art_stroke) (const GimpStroke *stroke);
};
......@@ -306,9 +303,6 @@ GList * gimp_stroke_get_draw_anchors (const GimpStroke *stroke);
GList * gimp_stroke_get_draw_controls (const GimpStroke *stroke);
GArray * gimp_stroke_get_draw_lines (const GimpStroke *stroke);
void gimp_stroke_to_art_point (const GimpStroke *stroke,
ArtVpath *vec);
#endif /* __GIMP_STROKE_H__ */
......@@ -950,37 +950,29 @@ gimp_vectors_real_make_bezier (const GimpVectors *vectors)
}
/*
* gimp_vectors_to_art_vpath: Create an ArtVpath from a GimpVectors object.
* gimp_vectors_art_stroke: Stroke a GimpVectors object using libart.
* @vectors: The source path
*
* Traverses the stroke list of a GimpVector object, adding nodes to an
* ArtVpath as it goes.
* The destination path is allocated inside this function, and must be
* freed after use.
*
* Return value: Newly allocated ArtVpath.
* Traverses the stroke list of a GimpVector object, calling art_stroke
* on each stroke as we go. Will eventually take cap type, join type
* and width as arguments.
*/
ArtVpath *
gimp_vectors_to_art_vpath (const GimpVectors *vectors)
void
gimp_vectors_art_stroke (const GimpVectors *vectors)
{
ArtVpath *vec; /* Libart path we're creating */
GimpStroke *cur_stroke;
guint num_points;
num_points = g_list_length (vectors->strokes);
GimpStroke *cur_stroke;
vec = art_new (ArtVpath, num_points);
/* Get the list of Strokes in the vector, and create the equivalent
* ArtVpath node */
/* For each Stroke in the vector, stroke it */
for (cur_stroke = gimp_vectors_stroke_get_next (vectors, NULL);
cur_stroke;
cur_stroke = gimp_vectors_stroke_get_next (vectors, cur_stroke))
{
/* Add this stroke to the art_vpath */
gimp_stroke_to_art_point (cur_stroke, vec);
GIMP_STROKE_GET_CLASS(cur_stroke)->art_stroke (cur_stroke);
}
return vec;
/* That's it - nothing else to see here */
return;
}
......@@ -22,8 +22,6 @@
#ifndef __GIMP_VECTORS_H__
#define __GIMP_VECTORS_H__
#include <libart_lgpl/libart.h>
#include "core/gimpitem.h"
......@@ -165,9 +163,7 @@ gint gimp_vectors_interpolate (const GimpVectors *vectors,
GimpVectors * gimp_vectors_make_bezier (const GimpVectors *vectors);
/* Convert to libart vector path */
ArtVpath * gimp_vectors_to_art_vpath (const GimpVectors *vectors);
/* Stroke a vector with libart (needs a better name) */
void gimp_vectors_art_stroke(const GimpVectors * vectors);
#endif /* __GIMP_VECTORS_H__ */
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment