was: how to do a dash line in goocanvas, how to set color or position of a goocanvasgroup
- From: D M German <dmg uvic ca>
- To: Damon Chaplin <damonachaplin gmail com>
- Cc: goocanvas-list gnome org
- Subject: was: how to do a dash line in goocanvas, how to set color or position of a goocanvasgroup
- Date: Sun, 29 Sep 2013 10:24:42 -0400
Damon Chaplin twisted the bytes to say:
Hi Damon, sorry I haven't replied earlier (I am doing the porting in my
spare time and I work has been busy lately).
I really do appreciate your help,
Damon> Oops. Are you using C?
Yes.
Damon> In that case forget about the introspection bug - you just need to do
Damon> something like this:
GooCanvasLineDash *dash = goo_canvas_line_dash_new (2, 10.0, 10.0);
item = goo_canvas_rect_new (root, 20, 30, 50, 30,
"stroke-color", "red",
"line-dash", dash,
NULL);
goo_canvas_line_dash_unref (dash);
I guess in that case it is just simpler to delete the old line and draw
a new line in its place. I suspect that there is no property in the
GooCanvasItem that I can simply reset. But that is ok.
I have another problem now. I have a created a GooCanvasGroup. It
contains a sequence of 2 points polylines each with a different width
(this allows to support pressure sensitive line drawing: the width is
proportional to the pressure used to draw the line.
One of the problems I am facing is that when I try to set the properties
in the group, it does not change. For example, the following code
changes the color and position of any GooItem in the canvas, but it does
not do anything if the type is a GooCanvasGroup. I have debugged it and
I am positive that it is a GooCanvasGroup (it works for a
GooCanvasPolyline as expected):
g_object_set(item->canvas_item,
"stroke-color-rgba", item->brush.color_rgba,
"x", 10.0,
NULL);
Is this the way I should be changing its color once it is rendered in
the screen?
thanks again Damon, I very much appreciate your help,
--
Daniel M. German "Reading the best writers is not
The Western Cannon, H. Bloom -> going to make us better citizens"
http://turingmachine.org/
http://silvernegative.com/
dmg (at) uvic (dot) ca
replace (at) with @ and (dot) with .
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]