From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-0.9 required=5.0 tests=BAYES_00,FORGED_GMAIL_RCVD, FREEMAIL_FROM autolearn=no autolearn_force=no version=3.4.4 X-Google-Thread: a07f3367d7,189c592184c1580e,start X-Google-Attributes: gida07f3367d7,public,usenet X-Google-NewGroupId: yes X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news2.google.com!postnews.google.com!d23g2000vbm.googlegroups.com!not-for-mail From: "RasikaSrinivasan@gmail.com" Newsgroups: comp.lang.ada Subject: GTKAda drawing Date: Thu, 8 Oct 2009 15:55:50 -0700 (PDT) Organization: http://groups.google.com Message-ID: NNTP-Posting-Host: 98.216.109.119 Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 X-Trace: posting.google.com 1255042551 8059 127.0.0.1 (8 Oct 2009 22:55:51 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Thu, 8 Oct 2009 22:55:51 +0000 (UTC) Complaints-To: groups-abuse@google.com Injection-Info: d23g2000vbm.googlegroups.com; posting-host=98.216.109.119; posting-account=mZyFSQoAAABfOmklsh1d8TPbS2LncUKl User-Agent: G2/1.0 X-HTTP-UserAgent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.1.3) Gecko/20090824 Firefox/3.5.3 (.NET CLR 3.5.30729),gzip(gfe),gzip(gfe) Xref: g2news2.google.com comp.lang.ada:8628 Date: 2009-10-08T15:55:50-07:00 List-Id: This I suspect could be a GtkAda related question: I have this handler to paint. Currentcolor : Gdk.Color.Gdk_Color ; function Canvas_Paint(canvas : access Gtk.Drawing_Area.Gtk_Drawing_Area_Record'Class) return Boolean is Drawwin : Gdk.Window.Gdk_Window ; Gc : Gdk.Gc.Gdk_gc ; begin pragma Debug(Put_Line("Repaint canvas")); Drawwin := Canvas.Get_Window ; Gdk.Gc.Gdk_New(Gc,drawwin) ; Gdk.Gc.Set_foreground(Gc,Currentcolor) ; pragma Debug(Showcurrentcolor); Newx := Newx + 10 ; Newy := Newy + 10 ; Gdk.Gc.Set_Line_Attributes( Gc , 5 , Gdk.Gc.Line_Solid , Gdk.Gc.Cap_Butt , Gdk.gc.Join_Round ) ; Gdk.drawable.Draw_Line( Drawwin , Gc , newx , newy , 100 , 100) ; return True; end Canvas_Paint ; whatever be the "currentcolor" my line is always of the same color. Perhaps this is not the way to choose the color of the pen to draw the line (and other figures). thanks for pointers. srini