Puppy Linux Discussion Forum Forum Index Puppy Linux Discussion Forum
Puppy HOME page : puppylinux.com
"THE" alternative forum : puppylinux.info
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

The time now is Sat 28 Mar 2015, 12:17
All times are UTC - 4
 Forum index » Advanced Topics » Additional Software (PETs, n' stuff) » Engineering/Science/Simulation
measur3r v1.2
Post new topic   Reply to topic View previous topic :: View next topic
Page 1 of 1 [4 Posts]  
Author Message
SFR


Joined: 26 Oct 2011
Posts: 1243

PostPosted: Tue 03 Mar 2015, 11:40    Post subject:  measur3r v1.2  

With this app you can measure objects on the desktop.
Just launch it, click on point A, click on point B and enjoy the results. Wink
You'll get coordinates of A & B points, a distance between them in pixels, centimeters and inches, and additionally a distance relative to X and Y axes.

Requirements: xwininfo, xrandr, getcurpos, awk, grep, tr, xmessage

EDIT: attached also measur3r_lite, which supports only pixel units, not cm/in.
For those for whom the regular version can not read the physical display size and who are unable to determine that size by themselves (or just don't need/care about cm/in).
___________

Changelog:

Version 1.1
- a warning window in case if obtaining the physical size of the display has failed (thanks to Jasper & mister_electronico)
- physical size of the display can be also defined manually in $HOME/.measur3r

Version 1.2
- fix in calculations for screens that have width smaller than height (thanks to MochiMoppel)

Have fun &
Greetings!
measur3r_lite-1.1.pet
Description  Supports only pixel units.
pet

 Download 
Filename  measur3r_lite-1.1.pet 
Filesize  1.63 KB 
Downloaded  11 Time(s) 
measur3r-1.2.pet
Description 
pet

 Download 
Filename  measur3r-1.2.pet 
Filesize  2.23 KB 
Downloaded  26 Time(s) 
Screenshot.png
 Description   
 Filesize   7.91 KB
 Viewed   193 Time(s)

Screenshot.png


_________________
[O]bdurate [R]ules [D]estroy [E]nthusiastic [R]ebels => [C]reative [H]umans [A]lways [O]pen [S]ource
Omnia mea mecum porto.

Last edited by SFR on Sat 07 Mar 2015, 06:30; edited 4 times in total
Back to top
View user's profile Send private message 
mister_electronico


Joined: 20 Jan 2008
Posts: 755
Location: Asturias_ España

PostPosted: Tue 03 Mar 2015, 17:08    Post subject: Hi SFR  

Hi SFR the program seems very interesting, but can not get it to work.

If I run through terminal gives me the following error

awk: fatal: division by zero attempted
awk: fatal: division by zero attempted


I am working with Slacko Puppy 5.6 Non-PAE.

I find it very interesting.



Greetings!






________________________________________________________________________
My Blog

https://misterelectronicoes.wordpress.com/trainer-board-homemade/
Back to top
View user's profile Send private message Visit poster's website Yahoo Messenger 
SFR


Joined: 26 Oct 2011
Posts: 1243

PostPosted: Tue 03 Mar 2015, 17:23    Post subject:  

Hmm, I think you're facing the same problem as Jasper here: http://www.murga-linux.com/puppy/viewtopic.php?p=831820#831820
I've no idea why in my (and MochiMoppel's, and Geoffrey's) case xrandr reports real screen dimensions and in your and Jasper's not...

Anyway, as a workaround you could (if you know your display's actual dimensions, in millimeters) alter the code and hardcode these values right after this line, e.g.:
Code:
read MM_X MM_Y <<< `xrandr | grep -wo -m1 '[0-9]*mm x [0-9]*mm' | tr -cd '[0-9]x' | awk -F "x" '{print $1" "$2}'`

# hardcoded:
MM_X=267
MM_Y=200

Thanks for you interest &
Greetings!

_________________
[O]bdurate [R]ules [D]estroy [E]nthusiastic [R]ebels => [C]reative [H]umans [A]lways [O]pen [S]ource
Omnia mea mecum porto.
Back to top
View user's profile Send private message 
mister_electronico


Joined: 20 Jan 2008
Posts: 755
Location: Asturias_ España

PostPosted: Tue 03 Mar 2015, 18:54    Post subject: You are in true.  

Hi SFR you are in true, I don't know why :

read MM_X MM_Y <<< `xrandr | grep -wo -m1 '[0-9]*mm x [0-9]*mm' | tr -cd '[0-9]x' | awk -F "x" '{print $1" "$2}'`

do
MM_X = 0
and

MM_Y = 0

But like you said I change :


MM_X = 320
MM_Y = 200

Is my case:

#xrandr
Screen 0: minimum 320 x 200, current 1920 x 1080, maximum 1920 x 1920
VGA-0 connected 1920x1080+0+0 (normal left inverted right x axis y axis) 0mm x 0mm
1920x1080 60.0*+
DVI-0 disconnected (normal left inverted right x axis y axis)


and works...

So thanks SFR .... good program.

Greetings!
Back to top
View user's profile Send private message Visit poster's website Yahoo Messenger 
Display posts from previous:   Sort by:   
Page 1 of 1 [4 Posts]  
Post new topic   Reply to topic View previous topic :: View next topic
 Forum index » Advanced Topics » Additional Software (PETs, n' stuff) » Engineering/Science/Simulation
Jump to:  

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group
[ Time: 0.0521s ][ Queries: 12 (0.0048s) ][ GZIP on ]