* Drawing in a Gtk Ada window.
@ 2012-06-21 15:35 ldries46
2012-06-21 16:47 ` Dmitry A. Kazakov
0 siblings, 1 reply; 3+ messages in thread
From: ldries46 @ 2012-06-21 15:35 UTC (permalink / raw)
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). I need
to create the basic User interface with Glade.
I looked at Cairo as was suggested in a Gtk forum but I thank that is
shooting with a canon at a fly.
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.
L. Dries
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Drawing in a Gtk Ada window.
2012-06-21 15:35 Drawing in a Gtk Ada window ldries46
@ 2012-06-21 16:47 ` Dmitry A. Kazakov
2012-06-22 1:47 ` John B. Matthews
0 siblings, 1 reply; 3+ messages in thread
From: Dmitry A. Kazakov @ 2012-06-21 16:47 UTC (permalink / raw)
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
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2012-06-22 1:48 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-06-21 15:35 Drawing in a Gtk Ada window ldries46
2012-06-21 16:47 ` Dmitry A. Kazakov
2012-06-22 1:47 ` John B. Matthews
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox