Re: Gnome::Canvas::Line::property_line_style()
Samuel Abels <[email protected]> Sat, 25 Sep 2004 20:31:28 +0200
| Newsgroups | gmane.comp.gnome.gnomemm |
|---|---|
| Message-ID | <1096137088.10234.6.camel@chef> |
On Sat, 2004-09-25 at 19:52, Ole Laursen wrote: > "..." <[email protected]> writes: > > > Gnome::Canvas::Line segm = new Gnome::Canvas::Line(*(canvas->root()), points); > > segm->property_width() = 2; > > segm->property_color() = "black" > > segm->property_line_style() = Gdk::LINE_DOUBLE_DASH; > > > > where "points" is an appropriate Gnome::Canvas::Points. > > > > The problem is that the line is filled black but without any > > dashing. I tried also Gdk::LINE_ON_OFF_DASH, same problem. It's like > > that this instrucion does nothing. > > I don't think the anti-aliased canvas supports dashed lines, only the > GDK-based one. Tough luck. As an alternative, you could draw the canvas line using ArtVpathDash. I copied & pasted this together, so I wouldn't bet that it's 100% correct, but it gives you the idea: ------------------------- Gnome::Canvas::Rect border; ArtVpathDash dash; dash.offset = 0; dash.n_dash = 3; dash.dash = art_new(double, 3); dash.dash[0] = 1; dash.dash[1] = 1; dash.dash[2] = 1; border.property_dash() = ‐ ------------------------- AFAIK this should work with the AA'd canvas. -Samuel -- ------------------------------------------------------ | Samuel Abels | http://www.debain.org | | spam ad debain dod org | knipknap ad jabber dod org | ------------------------------------------------------