Message-ID: <452EC8E8.5080903 at rftp.com> Date: Thu, 12 Oct 2006 15:59:52 -0700 From: Robert Roessler Organization: Robert's High-performance Software MIME-Version: 1.0 To: LablGTK List Subject: Re: How to modify the Gdk.gc of a GDraw.pixmap ? References: <452EBA91.9000704 at tin.it> In-Reply-To: <452EBA91.9000704 at tin.it> Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Length: 1052 Stalkern 2 wrote: > I'm in trouble when trying to draw dotted lines and the like. > > I have a GDraw.pixmap and I would like to use the function > > Gdk.GC.set_dashes : Gdk.gc -> offset:int -> int list -> unit > > on it. > > But how do I access the Gdk.gc of a GDraw.pixmap _directly_? > > Shall I create a new GC and then... ? > > I feel like there is something that in spite of my copy of ocamlbrowser, > I can't browse very clearly yet ;-)) > > Thx for _any_ hint! I would say to do a GC.create call supplying the drawable (pixmap in this case) that you want to work with. Also, if it helps, a pixmap does not "have" a gc in the sense of owning one - you create a gc with an exemplar pixmap for the purpose of [for example] drawing into that pixmap - or others like it. Finally, note that set_dashes is just setting an attribute (a "value" in Gdk-land)... you will need to supply that gc along with a compatible drawable to a "draw" function to actually get your dotted lines. Robert Roessler robertr@rftp.com http://www.rftp.com