summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJabier Arraiza Cenoz <jabier.arraiza@marker.es>2013-04-15 23:08:48 +0000
committerJabiertxo Arraiza Zenotz <jtx@jtx.marker.es>2013-04-15 23:08:48 +0000
commit47f4a44585c01befeb6b6ee98b1fbaed87bd1ada (patch)
tree9b5241e2aac1be83e945e24fb6bec8e306aef4bf /src
parentadding composite (diff)
parentFix for Bug #503712 (Personal default template not used) by Slagvi. (diff)
downloadinkscape-47f4a44585c01befeb6b6ee98b1fbaed87bd1ada.tar.gz
inkscape-47f4a44585c01befeb6b6ee98b1fbaed87bd1ada.zip
Halo
(bzr r11950.1.95)
Diffstat (limited to 'src')
-rw-r--r--src/display/canvas-bpath.cpp24
-rw-r--r--src/file.cpp4
-rw-r--r--src/pen-context.cpp18
-rw-r--r--src/ui/control-manager.cpp6
4 files changed, 25 insertions, 27 deletions
diff --git a/src/display/canvas-bpath.cpp b/src/display/canvas-bpath.cpp
index 9135774c1..651440512 100644
--- a/src/display/canvas-bpath.cpp
+++ b/src/display/canvas-bpath.cpp
@@ -18,7 +18,6 @@
#include <string.h>
#include "document.h"
-#include <2geom/pathvector.h>
#include "color.h"
#include "display/sp-canvas-group.h"
#include "display/sp-canvas-util.h"
@@ -133,9 +132,6 @@ sp_canvas_bpath_render (SPCanvasItem *item, SPCanvasBuf *buf)
SPCanvasBPath *cbp = SP_CANVAS_BPATH (item);
Geom::Rect area = buf->rect;
- double width = 0.5;
- Geom::Rect viewbox = item->canvas->getViewbox();
- viewbox.expandBy (width);
if ( !cbp->curve ||
((cbp->stroke_rgba & 0xff) == 0 && (cbp->fill_rgba & 0xff) == 0 ) ||
cbp->curve->get_segment_count() < 1)
@@ -146,17 +142,12 @@ sp_canvas_bpath_render (SPCanvasItem *item, SPCanvasBuf *buf)
bool dofill = ((cbp->fill_rgba & 0xff) != 0);
bool dostroke = ((cbp->stroke_rgba & 0xff) != 0);
-
- if (dostroke) {
- const cairo_rectangle_int_t *rectangle = new cairo_rectangle_int_t {viewbox.left(),viewbox.top(),viewbox.width(),viewbox.height()};
- cairo_region_create_rectangle(rectangle);
- cairo_paint(buf->ct);
- cairo_set_operator(buf->ct,CAIRO_OPERATOR_OVERLAY);
- }
-
+
cairo_set_tolerance(buf->ct, 0.5);
cairo_new_path(buf->ct);
+ cairo_save(buf->ct);
+
feed_pathvector_to_cairo (buf->ct, cbp->curve->get_pathvector(), cbp->affine, area,
/* optimized_stroke = */ !dofill, 1);
if (dofill) {
@@ -168,13 +159,20 @@ sp_canvas_bpath_render (SPCanvasItem *item, SPCanvasBuf *buf)
}
if (dostroke) {
+ ink_cairo_set_source_rgba32(buf->ct, 0xffffff4c);
+ cairo_set_line_width(buf->ct, 3);
+ cairo_stroke_preserve(buf->ct);
+ cairo_restore(buf->ct);
+ feed_pathvector_to_cairo (buf->ct, cbp->curve->get_pathvector(), cbp->affine, area,
+ /* optimized_stroke = */ !dofill, 1);
ink_cairo_set_source_rgba32(buf->ct, cbp->stroke_rgba);
cairo_set_line_width(buf->ct, 1);
if (cbp->dashes[0] != 0 && cbp->dashes[1] != 0) {
cairo_set_dash (buf->ct, cbp->dashes, 2, 0);
}
cairo_stroke(buf->ct);
- cairo_destroy(buf->ct);
+
+
} else {
cairo_new_path(buf->ct);
}
diff --git a/src/file.cpp b/src/file.cpp
index 453ddb546..5b4110253 100644
--- a/src/file.cpp
+++ b/src/file.cpp
@@ -157,8 +157,8 @@ Glib::ustring sp_file_default_template_uri()
baseNames.push_back("default.svg");
gchar *foundTemplate = 0;
- for (std::list<gchar const*>::iterator nameIt = baseNames.begin(); (nameIt != baseNames.end()) && !foundTemplate; ++nameIt) {
- for (std::list<gchar *>::iterator it = sources.begin(); (it != sources.end()) && !foundTemplate; ++it) {
+ for (std::list<gchar *>::iterator it = sources.begin(); (it != sources.end()) && !foundTemplate; ++it) {
+ for (std::list<gchar const*>::iterator nameIt = baseNames.begin(); (nameIt != baseNames.end()) && !foundTemplate; ++nameIt) {
gchar *dirname = *it;
if ( Inkscape::IO::file_test( dirname, (GFileTest)(G_FILE_TEST_EXISTS | G_FILE_TEST_IS_DIR) ) ) {
diff --git a/src/pen-context.cpp b/src/pen-context.cpp
index 43f2fd76e..c0fc908f0 100644
--- a/src/pen-context.cpp
+++ b/src/pen-context.cpp
@@ -1458,17 +1458,17 @@ static void spdc_pen_set_angle_distance_status_message(SPPenContext *const pc, G
static void bspline_spiro_color(SPPenContext *const pc)
{
if(pc->spiro){
- pc->red_color = 0xdf202000;
- pc->green_color = 0x21df2100;
- pc->blue_color = 0x2020dfe6;
+ pc->red_color = 0xffffff00;
+ pc->green_color = 0xffffff00;
+ pc->blue_color = 0x23abcdff;
}else if (pc->bspline){
- pc->red_color = 0xdf2020e6;
- pc->green_color = 0xdf2020e6;
- pc->blue_color = 0x2020dfe6;
+ pc->red_color = 0xe68024ff;
+ pc->green_color = 0xe68024ff;
+ pc->blue_color = 0x23abcdff;
}else{
- pc->red_color = 0xdf2020e6;
- pc->green_color = 0x21df21e6;
- pc->blue_color = 0x0000ffe6;
+ pc->red_color = 0xe68024ff;
+ pc->green_color = 0xf372ebff;
+ pc->blue_color = 0x23abcdff;
}
//we hide the spiro/bspline rests
if(!pc->bspline){
diff --git a/src/ui/control-manager.cpp b/src/ui/control-manager.cpp
index 5a3c5a496..9425bc3f0 100644
--- a/src/ui/control-manager.cpp
+++ b/src/ui/control-manager.cpp
@@ -59,9 +59,9 @@ ControlFlags& operator ^=(ControlFlags &lhs, ControlFlags rhs)
#define FILL_COLOR_MOUSEOVER 0xff0000ff
// Default color for line:
-#define LINE_COLOR_PRIMARY 0x0000ff7f
-#define LINE_COLOR_SECONDARY 0xff00007f
-#define LINE_COLOR_TERTIARY 0xffff007f
+#define LINE_COLOR_PRIMARY 0x23abcdff
+#define LINE_COLOR_SECONDARY 0xf372ebff
+#define LINE_COLOR_TERTIARY 0xe68024ff
namespace Inkscape {