
Please, does there exist a tool (library) in Haskell that supports doing the following with graphics? (1) To draw a curve by mouse on a screen and save this picture in a file (many different curves to be input this way). (2) To save in data.txt the coordinates of the points of this curve, say, 800 pairs of numbers (floating point or rational ...). (3) Reversely: to draw a curve on a screen by inputting from such data.txt. The main is (1)&(2). Because currently I set a curve by putting many times the '*' character and `space' to a text file, and this takes long. Thanks, ------ Sergei

Gtk? On 3/1/20 8:44 PM, mechvel@scico.botik.ru wrote:
Please,
does there exist a tool (library) in Haskell that supports doing the following with graphics?
(1) To draw a curve by mouse on a screen and save this picture in a file (many different curves to be input this way). (2) To save in data.txt the coordinates of the points of this curve, say, 800 pairs of numbers (floating point or rational ...). (3) Reversely: to draw a curve on a screen by inputting from such data.txt.
The main is (1)&(2). Because currently I set a curve by putting many times the '*' character and `space' to a text file, and this takes long.
Thanks,
------ Sergei
_______________________________________________ Haskell-Cafe mailing list To (un)subscribe, modify options or view archives go to: http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe Only members subscribed via the mailman list are allowed to post.

On 3/1/20 8:44 PM, mechvel@scico.botik.ru wrote:
Please,
does there exist a tool (library) in Haskell that supports doing the following with graphics?
(1) To draw a curve by mouse on a screen and save this picture in a file (many different curves to be input this way). (2) To save in data.txt the coordinates of the points of this curve, say, 800 pairs of numbers (floating point or rational ...). (3) Reversely: to draw a curve on a screen by inputting from such data.txt.
The main is (1)&(2). Because currently I set a curve by putting many times the '*' character and `space' to a text file, and this takes long.
Sounds like a part of what Detexify does. Detexify runs in a Browser.

Thanks to people for help. So far I have an impression that this one is close to what it is needed: a Gtk2Hs library for GUI (graphical user interface), https://archives.haskell.org/code.haskell.org/gtk2hs/docs/tutorial/Tutorial_... It has Appendix. Drawing with Cairo: Getting Started It reads the mouse movements converting it into a drawing, with saving a picture in the formats of pdf, png, svg, ... But I do not find there the possibility to save this drawing as a sequence of the coordinate pairs, pairs of numbers in a .txt file. It is evident that such a possibility can easily be provided. I look at its homepage http://projects.haskell.org/gtk2hs/ and wonder: where is any email address to ask this question about obtaining the coordinates. (?) Thanks, ------ Sergei On 2020-03-03 01:45, Branimir Maksimovic wrote:
Gtk?
On 3/1/20 8:44 PM, mechvel@scico.botik.ru wrote:
Please,
does there exist a tool (library) in Haskell that supports doing the following with graphics?
(1) To draw a curve by mouse on a screen and save this picture in a file (many different curves to be input this way). (2) To save in data.txt the coordinates of the points of this curve, say, 800 pairs of numbers (floating point or rational ...). (3) Reversely: to draw a curve on a screen by inputting from such data.txt.
The main is (1)&(2). Because currently I set a curve by putting many times the '*' character and `space' to a text file, and this takes long.
Thanks,
------ Sergei
_______________________________________________ Haskell-Cafe mailing list To (un)subscribe, modify options or view archives go to: http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe Only members subscribed via the mailman list are allowed to post.
Haskell-Cafe mailing list To (un)subscribe, modify options or view archives go to: http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe Only members subscribed via the mailman list are allowed to post.

