comp.lang.ada
 help / color / mirror / Atom feed
From: "Dmitry A. Kazakov" <mailbox@dmitry-kazakov.de>
Subject: Re: Drawing in a Gtk Ada window.
Date: Thu, 21 Jun 2012 18:47:08 +0200
Date: 2012-06-21T18:47:08+02:00	[thread overview]
Message-ID: <osqmlny5h4li$.iyyyl69gxnz2.dlg@40tude.net> (raw)
In-Reply-To: 4fe33f9f$0$3796$703f8584@news.kpn.nl

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



  reply	other threads:[~2012-06-21 16:47 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-06-21 15:35 Drawing in a Gtk Ada window ldries46
2012-06-21 16:47 ` Dmitry A. Kazakov [this message]
2012-06-22  1:47   ` John B. Matthews
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox