diff options
| author | bulia byak <buliabyak@gmail.com> | 2008-07-18 03:21:00 +0000 |
|---|---|---|
| committer | buliabyak <buliabyak@users.sourceforge.net> | 2008-07-18 03:21:00 +0000 |
| commit | 1813d1df2972b51e8e0e47451443513240e6defb (patch) | |
| tree | 5909ac47cadbbe5f2a3b5fd4d4fc0a8bf039c9f6 /src/display/sp-ctrlline.cpp | |
| parent | Khmer translation updated (diff) | |
| download | inkscape-1813d1df2972b51e8e0e47451443513240e6defb.tar.gz inkscape-1813d1df2972b51e8e0e47451443513240e6defb.zip | |
fix artefacts left by text cursor and disappearing cursor on empty canvas
(bzr r6342)
Diffstat (limited to 'src/display/sp-ctrlline.cpp')
| -rw-r--r-- | src/display/sp-ctrlline.cpp | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/display/sp-ctrlline.cpp b/src/display/sp-ctrlline.cpp index f14eddfc2..95dd98f11 100644 --- a/src/display/sp-ctrlline.cpp +++ b/src/display/sp-ctrlline.cpp @@ -102,6 +102,8 @@ sp_ctrlline_render (SPCanvasItem *item, SPCanvasBuf *buf) if (!buf->ct) return; + sp_canvas_prepare_buffer (buf); + guint32 rgba = cl->rgba; cairo_set_source_rgba(buf->ct, SP_RGBA32_B_F(rgba), SP_RGBA32_G_F(rgba), SP_RGBA32_R_F(rgba), SP_RGBA32_A_F(rgba)); @@ -134,10 +136,10 @@ sp_ctrlline_update (SPCanvasItem *item, NR::Matrix const &affine, unsigned int f NR::Point s = cl->s * affine; NR::Point e = cl->e * affine; - item->x1 = (int)(MIN(s[NR::X], e[NR::X]) - 1); - item->y1 = (int)(MIN(s[NR::Y], e[NR::Y]) - 1); - item->x2 = (int)(MAX(s[NR::X], e[NR::X]) + 1); - item->y2 = (int)(MAX(s[NR::Y], e[NR::Y]) + 1); + item->x1 = round(MIN(s[NR::X], e[NR::X]) - 1); + item->y1 = round(MIN(s[NR::Y], e[NR::Y]) - 1); + item->x2 = round(MAX(s[NR::X], e[NR::X]) + 1); + item->y2 = round(MAX(s[NR::Y], e[NR::Y]) + 1); sp_canvas_request_redraw (item->canvas, (int)item->x1, (int)item->y1, (int)item->x2, (int)item->y2); } |
