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.3 required=5.0 tests=BAYES_00, REPLYTO_WITHOUT_TO_CC autolearn=no autolearn_force=no version=3.4.4 X-Google-Thread: 103376,136d550bc630ca91 X-Google-NewGroupId: yes X-Google-Attributes: gida07f3367d7,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Received: by 10.68.190.104 with SMTP id gp8mr203207pbc.4.1340297236186; Thu, 21 Jun 2012 09:47:16 -0700 (PDT) Path: l9ni3824pbj.0!nntp.google.com!news2.google.com!news.glorb.com!feeder.erje.net!news.mixmin.net!aioe.org!.POSTED!not-for-mail From: "Dmitry A. Kazakov" Newsgroups: comp.lang.ada Subject: Re: Drawing in a Gtk Ada window. Date: Thu, 21 Jun 2012 18:47:08 +0200 Organization: cbb software GmbH Message-ID: References: <4fe33f9f$0$3796$703f8584@news.kpn.nl> Reply-To: mailbox@dmitry-kazakov.de NNTP-Posting-Host: 4RFYTQ6jM/dAKFJoI0fUkg.user.speranza.aioe.org Mime-Version: 1.0 X-Complaints-To: abuse@aioe.org User-Agent: 40tude_Dialog/2.0.15.1 X-Notice: Filtered by postfilter v. 0.8.2 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Date: 2012-06-21T18:47:08+02:00 List-Id: On Thu, 21 Jun 2012 17:35:12 +0200, ldries46 wrote: > I want to draw a number of lines in an Gtk Window with Ada. > which kind of View should I use (Textview??, doesn't look logical). Gtk.Drawing_Area. Use Gtk_Drawing_Area_Record as the parent type. > I need to create the basic User interface with Glade. Can't help that. > I looked at Cairo as was suggested in a Gtk forum but I thank that is > shooting with a canon at a fly. Depends on what you are going to do. Drawing lines is doable in Gtk and works pretty well. But on anything beyond simple examples quickly becomes tedious especially computations of pixel sizes, alignment, aliasing etc. > I just need to create some elementary figures like straight lines in > different thickness and characters, randomly positioned, in different colors. > Furthermore I need to read the exact position of the mouse. http://www.dmitry-kazakov.de/ada/fuzzy.htm#7.2 The linguistic set editor does all this. See the package Gtk.Generic_Fuzzy_Linguistic_Set_Domain for sample code. Ignore all fuzzy stuff. What the thing does is drawing multi-lines and filling semi-transparent areas under them. -- Regards, Dmitry A. Kazakov http://www.dmitry-kazakov.de