GtkDialog - tips
Thanks SFR, the <height> attribute did it.
(I was trying height-request that is apparently ignored)
What are you up to these days?...
(I was trying height-request that is apparently ignored)
What are you up to these days?...
== [url=http://www.catb.org/esr/faqs/smart-questions.html]Here is how to solve your[/url] [url=https://www.chiark.greenend.org.uk/~sgtatham/bugs.html]Linux problems fast[/url] ==
I took a vacation from Slacko for now and been playing with FD64 for last couple of months, although I'm still tracking what's going on in Woof-CE.mavrothal wrote:What are you up to these days?...
Greetings!
[color=red][size=75][O]bdurate [R]ules [D]estroy [E]nthusiastic [R]ebels => [C]reative [H]umans [A]lways [O]pen [S]ource[/size][/color]
[b][color=green]Omnia mea mecum porto.[/color][/b]
[b][color=green]Omnia mea mecum porto.[/color][/b]
If you are into 64s, I believe slacko64 is going to be an orphan if not an orphan already...SFR wrote:I took a vacation from Slacko for now and been playing with FD64 for last couple of months, although I'm still tracking what's going on in Woof-CE.mavrothal wrote:What are you up to these days?...
== [url=http://www.catb.org/esr/faqs/smart-questions.html]Here is how to solve your[/url] [url=https://www.chiark.greenend.org.uk/~sgtatham/bugs.html]Linux problems fast[/url] ==
- fabrice_035
- Posts: 765
- Joined: Mon 28 Apr 2014, 17:54
- Location: Bretagne / France
- mister_electronico
- Posts: 969
- Joined: Sun 20 Jan 2008, 20:20
- Location: Asturias_ España
- Contact:
Question?
Hi I'm trying to create a rotary knob by a svg image
I want to create an event every time I press the picture with the mouse but can not find how to do it.
I do not know how to do it but the idea would do something like this
I know that this does not work but this would be the idea.
Any idea
Thanks ... greetings
I want to create an event every time I press the picture with the mouse but can not find how to do it.
I do not know how to do it but the idea would do something like this
Code: Select all
<pixmap>
<input file>./rotary1.svg</input>
<action signal="clicked">exec somescript</action>
</pixmap>
Any idea
Thanks ... greetings
to mister_electronico
The script gtkdialog-splash closes the window when there is a mouse over
event but it has to know where the window is of course.
CLOSETAG2='<action signal="enter-notify-event" type="exit">Exit on mouse-over</action>'
Explained HERE
_________________________________________________
The script gtkdialog-splash closes the window when there is a mouse over
event but it has to know where the window is of course.
CLOSETAG2='<action signal="enter-notify-event" type="exit">Exit on mouse-over</action>'
Explained HERE
_________________________________________________
- MochiMoppel
- Posts: 2084
- Joined: Wed 26 Jan 2011, 09:06
- Location: Japan
Re: Question?
Strangely the pixmap widget doesn't respond to button signals (although it should, according to the manual).mister_electronico wrote:I want to create an event every time I press the picture with the mouse but can not find how to do it.
However it works when you wrap it into an eventbox widget:
Code: Select all
<eventbox>
<pixmap>
<input file>./rotary1.svg</input>
</pixmap>
<action signal="button-press-event">exec somescript</action>
</eventbox>
Code: Select all
#ONLY KEYS TRIGGER BEEP
echo '
<window>
<pixmap><input file>/usr/share/backgrounds/default.jpg</input></pixmap>
<action signal="key-press-event">beep -f100</action>
<action signal="button-press-event">beep -f900</action>
</window>' | gtkdialog -sc
Code: Select all
#ONLY BUTTONS TRIGGER BEEP
echo '
<window>
<eventbox>
<pixmap><input file>/usr/share/backgrounds/default.jpg</input></pixmap>
<action signal="key-press-event">beep -f100</action>
<action signal="button-press-event">beep -f900</action>
</eventbox>
</window>' | gtkdialog -sc
Code: Select all
#BUTTONS AND KEYS TRIGGER BEEP
echo '
<window>
<eventbox>
<pixmap><input file>/usr/share/backgrounds/default.jpg</input></pixmap>
</eventbox>
<action signal="key-press-event">beep -f100</action>
<action signal="button-press-event">beep -f900</action>
</window>' | gtkdialog -sc
No eventbox needed when the pixmap is packed in a scrollable box:
Code: Select all
#ONLY BUTTONS TRIGGER BEEP
echo '
<window>
<eventbox>
<vbox scrollable="false">
<pixmap><input file>/usr/share/backgrounds/default.jpg</input></pixmap>
</vbox>
<action signal="key-press-event">beep -f100</action>
<action signal="button-press-event">beep -f900</action>
</eventbox>
</window>' | gtkdialog -sc
Code: Select all
##BUTTONS AND KEYS TRIGGER BEEP
echo '
<window>
<vbox scrollable="true">
<pixmap><input file>/usr/share/backgrounds/default.jpg</input></pixmap>
</vbox>
<action signal="key-press-event">beep -f100</action>
<action signal="button-press-event">beep -f900</action>
</window>' | gtkdialog -sc
Last edited by MochiMoppel on Mon 23 Oct 2017, 09:43, edited 2 times in total.
a knob would be very handy.
The challenge is to keep adjusting the knob as long as the button is pressed.
Some loud thinking (not tested at all):
The challenge is to keep adjusting the knob as long as the button is pressed.
Some loud thinking (not tested at all):
Code: Select all
function (){
- use getcurpos to check if mouse is moved up or down.
- redraw svg
- save value
}
export -f function
<timer visible="false" milliseconds="true" interval="100">
<variable>TIMER</variable>
<sensitive>false</sensitive>
<action>function</action>
<action>refresh:SVG</action>
</timer>
<eventbox>
<pixmap>
<input file>/path/file.svg</input>
<variable>SVG</variable>
</pixmap>
<action signal="button-press-event">enable:TIMER</action>
<action signal="button-release-event">disable:TIMER</action>
</eventbox>
- mister_electronico
- Posts: 969
- Joined: Sun 20 Jan 2008, 20:20
- Location: Asturias_ España
- Contact:
Thanks guys
Thanks guys for the answers, never stops learning with you.
don570 very interesting program gtkdialog-splash I'll see how to apply to the program.
MochiMoppel yes is true it works when you wrap it into an eventbox.
So the problem is solved. Below the program works I show.
Zigbert all your thoughts are true, I have been very optimistic to make some considerations about the program.
And now one of the problems is how to tell the program what position the pixmap is abut.
Keep in mind that the program user can move the window and this would do would vary the position of the pixmap.
I find this to be the main problem.
Like you said with getcurpos we can know the position of the cursor, this idea gave me SFR with measur3r v1.2 program and how to use it:
http://murga-linux.com/puppy/viewtopic.php?t=97989
I'm getting into a big mess. In my small town say:
Too much grain for as little chicken.
In the next post I show you the program
_______________________________________________________________________
My Blog
https://misterelectronicoes.wordpress.c ... -homemade/
don570 very interesting program gtkdialog-splash I'll see how to apply to the program.
MochiMoppel yes is true it works when you wrap it into an eventbox.
So the problem is solved. Below the program works I show.
Zigbert all your thoughts are true, I have been very optimistic to make some considerations about the program.
And now one of the problems is how to tell the program what position the pixmap is abut.
Keep in mind that the program user can move the window and this would do would vary the position of the pixmap.
I find this to be the main problem.
Like you said with getcurpos we can know the position of the cursor, this idea gave me SFR with measur3r v1.2 program and how to use it:
http://murga-linux.com/puppy/viewtopic.php?t=97989
I'm getting into a big mess. In my small town say:
Too much grain for as little chicken.
In the next post I show you the program
_______________________________________________________________________
My Blog
https://misterelectronicoes.wordpress.c ... -homemade/
Last edited by mister_electronico on Thu 26 Mar 2015, 21:12, edited 1 time in total.
- mister_electronico
- Posts: 969
- Joined: Sun 20 Jan 2008, 20:20
- Location: Asturias_ España
- Contact:
The program.
A first program that works with the help of you is this:
_______________________________________________________________________
My Blog
https://misterelectronicoes.wordpress.c ... -homemade/
Code: Select all
#!/bin/sh
export MAIN_DIALOG='
<window title="Meter_equipment" width-request="400" height-request="360" resizable="false">
<vbox>
<hbox>
<eventbox>
<pixmap><input file>./rotary1.svg</input></pixmap>
<action signal="button-press-event">echo "HELLO"</action>
</eventbox>
</hbox>
<timer visible="false" milliseconds="true" interval="250">
<action>refresh:MIL1</action>
</timer>
<hbox>
<button><label> Exit </label>
<action>"killall meter"</action>
<action>exit:Exit</action>
</button>
</hbox>
</vbox>
</window>
'
gtkdialog --program=MAIN_DIALOG
_______________________________________________________________________
My Blog
https://misterelectronicoes.wordpress.c ... -homemade/
- Attachments
-
- rotary1.png
- (14.24 KiB) Downloaded 511 times
Last edited by mister_electronico on Thu 26 Mar 2015, 21:12, edited 1 time in total.
- mister_electronico
- Posts: 969
- Joined: Sun 20 Jan 2008, 20:20
- Location: Asturias_ España
- Contact:
The svg imagen
The SVG is this:
It is easy to rotate the image with:
transform="rotate(90) translate(0,-120)"
In this case I do rotate 90 degrees but substituting a variable for number 90 we can turn what pleases us.
all the files together in the following archive for download.
All must be in the same folder and run:
./rotary
Thanks gentlemen's late I prepare to go to bed I have to work tomorrow.
_______________________________________________________________________
My Blog
https://misterelectronicoes.wordpress.c ... -homemade/
Code: Select all
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.0//EN"
"http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd">
<!-- Created with Inkscape ("http://www.inkscape.org/") -->
<svg
id="svg1"
sodipodi:version="0.32"
inkscape:version="0.36"
xmlns="http://www.w3.org/2000/svg"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
xmlns:xlink="http://www.w3.org/1999/xlink"
width="35mm"
height="35mm"
sodipodi:docbase="/mnt/home/PROGRAMACION/GTKDIALOG/EJERCICIOS_EJEMPLOS/01_MANDOS"
sodipodi:docname="/mnt/home/PROGRAMACION/GTKDIALOG/EJERCICIOS_EJEMPLOS/01_MANDOS/rotary1.svg">
<defs
id="defs3" />
<sodipodi:namedview
id="base" />
<image
xlink:href="rotary1.png"
sodipodi:absref="/mnt/home/PROGRAMACION/GTKDIALOG/EJERCICIOS_EJEMPLOS/01_MANDOS/rotary1.png"
width="120.000000"
height="120.000000"
transform="rotate(90) translate(0,-120)"
id="image562" />
</svg>
It is easy to rotate the image with:
transform="rotate(90) translate(0,-120)"
In this case I do rotate 90 degrees but substituting a variable for number 90 we can turn what pleases us.
all the files together in the following archive for download.
All must be in the same folder and run:
./rotary
Thanks gentlemen's late I prepare to go to bed I have to work tomorrow.
_______________________________________________________________________
My Blog
https://misterelectronicoes.wordpress.c ... -homemade/
- Attachments
-
- knob.tar.gz
- (15.32 KiB) Downloaded 240 times
Re: Thanks guys
There are some special, internal variables in Gtkdialog, for instance: $PTR_X & $PTR_Y - they show a relative position of mouse cursor within the window (but you need to click somewhere to update them).mister_electronico wrote:And now one of the problems is how to tell the program what position the pixmap is abut.
Keep in mind that the program user can move the window and this would do would vary the position of the pixmap.
I find this to be the main problem.
Code: Select all
echo '
<eventbox>
<pixmap>
<input file>/usr/share/backgrounds/default.jpg</input>
<width>300</width>
</pixmap>
<action signal="button-press-event">echo "X: $PTR_X Y:$PTR_Y"</action>
</eventbox>' | gtkdialog -s
However, in order to read X/Y coordinates continously (e.g. you pressed and keep holding a mouse button and moving the cursor), you'd have to use getcurpos anyways, like in Sigmund's example.
It's not so hard to calculate the proper offsets to get relative coordinates, though. I've done it in BDraw a while back.
Just keep in mind that your picture must be placed in upper-left corner (no other widgets can separate it from left and upper edges) otherwise calculations will go wrong (because widgets' dimensions may depend on e.g. current theme):
Code: Select all
read MX MY WX WY WI <<< `getcurpos && xwininfo -name "$WIN_NAME" 2>/dev/null | awk 'NR>=4&&NR<=5 {print $4} NR==8 {print $2}'`
X=$((($MX-$WX)-($WI-$PIC_X)/2))
Y=$(($MY-$WY-$YF))
PIC_X is image's width (as it is displayed).
YF is needed fix for height (~6 is fine for eventbox+pixmap).
And an ad-hoc, working example:
Code: Select all
#!/bin/bash
PICTURE=/usr/share/backgrounds/default.jpg
export WIN_NAME="Some Window"
export YF=6
export PIC_X=300
# Get current, relative position of cursor
get_xy () {
read MX MY WX WY WI <<< `getcurpos && xwininfo -name "$WIN_NAME" 2>/dev/null | awk 'NR>=4&&NR<=5 {print $4} NR==8 {print $2}'`
X=$((($MX-$WX)-($WI-$PIC_X)/2))
Y=$(($MY-$WY-$YF))
echo "X: $X Y: $Y"
}
export -f get_xy
echo '
<window title="'${WIN_NAME}'">
<vbox>
<eventbox>
<pixmap>
<input file>'${PICTURE}'</input>
<width>'${PIC_X}'</width>
</pixmap>
<action signal="button-press-event">enable:varTIMER</action>
<action signal="button-release-event">disable:varTIMER</action>
</eventbox>
<timer visible="false" milliseconds="true" interval="100" sensitive="false">
<variable>varTIMER</variable>
<action>get_xy</action>
</timer>
</vbox>
</window>' | gtkdialog -s
Greetings!
[color=red][size=75][O]bdurate [R]ules [D]estroy [E]nthusiastic [R]ebels => [C]reative [H]umans [A]lways [O]pen [S]ource[/size][/color]
[b][color=green]Omnia mea mecum porto.[/color][/b]
[b][color=green]Omnia mea mecum porto.[/color][/b]
- mister_electronico
- Posts: 969
- Joined: Sun 20 Jan 2008, 20:20
- Location: Asturias_ España
- Contact:
Hi SFR
Hi SFR It's just perfect, is the fix to the problem, I do not know how long must I have been dedicated to this but I think I would come Christmas.
I do not see taking up much busy the CPU, the program Htop I see very little activity even if I spend a lot of time to act on the knob.
On the other hand it seems perfect that just keeps busy while you press the mouse on the image.
Thing is done in very few moments to manage the program.
I said very high it is easy to rotate the svg image, but now I see not so clear.
This is keeping my mind busy all the time, do not eat, do not drink, no sex .. lol
So this weekend I'm going to put into making rotate knob in perfect condition.
And when finished will put the results here.
Thank you very much for your great contribution SFR and all these good people of this forum.
Greetings.
I do not see taking up much busy the CPU, the program Htop I see very little activity even if I spend a lot of time to act on the knob.
On the other hand it seems perfect that just keeps busy while you press the mouse on the image.
Thing is done in very few moments to manage the program.
I said very high it is easy to rotate the svg image, but now I see not so clear.
This is keeping my mind busy all the time, do not eat, do not drink, no sex .. lol
So this weekend I'm going to put into making rotate knob in perfect condition.
And when finished will put the results here.
Thank you very much for your great contribution SFR and all these good people of this forum.
Greetings.
- mister_electronico
- Posts: 969
- Joined: Sun 20 Jan 2008, 20:20
- Location: Asturias_ España
- Contact:
hi
Just when I thought I found this program go crazy do not know if you belongs SFR and I miss a first adaptation and makes fairly good turn knob.
The program is spiral.sh.
And I've only adapted to rotate without yet none of the above apply.
It now remains to continue the program but wanted only saw it.
lThe rotary1.png image must be the same directory.
I will continue.
The program is spiral.sh.
And I've only adapted to rotate without yet none of the above apply.
It now remains to continue the program but wanted only saw it.
Code: Select all
#!/bin/bash
# Spiral_1 by SFR'2013
# Based on vovchik's "spiral-bw-inline.bac" written in BaCon
# GPLv2 applies
# Req: Gtkdialog >=0.8.0, Bash
USE_BASH=; [ "`readlink /bin/sh`" != bash ] && USE_BASH="bash -c "
export TEMPDIR=/dev/shm/spiral_1_$$
mkdir $TEMPDIR
trap 'rm -rf $TEMPDIR' EXIT
export PIC=$TEMPDIR/pic.svg
export ROTATION=$TEMPDIR/rotation
echo 0 > $ROTATION
# =============================================================================
spiral () {
ROT=$(<$ROTATION); ROT=$(($ROT+5)); echo $ROT > $ROTATION
echo ' <svg width="300" height="300" transform="scale(2.2) rotate('$ROT' 60 60)">
<image
xlink:href="rotary1.png"
sodipodi:absref="./rotary1.png"
x="0" y="0"
width="120.000000"
height="120.000000"
id="image562" />
</svg>' > $PIC
}
export -f spiral
export MAIN='
<window title="Spiral_1">
<pixmap>
<variable>PICTURE</variable>
<input file>'$PIC'</input>
</pixmap>
<timer visible="false" milliseconds="true" interval="50">
<action>'$USE_BASH'spiral</action>
<action>refresh:PICTURE</action>
</timer>
<action signal="hide">exit:abort</action>
</window>
'
gtkdialog -cp MAIN
I will continue.
- mister_electronico
- Posts: 969
- Joined: Sun 20 Jan 2008, 20:20
- Location: Asturias_ España
- Contact:
Hi..
Hi, The spiral.sh program I think belongs to SFR, so if this is so and with the the great program he wrote in the previous post make this program possible, then all the credit is for him.
I'm trying to adapt this code to turn the knob.
So far I've managed to turn the knob but needs many improvements.
I am not a programmer in fact I am very bad programmer.
So I do everything I can, and at the moment my head is thrown smoke.
I'll put what I've got for now.
If someone wants to improve invited to do so with all my gratitude.
On my computer turns more or less well but I have not run in another computer and think that this program may not run well other computer.
so if someone proves it I pleases it to tell me how it works.
Here is the program, and next post some explanation.
I'm trying to adapt this code to turn the knob.
So far I've managed to turn the knob but needs many improvements.
I am not a programmer in fact I am very bad programmer.
So I do everything I can, and at the moment my head is thrown smoke.
I'll put what I've got for now.
If someone wants to improve invited to do so with all my gratitude.
On my computer turns more or less well but I have not run in another computer and think that this program may not run well other computer.
so if someone proves it I pleases it to tell me how it works.
Here is the program, and next post some explanation.
- Attachments
-
- knob.tar.gz
- (23.85 KiB) Downloaded 220 times
- mister_electronico
- Posts: 969
- Joined: Sun 20 Jan 2008, 20:20
- Location: Asturias_ España
- Contact:
Explanation
To make turning the knob and needed to create the following variables.
DEGRED = IF THE POSITION OF RED POINT.
DEGR= IF THE VARIABLE OF ANGLE ROTATION
This variable can be used later to tell the program where the control level is
X = position of your mouse axis X
Y = position of your mouse axis Y
Px = position of the red dot on axis X
Py = position of the red dot on axis Y
Px=cosine(DEGRED)
Py=sine(DEGRED)
Here I leave a picture to try to clarify how it works
DEGRED = IF THE POSITION OF RED POINT.
DEGR= IF THE VARIABLE OF ANGLE ROTATION
This variable can be used later to tell the program where the control level is
X = position of your mouse axis X
Y = position of your mouse axis Y
Px = position of the red dot on axis X
Py = position of the red dot on axis Y
Px=cosine(DEGRED)
Py=sine(DEGRED)
Here I leave a picture to try to clarify how it works
- Attachments
-
- explanation program.png
- (9.04 KiB) Downloaded 888 times
- mister_electronico
- Posts: 969
- Joined: Sun 20 Jan 2008, 20:20
- Location: Asturias_ España
- Contact:
All program.
All program:
I will continue working on.
Code: Select all
#!/bin/bash
export TEMPDIR=/tmp/knob
mkdir $TEMPDIR
trap 'rm -rf $TEMPDIR' EXIT
export PIC=$TEMPDIR/pic.svg
export DEGREE=$TEMPDIR/degree
export CORDENATE=$TEMPDIR/cordenate
echo 0 > $DEGREE
# DEGREE is the angle you have to turn is not the actual angle in the red dot is
cp ./rotary1.svg $PIC
cp ./rotary1.png $TEMPDIR
export WIN_NAME="KNOB"
export YF=6
export PIC_X=300
# Get current, relative position of cursor
get_xy () {
read MX MY WX WY WI <<< `getcurpos && xwininfo -name "$WIN_NAME" 2>/dev/null | awk 'NR>=4&&NR<=5 {print $4} NR==8 {print $2}'`
X=$((($MX-$WX)-($WI-$PIC_X)/2))
Y=$(($MY-$WY-$YF))
echo "X: $X Y: $Y"
DEGR=$(<$DEGREE)
let DEGRED=240-DEGR # Get the value of the angle where it really is the red dot
PI=$(echo "scale=10; 4*a(1)" | bc -l )
RADIANS=$(echo "scale=5; $DEGRED*$PI/180" | bc -l )
VAL=$(echo "scale=5; 120*s($RADIANS)" | bc -l )
Py=$(echo "(-1)*$VAL/1+150" | bc )
VAL=$(echo "scale=5; 135*c($RADIANS)" | bc -l )
Px=$(echo "$VAL/1+150" | bc )
echo "the value DEGRED es " $DEGRED
echo "the value DEGR es " $DEGR
echo "the value Px es " $Px
echo "the value Py es " $Py
if [ $DEGR -lt 154 ] && [ $Px -lt 151 ] && [ $X -lt 150 ] && [ $Py -lt $Y ] && [ $Y -lt 260 ]; then DEGR=$(($DEGR-5)); echo $DEGR > $DEGREE; fi
if [ $DEGR -lt 154 ] && [ $Px -lt 151 ] && [ $X -lt 150 ] && [ $Py -gt $Y ] && [ $Y -lt 260 ]; then DEGR=$(($DEGR+5)); echo $DEGR > $DEGREE; fi
if [ $DEGR -lt 154 ] && [ $Px -lt 151 ] && [ $X -gt 150 ] && [ $Y -lt 260 ]; then DEGR=$(($DEGR+5)); echo $DEGR > $DEGREE; fi
if [ $DEGR -gt 154 ] && [ $Px -gt 150 ] && [ $X -gt 150 ] && [ $Py -lt $Y ] && [ $Y -lt 260 ]; then DEGR=$(($DEGR+5)); echo $DEGR > $DEGREE; fi
if [ $DEGR -gt 154 ] && [ $Px -gt 150 ] && [ $X -gt 150 ] && [ $Y -lt $Py ] && [ $Y -lt 260 ]; then DEGR=$(($DEGR-5)); echo $DEGR > $DEGREE; fi
if [ $DEGR -gt 154 ] && [ $Px -gt 150 ] && [ $X -lt 150 ] && [ $Y -lt 260 ]; then DEGR=$(($DEGR-5)); echo $DEGR > $DEGREE; fi
echo '<svg width="35mm" height="35mm" transform="scale(1.0) rotate('$DEGR' 60 60)"
id="svg1"
sodipodi:version="0.32"
inkscape:version="0.36"
xmlns="http://www.w3.org/2000/svg"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
xmlns:xlink="http://www.w3.org/1999/xlink"
sodipodi:docbase="/tmp/knob"
sodipodi:docname="/tmp/knob/rotary1.svg">
<defs
id="defs3" />
<sodipodi:namedview
id="base" />
<image
xlink:href="rotary1.png"
sodipodi:absref="/tmp/knob/rotary1.png"
x="0" y="0"
width="120.000000"
height="120.000000"
id="image562" />
</svg>' > $PIC
}
export -f get_xy
echo '
<window title="'${WIN_NAME}'">
<vbox>
<eventbox>
<pixmap>
<variable>PICTURE</variable>
<input file>'$PIC'</input>
<width>'${PIC_X}'</width>
</pixmap>
<action signal="button-press-event">enable:varTIMER</action>
<action signal="button-release-event">disable:varTIMER</action>
</eventbox>
<timer visible="false" milliseconds="true" interval="100" sensitive="false">
<variable>varTIMER</variable>
<action>get_xy</action>
<action>refresh:PICTURE</action>
</timer>
</vbox>
</window>' | gtkdialog -s
I will continue working on.
- mister_electronico
- Posts: 969
- Joined: Sun 20 Jan 2008, 20:20
- Location: Asturias_ España
- Contact:
Some considerations.
Some considerations:
The knob rotates very slow for me, I think this is because the burning process SVG image files on the memory in the /tmp/knob is a slow process.
I think that any process of recording a file on memory or hard disk makes the process very slow independent that the file has a very small as is the case in this instance size.
So I'm thinking it could create all SVG images when begin the program.
Thinking that knob rotate in steps of 5 degrees this would
300º / 5 = 60 images
rotary1.svg=899bits so
60x899=53940 bits ---------so ------- 53942 / 1024 = about 53 K
This deal would make the program a little more memory, but
Then one would have to be loading picture as the angle, and in this case the program would have to read only pictures, no burn it.
I think it would be much faster.
Well I'm thinking out loud, so let you is burning my single neuron that I have.
see you
Regards
The knob rotates very slow for me, I think this is because the burning process SVG image files on the memory in the /tmp/knob is a slow process.
I think that any process of recording a file on memory or hard disk makes the process very slow independent that the file has a very small as is the case in this instance size.
So I'm thinking it could create all SVG images when begin the program.
Thinking that knob rotate in steps of 5 degrees this would
300º / 5 = 60 images
rotary1.svg=899bits so
60x899=53940 bits ---------so ------- 53942 / 1024 = about 53 K
This deal would make the program a little more memory, but
Then one would have to be loading picture as the angle, and in this case the program would have to read only pictures, no burn it.
I think it would be much faster.
Well I'm thinking out loud, so let you is burning my single neuron that I have.
see you
Regards
- mister_electronico
- Posts: 969
- Joined: Sun 20 Jan 2008, 20:20
- Location: Asturias_ España
- Contact:
Question?
Question? Is there any way to pass a variable to the input pixmap to change the name example:
function{
Here I want give diferent names to $PIC
PIC = img1.svg next time img2.svg............
}
<pixmap>
<input file>'$PIC'</input>
</pixmap>
Do not let me change it only gets the name I give to "export"
Thank you
function{
Here I want give diferent names to $PIC
PIC = img1.svg next time img2.svg............
}
<pixmap>
<input file>'$PIC'</input>
</pixmap>
Do not let me change it only gets the name I give to "export"
Thank you