summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 51300bb)
raw | patch | inline | side by side (parent: 51300bb)
author | buliabyak <buliabyak@users.sourceforge.net> | |
Sun, 7 Oct 2007 06:00:44 +0000 (06:00 +0000) | ||
committer | buliabyak <buliabyak@users.sourceforge.net> | |
Sun, 7 Oct 2007 06:00:44 +0000 (06:00 +0000) |
src/gradient-chemistry.cpp | patch | blob | history | |
src/gradient-chemistry.h | patch | blob | history |
index df013fdfc95516ee08924d1ae08cc194bffc89d0..486d38167f5e0e55bdbe8ff10aec94f8725f3718 100644 (file)
return stop;
}
-static guint32
-average_color (guint32 c1, guint32 c2, gdouble p = 0.5)
+guint32
+average_color (guint32 c1, guint32 c2, gdouble p)
{
guint32 r = (guint32) (SP_RGBA32_R_U (c1) * (1 - p) + SP_RGBA32_R_U (c2) * p);
guint32 g = (guint32) (SP_RGBA32_G_U (c1) * (1 - p) + SP_RGBA32_G_U (c2) * p);
index af7315b4c52b91f7de57c536622c7681a6e3863a..13e15e5b8c2a6a971aef29fb124d04a1bdb75a7d 100644 (file)
--- a/src/gradient-chemistry.h
+++ b/src/gradient-chemistry.h
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);