X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=src%2Fgradient-chemistry.h;h=13e15e5b8c2a6a971aef29fb124d04a1bdb75a7d;hb=963f23115db07f460bdd862b957f8bd9dba88b9b;hp=b649a22ec78f76e1e265ccc0e9bf217ccb85d496;hpb=040f5f6c86db72df064756211fb27ec726322afb;p=inkscape.git diff --git a/src/gradient-chemistry.h b/src/gradient-chemistry.h index b649a22ec..13e15e5b8 100644 --- a/src/gradient-chemistry.h +++ b/src/gradient-chemistry.h @@ -7,7 +7,9 @@ * Author: * Lauris Kaplinski * bulia byak + * Johan Engelen * + * Copyright (C) 2007 Johan Engelen * Copyright (C) 2001-2002 Lauris Kaplinski * Copyright (C) 2001 Ximian, Inc. * @@ -49,23 +51,33 @@ SPGradient *sp_gradient_convert_to_userspace (SPGradient *gr, SPItem *item, cons SPGradient *sp_gradient_reset_to_userspace (SPGradient *gr, SPItem *item); 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 *gradient); +guint sp_number_of_stops_before_stop(SPGradient *gradient, SPStop *target); + +guint32 average_color (guint32 c1, guint32 c2, gdouble p = 0.5); + +SPStop *sp_vector_add_stop (SPGradient *vector, SPStop* prev_stop, SPStop* next_stop, gfloat offset); void sp_gradient_transform_multiply (SPGradient *gradient, NR::Matrix postmul, bool set); -void sp_item_gradient_set_coords (SPItem *item, guint point_num, NR::Point p_desk, bool fill_or_stroke, bool write_repr, bool scale); -NR::Point sp_item_gradient_get_coords (SPItem *item, guint point_num, bool fill_or_stroke); +SPGradient * sp_item_gradient (SPItem *item, bool fill_or_stroke); +void sp_item_gradient_set_coords (SPItem *item, guint point_type, guint point_i, NR::Point p_desk, bool fill_or_stroke, bool write_repr, bool scale); +NR::Point sp_item_gradient_get_coords (SPItem *item, guint point_type, guint point_i, bool fill_or_stroke); SPGradient *sp_item_gradient_get_vector (SPItem *item, bool fill_or_stroke); SPGradientSpread sp_item_gradient_get_spread (SPItem *item, bool fill_or_stroke); struct SPCSSAttr; -void sp_item_gradient_stop_set_style (SPItem *item, guint point_num, bool fill_or_stroke, SPCSSAttr *stop); -guint32 sp_item_gradient_stop_query_style (SPItem *item, guint point_num, bool fill_or_stroke); -void sp_item_gradient_edit_stop (SPItem *item, guint point_num, bool fill_or_stroke); +void sp_item_gradient_stop_set_style (SPItem *item, guint point_type, guint point_i, bool fill_or_stroke, SPCSSAttr *stop); +guint32 sp_item_gradient_stop_query_style (SPItem *item, guint point_type, guint point_i, bool fill_or_stroke); +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