diff options
| author | jtx <javier.arraiza@marker.es> | 2013-04-12 16:04:58 +0000 |
|---|---|---|
| committer | jtx <javier.arraiza@marker.es> | 2013-04-12 16:04:58 +0000 |
| commit | ef68a900e61298c46c079b047310558fb37a21ae (patch) | |
| tree | b15bbf9ff8f95bdae3d367a4cb1919cbe526a5a9 /src | |
| parent | Fixed bug moving selected nodes (diff) | |
| download | inkscape-ef68a900e61298c46c079b047310558fb37a21ae.tar.gz inkscape-ef68a900e61298c46c079b047310558fb37a21ae.zip | |
changing colors
(bzr r11950.1.89)
Diffstat (limited to 'src')
| -rw-r--r-- | src/display/canvas-bpath.cpp | 8 | ||||
| -rw-r--r-- | src/pen-context.cpp | 36 |
2 files changed, 21 insertions, 23 deletions
diff --git a/src/display/canvas-bpath.cpp b/src/display/canvas-bpath.cpp index ee9e14f10..cbc93948f 100644 --- a/src/display/canvas-bpath.cpp +++ b/src/display/canvas-bpath.cpp @@ -145,7 +145,7 @@ sp_canvas_bpath_render (SPCanvasItem *item, SPCanvasBuf *buf) bool dostroke = ((cbp->stroke_rgba & 0xff) != 0); cairo_set_tolerance(buf->ct, 0.5); - cairo_new_path(buf->ct); + //cairo_new_path(buf->ct); feed_pathvector_to_cairo (buf->ct, cbp->curve->get_pathvector(), cbp->affine, area, /* optimized_stroke = */ !dofill, 1); @@ -164,7 +164,13 @@ sp_canvas_bpath_render (SPCanvasItem *item, SPCanvasBuf *buf) if (cbp->dashes[0] != 0 && cbp->dashes[1] != 0) { cairo_set_dash (buf->ct, cbp->dashes, 2, 0); } + //cairo_t buf2 = cairo_reference(buf->ct); cairo_stroke(buf->ct); + //cairo_set_source_rgba(buf2,1,1,1,0.2); + //cairo_set_line_width(buf2, 3); + //cairo_stroke(buf2); + + } else { cairo_new_path(buf->ct); } diff --git a/src/pen-context.cpp b/src/pen-context.cpp index 851a5f629..bcaf7c893 100644 --- a/src/pen-context.cpp +++ b/src/pen-context.cpp @@ -1456,34 +1456,26 @@ static void spdc_pen_set_angle_distance_status_message(SPPenContext *const pc, G //Esta función cambia los colores rojo,verde y azul haciendolos transparentes o no en función de si se usa spiro static void bspline_spiro_color(SPPenContext *const pc) { - bool remake_green_bpaths = false; if(pc->spiro){ - //If the colour is not defined as trasparent, por example when changing - //from drawing to spiro mode or when selecting the pen tool - if(pc->green_color != 0x00ff000){ - //We change the green and red colours to transparent, so this lines are not necessary - //to the drawing with spiro - pc->red_color = 0xff00000; - pc->green_color = 0x00ff000; - remake_green_bpaths = true; - } + pc->red_color = 0xae901f00; + pc->green_color = 0xae901f00; + pc->blue_color = 0x3dc29bb1; + }else if (pc->bspline){ + pc->red_color = 0xae901fce; + pc->green_color = 0xae901fce; + pc->blue_color = 0x3dc29bb1; }else{ - //If we come from working with the spiro curve and change the mode the "green_curve" colour is transparent - if(pc->green_color != 0x00ff007f){ - //since we are not im spiro mode, we assign the original colours - //to the red and the green curve, removing their transparency - pc->red_color = 0xff00007f; - pc->green_color = 0x00ff007f; - remake_green_bpaths = true; - } + pc->red_color = 0xff000098; + pc->green_color = 0x00ff0098; + pc->blue_color = 0x0000ff98; + } //we hide the spiro/bspline rests - if(!pc->bspline){ - sp_canvas_item_hide(pc->blue_bpath); - } + if(!pc->bspline){ + sp_canvas_item_hide(pc->blue_bpath); } //We erase all the "green_bpaths" to recreate them after with the colour //transparency recently modified - if (pc->green_bpaths && remake_green_bpaths) { + if (pc->green_bpaths) { // remove old piecewise green canvasitems while (pc->green_bpaths) { sp_canvas_item_destroy(SP_CANVAS_ITEM(pc->green_bpaths->data)); |
