Post Reply 
Screen Coordinate Systems and Scaling
09-24-2015, 10:38 AM (This post was last modified: 09-30-2015 07:07 AM by Martin Hepperle.)
Post: #1
Screen Coordinate Systems and Scaling
Hi,

as I struggled a bit with the coordinate systems used for the drawing functions inside a program, I wrote down a short notice on the two coordinate systems (Pixel based and User scaling) and how they are related. The note is attached.
Edit: attachment updated 09-29-2015

I feel that the documentation concering programming should be removed from the main manual and better be moved to an Extended Users Reference manual, together with more explanations and some sketches etc. Maybe such a manual can only be created by the user community.

While I am griping ... another annoying little thing when developing programs is the selection in the program list after running a program:
The selection always returns to program #2 in the list. Why #2? Looks like another "index offset by one" bug and the intent weas to select the first program.
Anyway, it would be more logical and practical to set the focus on the program just executed or edited because in 99.9% of all cases the user will either run the program again or will want to edit it.


Attached File(s)
.pdf  Scaling in Drawing Functions.pdf (Size: 91.5 KB / Downloads: 131)
Find all posts by this user
Quote this message in a reply
09-24-2015, 12:02 PM
Post: #2
RE: Screen Coordinate Systems and Scaling
(09-24-2015 10:38 AM)Martin Hepperle Wrote:  Extended Users Reference manual

Perhaps HP should hire you to do this. Smile That's an awesome pdf, definitely a keeper.

(09-24-2015 10:38 AM)Martin Hepperle Wrote:  set the focus on the program just executed

You can change the settings to do this, but for the life of me I don't remember how. It should be somewhere in the user manual.

-road
Find all posts by this user
Quote this message in a reply
09-24-2015, 12:48 PM
Post: #3
RE: Screen Coordinate Systems and Scaling
Found it: try <shift> <program> <more> <sort> <chronologically>.
Find all posts by this user
Quote this message in a reply
09-24-2015, 01:14 PM
Post: #4
RE: Screen Coordinate Systems and Scaling
(09-24-2015 10:38 AM)Martin Hepperle Wrote:  While I am griping ... another annoying little thing when developing programs is the selection in the program list after running a program:
The selection always returns to program #2 in the list. Why #2?

Number two is the first "user" program. The top item is the application program for the currently active application. Did you write your program in an application program?


Also, good job on the little document. One thing I think important to point out is that Xmin/Xmax etc are NOT global. Rather, they are application variables. If you have Function active, it will be using that Xmin. If you then switch to Parametric, your Xmin/Xmax etc will have changed.

TW

Although I work for the HP calculator group, the views and opinions I post here are my own.
Find all posts by this user
Quote this message in a reply
09-24-2015, 03:20 PM
Post: #5
RE: Screen Coordinate Systems and Scaling
(09-24-2015 01:14 PM)Tim Wessman Wrote:  Number two is the first "user" program. The top item is the application program for the currently active application.
By the way, do you know what is this "top item application program" ? and when does this program is run ?
I put a simple MSGBOX in this program and I use the application, but nothing appeared to me.
Find all posts by this user
Quote this message in a reply
09-24-2015, 04:20 PM
Post: #6
RE: Screen Coordinate Systems and Scaling
Yes, I do know. I helped make it. :-)

That is a program file associated with your application. When you want to do application customization, this file will be the one you use. You can override specific views, have a routine that runs on app start, add items to the view key, and other such things.

The section "App programs" in the full user guide has lots of details. It starts on page 565 in the copy of the english UG I am looking at.

TW

Although I work for the HP calculator group, the views and opinions I post here are my own.
Find all posts by this user
Quote this message in a reply
09-24-2015, 05:26 PM
Post: #7
RE: Screen Coordinate Systems and Scaling
Thanks for that excellent PDF Martin - it makes things much clearer.

One detail I would suggest adding to it: show in the diagram how many pixels the top bar takes up. If I can I try to leave that line free for a title, and to avoid obscuring the important battery status symbol (its roughly 20 pixels deep, but how wide is that?).

Stephen Lewkowicz (G1CMZ)
Visit this user's website Find all posts by this user
Quote this message in a reply
09-24-2015, 09:23 PM
Post: #8
RE: Screen Coordinate Systems and Scaling
Thank you, that's interesting....
(09-24-2015 04:20 PM)Tim Wessman Wrote:  The section "App programs" in the full user guide has lots of details. It starts on page 565 in the copy of the english UG I am looking at.
Thanks,
By the way, did you know the french version is not available ? the link gives a 404 error. (direct link http://h10032.www1.hp.com/ctg/Manual/c04774051).
I checked Italian, spanish, german, português are available

Page to dowload manuals
http://support.hp.com/us-en/product/HP-P...0/manuals/

note I could follow English guide, no problem, but still interrested to localised version if it exists (and it looks to exist)
Bye
Find all posts by this user
Quote this message in a reply
09-24-2015, 11:06 PM
Post: #9
RE: Screen Coordinate Systems and Scaling
You can find the french manuals either in the Help of the HP Prime Virtual Calculator (after selecting French as language), or directly here: ftp://ftp.hp.com/pub/calculators/Prime/D...lator/FRA/.
Find all posts by this user
Quote this message in a reply
09-25-2015, 06:15 AM
Post: #10
RE: Screen Coordinate Systems and Scaling
(09-24-2015 09:23 PM)hpfx Wrote:  By the way, did you know the french version is not available ? the link gives a 404 error. (direct link http://h10032.www1.hp.com/ctg/Manual/c04774051).
I checked Italian, spanish, german, português are available

Thanks.

Yes, I did know that wasn't working. We put in a request to fix that and a lot of other things a while back. However, due to the HP company split a lot of the website interface stuff is not being changed at the moment as the systems are all separated internally. I'll be sure to make sure the individual working on it has that in the changes we submitted though.

TW

Although I work for the HP calculator group, the views and opinions I post here are my own.
Find all posts by this user
Quote this message in a reply
09-25-2015, 02:13 PM (This post was last modified: 09-28-2015 07:36 AM by Martin Hepperle.)
Post: #11
RE: Screen Coordinate Systems and Scaling
(09-24-2015 01:14 PM)Tim Wessman Wrote:  
(09-24-2015 10:38 AM)Martin Hepperle Wrote:  While I am griping ... another annoying little thing when developing programs is the selection in the program list after running a program:
The selection always returns to program #2 in the list. Why #2?

Number two is the first "user" program. The top item is the application program for the currently active application. Did you write your program in an application program?


Also, good job on the little document. One thing I think important to point out is that Xmin/Xmax etc are NOT global. Rather, they are application variables. If you have Function active, it will be using that Xmin. If you then switch to Parametric, your Xmin/Xmax etc will have changed.

Tim,

thank you for the clarification. This means that a well behaving program should save the current values of X/Ymin/max and restore them before it ends.
Martin

Edit: Document above updated with title bar dimensions, 1 pixel border location corrected and list with Apps where X/Y/min/max limits work plus new example.
Find all posts by this user
Quote this message in a reply
Post Reply 




User(s) browsing this thread: 1 Guest(s)