diff options
| author | Aaron Spike <aaron@ekips.org> | 2006-05-18 15:36:46 +0000 |
|---|---|---|
| committer | acspike <acspike@users.sourceforge.net> | 2006-05-18 15:36:46 +0000 |
| commit | eb3fef0b54164afbd04e89ff2ef63b547d26d7cd (patch) | |
| tree | ef57d11f42330a43710e34adc3248f926e60d081 /src/dyna-draw-context.cpp | |
| parent | * Properly deal with setting the style using the text toolbar (diff) | |
| download | inkscape-eb3fef0b54164afbd04e89ff2ef63b547d26d7cd.tar.gz inkscape-eb3fef0b54164afbd04e89ff2ef63b547d26d7cd.zip | |
adding fill-opacity to dyna-draw
(bzr r875)
Diffstat (limited to 'src/dyna-draw-context.cpp')
| -rw-r--r-- | src/dyna-draw-context.cpp | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/dyna-draw-context.cpp b/src/dyna-draw-context.cpp index ff570fb62..f1128c492 100644 --- a/src/dyna-draw-context.cpp +++ b/src/dyna-draw-context.cpp @@ -809,8 +809,13 @@ fit_and_split_calligraphics(SPDynaDrawContext *dc, gboolean release) sp_curve_unref(curve); guint32 fillColor = sp_desktop_get_color_tool (SP_ACTIVE_DESKTOP, "tools.calligraphic", true); - double opacity = sp_desktop_get_opacity_tool (SP_ACTIVE_DESKTOP, "tools.calligraphic"); - sp_canvas_bpath_set_fill(SP_CANVAS_BPATH(cbp), ((fillColor & 0xffffff00) | SP_COLOR_F_TO_U(opacity)), SP_WIND_RULE_EVENODD); + //guint32 strokeColor = sp_desktop_get_color_tool (SP_ACTIVE_DESKTOP, "tools.calligraphic", false); + double opacity = sp_desktop_get_master_opacity_tool (SP_ACTIVE_DESKTOP, "tools.calligraphic"); + double fillOpacity = sp_desktop_get_opacity_tool (SP_ACTIVE_DESKTOP, "tools.calligraphic", true); + //double strokeOpacity = sp_desktop_get_opacity_tool (SP_ACTIVE_DESKTOP, "tools.calligraphic", false); + sp_canvas_bpath_set_fill(SP_CANVAS_BPATH(cbp), ((fillColor & 0xffffff00) | SP_COLOR_F_TO_U(opacity*fillOpacity)), SP_WIND_RULE_EVENODD); + //on second thougtht don't do stroke yet because we don't have stoke-width yet and because stoke appears between segments while drawing + //sp_canvas_bpath_set_stroke(SP_CANVAS_BPATH(cbp), ((strokeColor & 0xffffff00) | SP_COLOR_F_TO_U(opacity*strokeOpacity)), 1.0, SP_STROKE_LINEJOIN_MITER, SP_STROKE_LINECAP_BUTT); sp_canvas_bpath_set_stroke(SP_CANVAS_BPATH(cbp), 0x00000000, 1.0, SP_STROKE_LINEJOIN_MITER, SP_STROKE_LINECAP_BUTT); /* fixme: Cannot we cascade it to root more clearly? */ g_signal_connect(G_OBJECT(cbp), "event", G_CALLBACK(sp_desktop_root_handler), SP_EVENT_CONTEXT(dc)->desktop); |
