|
Post by vovchik on Jan 4, 2021 23:19:38 GMT 1
Dear Peter,
Thanks. I am happy to report that all three versions (gtk, motif and xaw) work fine on my Mint and Pi4.
With kind regards, vovchik
|
|
|
Post by Pjot on Feb 9, 2021 22:21:56 GMT 1
All, The same clock, but now using SVG as drawing backend (instead of Cairo). The program is here. BR, Peter
|
|
|
Post by bigbass on Feb 9, 2021 23:14:56 GMT 1
Hello Peter
bacon http://basic-converter.org/gui/clock-svg.bac Fetching file...................done. Converting 'clock-svg.bac'... done, 62 lines were processed in 0.115 seconds. Creating lexical analyzer... done. Compiling 'clock-svg.bac'... cc `pkg-config --cflags gtk+-3.0` -c clock-svg.bac.c cc -o clock-svg clock-svg.bac.o `pkg-config --libs gtk+-3.0` -lm Done, program 'clock-svg' ready. pi@raspberrypi:~/Desktop/PETER $ ./clock-svg
works well on the RPI3!
thanks for the demo
Joe
P.S I saw your comment about the forum upload limit I will remove older large files of code I did and upload any heavy files to another site ( but keep the link to it) I started doing this in August but there is still more large older versions that could be removed working on it it all adds up and it's good to keep things clean
Joe
|
|
|
Post by vovchik on Feb 9, 2021 23:23:05 GMT 1
Dear Peter (and Joe),
Also confirming that everything works fine on Pi4 and Mint. Thanks...
With kind regards, vovchik
|
|
|
Post by Pjot on Feb 11, 2021 20:19:21 GMT 1
All, Some time ago forum member vovchik already opened my eyes for the power of the SVG standard Using SVG, it is possible to create animations. I wondered if the clock could be defined solely within SVG using its animation features. In the process, I discovered that GTK cannot display an animated SVG (at least not the GtkImage widget). Support for displaying animations mainly can be found in webbrowsers, and so in Webkit. With a small adjustment in the GUIDEFINE function we can now add foreign types to our GUI definition, a type like WEBKIT_TYPE for example. This allows us to create and show an animated SVG within GTK. The latest beta should be able to compile this clock program. It is completely declarative and only defines a GUI and an animated SVG for the clock. Regards Peter
|
|
|
Post by vovchik on Feb 12, 2021 0:01:03 GMT 1
Dear Peter,
Thanks. It works very nicely on Pi and Mint - and the second-hand movement is very smooth. The code is also tiny....
With kind regards, vovchik
|
|
|
Post by bigbass on Feb 12, 2021 6:38:34 GMT 1
Hello Peter
It is working for me also and adding webkit opens many more options to the mix
And as vovchik said The code is compact
Joe
|
|
|
Post by vovchik on Feb 12, 2021 13:57:29 GMT 1
Dear all, Here is that animated clock with a slightly modified svg. We can actually make it very pretty with a tiny bit of editing... With kind regards, vovchik
|
|
|
Post by vovchik on Feb 12, 2021 15:54:24 GMT 1
Dear all, And we can get rather fancy... With kind regards, vovchik
|
|
|
Post by bigbass on Feb 12, 2021 16:56:25 GMT 1
Hello vovchik
I enjoyed the grace and elegance of the micro surgery those type of mods are my favorite to watch in action
when you carefully just edit only what is needed and keep the code at a minimum but giving a maximum impact!
I am always amazed (even after many years of watching) when you add your artistic touch
thanks Joe
Thanks Peter for all your improvements making bacon a very powerful tool that can be used in many ways and many coding styles. That's what makes bacon unique none of this would be possible if we just stuck to thinking in QBASIC and never stretched out and added modern coding ideas to the mix
|
|
|
Post by Pjot on Feb 12, 2021 18:33:36 GMT 1
Thanks vovchik, That looks awesome, and all works perfect on my machine! Looking at the SVG definitions, they look very advanced - I really need to study the SVG standards more, because I hardly understand what your code is doing BR, Peter
|
|
|
Post by vovchik on Feb 12, 2021 23:05:34 GMT 1
Dear all, Thanks. The animations would not be here without Peter, of course. Here are three more - the last one (5) contains a PNG imbedded within an SVG. With kind regards, vovchik
|
|
|
Post by bigbass on Feb 13, 2021 7:55:04 GMT 1
|
|
|
Post by Pjot on Feb 13, 2021 9:15:12 GMT 1
Really wonderful. I like the LaCrosse clock the most Thanks, Peter Attachments:
|
|
|
Post by vovchik on Feb 13, 2021 12:05:33 GMT 1
Dear all, Here is another one - based on an alarm clock. I often construct these SVGs entirely by hand. Sometimes I use potrace to get an outline of an object and then fiddle a bit with the details, transforms, gradients and fills. Editors tend to be rather clumsy (all of them, I think), and you can do a lot by hand if you understand SVG objects and properties/attributes. Those are pretty well documented, and it is great that SVGs are plain old text files, making customization easy. With kind regards, vovchik
|
|