gtk2hs is a dead project, gi is its successor. I don't know if it has
similar examples.
On Tue, Mar 3, 2020 at 7:27 AM
Thanks to people for help.
So far I have an impression that this one is close to what it is needed:
a Gtk2Hs library for GUI (graphical user interface),
https://archives.haskell.org/code.haskell.org/gtk2hs/docs/tutorial/Tutorial_...
It has Appendix. Drawing with Cairo: Getting Started
It reads the mouse movements converting it into a drawing, with saving a picture in the formats of pdf, png, svg, ...
But I do not find there the possibility to save this drawing as a sequence of the coordinate pairs, pairs of numbers in a .txt file. It is evident that such a possibility can easily be provided.
I look at its homepage http://projects.haskell.org/gtk2hs/
and wonder: where is any email address to ask this question about obtaining the coordinates. (?)
Thanks,
------ Sergei
On 2020-03-03 01:45, Branimir Maksimovic wrote:
Gtk?
On 3/1/20 8:44 PM, mechvel@scico.botik.ru wrote:
Please,
does there exist a tool (library) in Haskell that supports doing the following with graphics?
(1) To draw a curve by mouse on a screen and save this picture in a file (many different curves to be input this way). (2) To save in data.txt the coordinates of the points of this curve, say, 800 pairs of numbers (floating point or rational ...). (3) Reversely: to draw a curve on a screen by inputting from such data.txt.
The main is (1)&(2). Because currently I set a curve by putting many times the '*' character and `space' to a text file, and this takes long.
Thanks,
------ Sergei
_______________________________________________ Haskell-Cafe mailing list To (un)subscribe, modify options or view archives go to: http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe Only members subscribed via the mailman list are allowed to post.
Haskell-Cafe mailing list To (un)subscribe, modify options or view archives go to: http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe Only members subscribed via the mailman list are allowed to post.
_______________________________________________ Haskell-Cafe mailing list To (un)subscribe, modify options or view archives go to: http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe Only members subscribed via the mailman list are allowed to post.
-- brandon s allbery kf8nh allbery.b@gmail.com

On 2020-03-03 15:44, Brandon Allbery wrote:
gtk2hs is a dead project, gi is its successor. I don't know if it has similar examples.
* Still Gtk2Hs does no seem to provide an interface mouse-drawn curve <--> coordinate list, * I do not see a Manual on gi or Gtk or Hoodle, * Detexity does not look like a free tool (?). So, it looks like I have to use a Python script for the needed interface, while the main program being written in Haskell. ------ Sergei
Gtk?
On 3/1/20 8:44 PM, mechvel@scico.botik.ru wrote:
Please,
does there exist a tool (library) in Haskell that supports doing
On 2020-03-03 01:45, Branimir Maksimovic wrote: the
following with graphics?
(1) To draw a curve by mouse on a screen and save this picture in a file (many different curves to be input this way). (2) To save in data.txt the coordinates of the points of this curve, say, 800 pairs of numbers (floating point or rational ...). (3) Reversely: to draw a curve on a screen by inputting from such
data.txt.
The main is (1)&(2). Because currently I set a curve by putting many times the '*' character and `space' to a text file, and this takes long.
Thanks,
------ Sergei
_______________________________________________ Haskell-Cafe mailing list To (un)subscribe, modify options or view archives go to: http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe Only members subscribed via the mailman list are allowed to post.
Haskell-Cafe mailing list To (un)subscribe, modify options or view archives go to: http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe Only members subscribed via the mailman list are allowed to post.
_______________________________________________ Haskell-Cafe mailing list To (un)subscribe, modify options or view archives go to: http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe Only members subscribed via the mailman list are allowed to post.
--
brandon s allbery kf8nh allbery.b@gmail.com

On Tue, 3 Mar 2020, mechvel@scico.botik.ru wrote:
On 2020-03-03 15:44, Brandon Allbery wrote:
gtk2hs is a dead project, gi is its successor. I don't know if it has similar examples.
* Still Gtk2Hs does no seem to provide an interface mouse-drawn curve <--> coordinate list, * I do not see a Manual on gi or Gtk or Hoodle, * Detexity does not look like a free tool (?).
https://github.com/kirel/detexify I have not tried, but I guess that you could also do it with wxhaskell.

On 2020-03-03 21:04, Henning Thielemann wrote:
On Tue, 3 Mar 2020, mechvel@scico.botik.ru wrote:
On 2020-03-03 15:44, Brandon Allbery wrote:
gtk2hs is a dead project, gi is its successor. I don't know if it has similar examples.
* Still Gtk2Hs does no seem to provide an interface mouse-drawn curve <--> coordinate list, * I do not see a Manual on gi or Gtk or Hoodle, * Detexity does not look like a free tool (?).
Thank you for the references. I am sorry. It looks now that Detexify is free.
I have not tried, but I guess that you could also do it with wxhaskell.
I do not see tutorials on Detexify nor on wxHaskell. But at least I see the web pages on these tools to where I just put my question. Thanks, ------ Sergei

Hoodle is a program that does items 1-3, though you have to work in its file format.
El 1 mar 2020, a las 14:44, mechvel@scico.botik.ru escribió:
Please,
does there exist a tool (library) in Haskell that supports doing the following with graphics?
(1) To draw a curve by mouse on a screen and save this picture in a file (many different curves to be input this way). (2) To save in data.txt the coordinates of the points of this curve, say, 800 pairs of numbers (floating point or rational ...). (3) Reversely: to draw a curve on a screen by inputting from such data.txt.
The main is (1)&(2). Because currently I set a curve by putting many times the '*' character and `space' to a text file, and this takes long.
Thanks,
------ Sergei
_______________________________________________ Haskell-Cafe mailing list To (un)subscribe, modify options or view archives go to: http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe Only members subscribed via the mailman list are allowed to post.
participants (5)
-
amindfv@gmail.com
-
Brandon Allbery
-
Branimir Maksimovic
-
Henning Thielemann
-
mechvel@scico.botik.ru