diff --git a/src/sp-gradient.cpp b/src/sp-gradient.cpp
index db2360225c6c4b033e0115b7bd46602bfdaeb09e..dd7b7b257aa6659a0fe50616b896d529c3107007 100644 (file)
--- a/src/sp-gradient.cpp
+++ b/src/sp-gradient.cpp
#include "display/nr-gradient-gpl.h"
#include "svg/svg.h"
+#include "svg/svg-color.h"
#include "svg/css-ostringstream.h"
#include "attributes.h"
#include "document-private.h"
#define SP_MACROS_SILENT
#include "macros.h"
-/// Has to be power of 2
+/// Has to be power of 2
#define NCOLORS NR_GRADIENT_VECTOR_LENGTH
static void sp_stop_class_init(SPStopClass *klass);
* We need presentation attributes etc.
* \par
* remove the hackish "style reading" from here: see comments in
- * sp_object_get_style_property about the bugs in our current
- * approach. However, note that SPStyle doesn't currently have
+ * sp_object_get_style_property about the bugs in our current
+ * approach. However, note that SPStyle doesn't currently have
* stop-color and stop-opacity properties.
*/
{
if (streq(p, "currentColor")) {
stop->currentColor = true;
} else {
- guint32 const color = sp_svg_read_color(p, 0);
+ guint32 const color = sp_svg_read_color(p, 0);
sp_color_set_rgb_rgba32(&stop->specified_color, color);
}
}
}
/**
- * Writes the gradient's internal vector (whether from its own stops, or
+ * Writes the gradient's internal vector (whether from its own stops, or
* inherited from refs) into the gradient repr as svg:stop elements.
*/
void
/**
* Renders gradient vector to buffer as line.
- *
+ *
* RGB buffer background should be set up beforehand.
*
* @param len,width,height,rowstride Buffer parameters (1 or 2 dimensional).
/**
* Render rectangular RGB area from gradient vector.
- */
+ */
void
sp_gradient_render_vector_block_rgb(SPGradient *gradient, guchar *buf,
gint const width, gint const height, gint const rowstride,
@@ -1402,7 +1403,7 @@ sp_lineargradient_write(SPObject *object, Inkscape::XML::Node *repr, guint flags
/**
* Create linear gradient context.
- *
+ *
* Basically we have to deal with transformations
*
* 1) color2norm - maps point in (0,NCOLORS) vector to (0,1) vector
@@ -1410,10 +1411,10 @@ sp_lineargradient_write(SPObject *object, Inkscape::XML::Node *repr, guint flags
* 2) gradientTransform
* 3) bbox2user
* 4) ctm == userspace to pixel grid
- *
+ *
* See also (*) in sp-pattern about why we may need parent_transform.
- *
- * \todo (point 1 above) fixme: I do not know how to deal with start > 0
+ *
+ * \todo (point 1 above) fixme: I do not know how to deal with start > 0
* and end < 1.
*/
static SPPainter *
lgp->lg = lg;
/** \todo
- * Technically speaking, we map NCOLORS on line [start,end] onto line
- * [0,1]. I almost think we should fill color array start and end in
- * that case. The alternative would be to leave these just empty garbage
- * or something similar. Originally I had 1023.9999 here - not sure
+ * Technically speaking, we map NCOLORS on line [start,end] onto line
+ * [0,1]. I almost think we should fill color array start and end in
+ * that case. The alternative would be to leave these just empty garbage
+ * or something similar. Originally I had 1023.9999 here - not sure
* whether we have really to cut out ceil int (Lauris).
*/
NR::Matrix color2norm(NR::identity());
if (gr->units == SP_GRADIENT_UNITS_OBJECTBOUNDINGBOX) {
/** \todo
- * fixme: We may try to normalize here too, look at
+ * fixme: We may try to normalize here too, look at
* linearGradient (Lauris)
*/
} else {
/** \todo
* Problem: What to do, if we have mixed lengths and percentages?
- * Currently we do ignore percentages at all, but that is not
+ * Currently we do ignore percentages at all, but that is not
* good (lauris)
*/