summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: fc8a6ae)
raw | patch | inline | side by side (parent: fc8a6ae)
author | buliabyak <> | |
Sun, 28 Mar 2010 03:15:37 +0000 (00:15 -0300) | ||
committer | buliabyak <> | |
Sun, 28 Mar 2010 03:15:37 +0000 (00:15 -0300) |
src/display/nr-arena-glyphs.cpp | patch | blob | history |
index db09229156bdcbed9a2ddca0aa851981275ed8f6..ff320bd8125eb49d018697e9548c449c4a6a0134 100644 (file)
}
static NRArenaItem *
-nr_arena_glyphs_pick(NRArenaItem *item, Geom::Point p, gdouble /*delta*/, unsigned int /*sticky*/)
+nr_arena_glyphs_pick(NRArenaItem *item, Geom::Point p, gdouble delta, unsigned int /*sticky*/)
{
NRArenaGlyphs *glyphs;
@@ -246,7 +246,7 @@ nr_arena_glyphs_pick(NRArenaItem *item, Geom::Point p, gdouble /*delta*/, unsign
double const x = p[Geom::X];
double const y = p[Geom::Y];
/* With text we take a simple approach: pick if the point is in a characher bbox */
- if ((x >= item->bbox.x0) && (y >= item->bbox.y0) && (x <= item->bbox.x1) && (y <= item->bbox.y1)) return item;
+ if ((x + delta >= item->bbox.x0) && (y + delta >= item->bbox.y0) && (x - delta <= item->bbox.x1) && (y - delta <= item->bbox.y1)) return item;
return NULL;
}