sp-path.cpp revision 6b15695578f07a3f72c4c9475c1a261a3021472a
#define __SP_PATH_C__
/*
* SVG <path> implementation
*
* Authors:
* Lauris Kaplinski <lauris@kaplinski.com>
* David Turner <novalis@gnu.org>
*
* Copyright (C) 2004 David Turner
* Copyright (C) 1999-2002 Lauris Kaplinski
* Copyright (C) 2000-2001 Ximian, Inc.
*
* Released under GNU GPL, read the file 'COPYING' for more information
*/
#ifdef HAVE_CONFIG_H
# include <config.h>
#endif
#endif
#include <libnr/n-art-bpath.h>
#include <libnr/nr-matrix-fns.h>
#include "attributes.h"
#include "sp-path.h"
#define noPATH_VERBOSE
static Inkscape::XML::Node *sp_path_write(SPObject *object, Inkscape::XML::Node *repr, guint flags);
static SPShapeClass *parent_class;
/**
* Gets the GType object for SPPathClass
*/
sp_path_get_type(void)
{
if (!type) {
sizeof(SPPathClass),
sizeof(SPPath),
16,
NULL, /* value_table */
};
}
return type;
}
/**
* Does the object-oriented work of initializing the class structure
* including parent class, and registers function pointers for
* the functions build, set, write, and set_transform.
*/
static void
{
}
{
if (!curve) return 0;
if (i > r) i = r; // sometimes after switching from node editor length is wrong, e.g. f6 - draw - f2 - tab - f1, this fixes it
for (; i >= 0; i --)
r --;
return r;
}
static gchar *
{
}
/**
* Initializes an SPPath. Currently does nothing.
*/
static void
{
}
static void
{
}
/**
* Given a repr, this sets the data items in the path object such as
* fill & style attributes, markers, and CSS properties.
*/
static void
{
/* d is a required attribute */
if (d == NULL) {
}
/* Are these calls actually necessary? */
}
}
static void
{
}
}
/**
* Sets a value in the path object given by 'key', to 'value'. This is used
* for setting attributes and markers on a path object.
*/
static void
{
switch (key) {
case SP_ATTR_D:
if (value) {
if (curve) {
}
} else {
}
break;
case SP_PROP_MARKER:
case SP_PROP_MARKER_START:
case SP_PROP_MARKER_MID:
case SP_PROP_MARKER_END:
break;
case SP_ATTR_CONNECTOR_TYPE:
case SP_ATTR_CONNECTION_START:
case SP_ATTR_CONNECTION_END:
break;
default:
}
break;
}
}
/**
*
* Writes the path object into a Inkscape::XML::Node
*/
{
}
if (abp) {
} else {
}
} else {
}
}
return repr;
}
static void
{
if (flags & (SP_OBJECT_MODIFIED_FLAG | SP_OBJECT_STYLE_MODIFIED_FLAG | SP_OBJECT_VIEWPORT_MODIFIED_FLAG)) {
flags &= ~SP_OBJECT_USER_MODIFIED_FLAG_B; // since we change the description, it's not a "just translation" anymore
}
}
}
/**
* Writes the given transform into the repr for the given item.
*/
{
}
/* Transform the path */
if (curve) {
}
// Adjust stroke
// Adjust pattern fill
// Adjust gradient fill
// nothing remains - we've written all of the transform, so return identity
}
/*
Local Variables:
mode:c++
c-file-style:"stroustrup"
c-file-offsets:((innamespace . 0)(inline-open . 0)(case-label . +))
indent-tabs-mode:nil
fill-column:99
End:
*/
// vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4 :