diff options
| author | bulia byak <buliabyak@gmail.com> | 2006-05-17 06:57:31 +0000 |
|---|---|---|
| committer | buliabyak <buliabyak@users.sourceforge.net> | 2006-05-17 06:57:31 +0000 |
| commit | 89ebf1ef9be50eea5e790298bca211fffbad12a8 (patch) | |
| tree | 03f50f02f8b98dfdb04d296dcac310fa79f2d649 /src/dyna-draw-context.cpp | |
| parent | Flipped top/bottom in layers UI to reflect visible stacking. (diff) | |
| download | inkscape-89ebf1ef9be50eea5e790298bca211fffbad12a8.tar.gz inkscape-89ebf1ef9be50eea5e790298bca211fffbad12a8.zip | |
do calligraphic draw opacity correctly
(bzr r863)
Diffstat (limited to 'src/dyna-draw-context.cpp')
| -rw-r--r-- | src/dyna-draw-context.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/dyna-draw-context.cpp b/src/dyna-draw-context.cpp index ebabeef31..ff570fb62 100644 --- a/src/dyna-draw-context.cpp +++ b/src/dyna-draw-context.cpp @@ -46,6 +46,7 @@ #include "context-fns.h" #include "sp-item.h" #include "inkscape.h" +#include "color.h" #define DDC_RED_RGBA 0xff0000ff @@ -806,9 +807,10 @@ fit_and_split_calligraphics(SPDynaDrawContext *dc, gboolean release) SPCurve *curve = sp_curve_copy(dc->currentcurve); sp_canvas_bpath_set_bpath(SP_CANVAS_BPATH (cbp), curve); sp_curve_unref(curve); - guint32 fillColor = sp_desktop_get_color_tool(SP_ACTIVE_DESKTOP, "tools.calligraphic", true); - sp_canvas_bpath_set_fill(SP_CANVAS_BPATH(cbp), fillColor , SP_WIND_RULE_EVENODD); + 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); 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); |
