Code

implemented proper error checking
[inkscape.git] / src / gradient-chemistry.h
index dfc16ec32fb02b8004e5435704ba5862d4480582..5e4a7b3374749ff123bffcc4c6581c4a39ac02b2 100644 (file)
@@ -1,5 +1,5 @@
-#ifndef __SP_GRADIENT_CHEMISTRY_H__
-#define __SP_GRADIENT_CHEMISTRY_H__
+#ifndef SEEN_SP_GRADIENT_CHEMISTRY_H
+#define SEEN_SP_GRADIENT_CHEMISTRY_H
 
 /*
  * Various utility methods for gradients
@@ -8,7 +8,9 @@
  *   Lauris Kaplinski <lauris@kaplinski.com>
  *   bulia byak <buliabyak@users.sf.net>
  *   Johan Engelen <j.b.c.engelen@ewi.utwente.nl>
+ *   Jon A. Cruz <jon@joncruz.org>
  *
+ * Copyright (C) 2010 Authors
  * Copyright (C) 2007 Johan Engelen
  * Copyright (C) 2001-2002 Lauris Kaplinski
  * Copyright (C) 2001 Ximian, Inc.
@@ -40,9 +42,8 @@ SPGradient *sp_item_set_gradient (SPItem *item, SPGradient *gr, SPGradientType t
 /*
  * Get default normalized gradient vector of document, create if there is none
  */
-
-SPGradient *sp_document_default_gradient_vector (SPDocument *document, guint32 color = 0);
-SPGradient *sp_gradient_vector_for_object (SPDocument *doc, SPDesktop *desktop, SPObject *o, bool is_fill);
+SPGradient *sp_document_default_gradient_vector( SPDocument *document, SPColor const &color, bool singleStop );
+SPGradient *sp_gradient_vector_for_object( SPDocument *doc, SPDesktop *desktop, SPObject *o, bool is_fill, bool singleStop = false );
 
 void sp_object_ensure_fill_gradient_normalized (SPObject *object);
 void sp_object_ensure_stroke_gradient_normalized (SPObject *object);
@@ -54,10 +55,7 @@ SPGradient *sp_gradient_fork_vector_if_necessary (SPGradient *gr);
 SPGradient *sp_gradient_get_forked_vector_if_necessary(SPGradient *gradient, bool force_vector);
 
 
-SPStop* sp_first_stop(SPGradient *gradient);
 SPStop* sp_last_stop(SPGradient *gradient);
-SPStop* sp_prev_stop(SPStop *stop, SPGradient *gradient);
-SPStop* sp_next_stop(SPStop *stop);
 SPStop* sp_get_stop_i(SPGradient *gradient, guint i);
 guint sp_number_of_stops(SPGradient const *gradient);
 guint sp_number_of_stops_before_stop(SPGradient const *gradient, SPStop *target);
@@ -80,7 +78,7 @@ guint32 sp_item_gradient_stop_query_style (SPItem *item, guint point_type, guint
 void sp_item_gradient_edit_stop (SPItem *item, guint point_type, guint point_i, bool fill_or_stroke);
 void sp_item_gradient_reverse_vector (SPItem *item, bool fill_or_stroke);
 
-#endif
+#endif // SEEN_SP_GRADIENT_CHEMISTRY_H
 
 /*
   Local Variables:
@@ -91,4 +89,4 @@ void sp_item_gradient_reverse_vector (SPItem *item, bool fill_or_stroke);
   fill-column:99
   End:
 */
-// vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:encoding=utf-8:textwidth=99 :
+// vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:fileencoding=utf-8:textwidth=99 :