Re: is_item_at
- From: Damon Chaplin <damonachaplin gmail com>
- To: control H <control h gmail com>
- Cc: goocanvas-list gnome org, Damon Chaplin <damon karuna eclipse co uk>
- Subject: Re: is_item_at
- Date: Tue, 24 May 2011 11:34:29 +0100
On 23 May 2011 14:28, control H <control h gmail com> wrote:
> I'm not using large coordinates. The x&y coordinates look very reasonable.
> The only place where I'm using a transformation matrix (I think) is in
> the constructor:
>
> goo_line_item_new (GooCanvasItem *parent,
> double x, double y,
> gdouble dx,
> gdouble dy,
> ...)
> {
> GooCanvasItem *item;
> GooLineItem *line_item;
> const char *first_property;
> va_list var_args;
>
> item = g_object_new (GOO_TYPE_LINE_ITEM, NULL);
>
> line_item = (GooLineItem*) item;
> line_item->dx = dx;
> line_item->dy = dy;
>
> goo_canvas_item_translate(item,x,y);
>
> va_start (var_args, dy);
> first_property = va_arg (var_args, char*);
> if (first_property)
> g_object_set_valist ((GObject*) item, first_property, var_args);
> va_end (var_args);
>
> if (parent)
> {
> goo_canvas_item_add_child (parent, item, -1);
> g_object_unref (item);
> }
>
> g_object_set(item,"can-focus", TRUE,NULL);
>
> return item;
> }
>
> Example line showing problems:
>
> goo_line_item_new (root, 50,50,140, 30,
> "stroke-color", "blue",
> "line-width", 3.0,
> NULL);
>
> In addition it seems that the line-width + 4.0 in the is_item_at()
> code doesn't seem to have any influence.
I can't understand the problem either.
If you can produce a simple test app I'll have a look at it.
Damon
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]