Post Reply 
Picture and Input
06-05-2015, 03:19 PM
Post: #1
Picture and Input
How can I created a Picture with an Input-Funktion?

EXPORT kor()
BEGIN

Local x;
RECT_P();
//Linie und Pfeil in x-Richtung
LINE_P(40,59,79,59,RGB(0,255,0));
LINE_P(40,60,80,60,RGB(0,255,0));
LINE_P(40,61,79,61,RGB(0,255,0));
LINE_P(80,60,73,57,RGB(0,255,0));
LINE_P(80,60,73,63,RGB(0,255,0));
Textout_P("X",85,55,2);

//Linie und Pfeil in y-Ricjhtung
LINE_P(39,60,39,21,RGB(255,0,0));
LINE_P(40,60,40,20,RGB(255,0,0));
LINE_P(41,60,41,21,RGB(255,0,0));
LINE_P(40,20,37,26,RGB(255,0,0));
LINE_P(40,20,43,26,RGB(255,0,0));
Textout_P("Y",37,5,2);

//Linie und Pfeil in z-Richtung
LINE_P(39,60,20,79,RGB(0,0,255));
LINE_P(40,60,20,80,RGB(0,0,255));
LINE_P(41,60,21,80,RGB(0,0,255));
LINE_P(20,80,22,73,RGB(0,0,255));
LINE_P(20,80,27,77,RGB(0,0,255));
Textout_P("Z",10,85,2);
FREEZE;
END;
[/b]
Find all posts by this user
Quote this message in a reply
06-05-2015, 07:36 PM
Post: #2
RE: Picture and Input
There are several ways. Here is one way using reserved variables M1 and X. (Your input is through the editmat(M1) function):

Code:

EXPORT kor()
BEGIN

EDITMAT(M1);  // You can expand the matrix M1, or use separate matrices for "Y" and "Z"
RECT_P();

//Linie und Pfeil in x-Richtung
FOR X FROM 1 TO rowDim(M1) DO
  LINE_P(M1(X,1),M1(X,2),M1(X,3),M1(X,4),RGB(0,255,0));
END;

//LINE_P(40,59,79,59,RGB(0,255,0));
//LINE_P(40,60,80,60,RGB(0,255,0));
//LINE_P(40,61,79,61,RGB(0,255,0));
//LINE_P(80,60,73,57,RGB(0,255,0));
//LINE_P(80,60,73,63,RGB(0,255,0));

Textout_P("X",85,55,2);

//Linie und Pfeil in y-Ricjhtung
LINE_P(39,60,39,21,RGB(255,0,0));
LINE_P(40,60,40,20,RGB(255,0,0));
LINE_P(41,60,41,21,RGB(255,0,0));
LINE_P(40,20,37,26,RGB(255,0,0));
LINE_P(40,20,43,26,RGB(255,0,0));
Textout_P("Y",37,5,2);

//Linie und Pfeil in z-Richtung
LINE_P(39,60,20,79,RGB(0,0,255));
LINE_P(40,60,20,80,RGB(0,0,255));
LINE_P(41,60,21,80,RGB(0,0,255));
LINE_P(20,80,22,73,RGB(0,0,255));
LINE_P(20,80,27,77,RGB(0,0,255));
Textout_P("Z",10,85,2);
FREEZE;
END;
Find all posts by this user
Quote this message in a reply
06-06-2015, 10:00 AM
Post: #3
RE: Picture and Input
Hello DrD,
thanks for your answer.
That is not what i mean.

i mean this on (look Picture).


Attached File(s) Thumbnail(s)
   
Find all posts by this user
Quote this message in a reply
06-06-2015, 12:39 PM
Post: #4
RE: Picture and Input
I see what you're after, and I don't know how to do that. It may be possible to save the graphic object in a variable, and use that as a label for the input statement. I haven't tried that...
Find all posts by this user
Quote this message in a reply
06-06-2015, 01:25 PM
Post: #5
RE: Picture and Input
(06-06-2015 12:39 PM)DrD Wrote:  I see what you're after, and I don't know how to do that. It may be possible to save the graphic object in a variable, and use that as a label for the input statement. I haven't tried that...

sorry for OT, but in another post I wrote about labels in input, wondering how to get them without use a text field.
I wasn't able to get such a label, however.
Do you know how is it syntax, please?

Thank you,
Salvo

∫aL√0mic (IT9CLU), HP Prime 50g 41CX 71b 42s 12C 15C - DM42 WP34s :: Prime Soft. Lib
Visit this user's website Find all posts by this user
Quote this message in a reply
06-06-2015, 05:05 PM (This post was last modified: 06-06-2015 05:13 PM by DrD.)
Post: #6
RE: Picture and Input
The essence of it would be to use the GETPIX_P() to save the contents of your graphic rectangle (in a list or matrix), and then use PIXON_P() to replicate it on the graphic screen. You would PIXON the image just prior to the INPUT. A foreseeable problem is that I don't know what graphics screen the input command uses, but I think I inadvertently did just that very thing, when I was working with my Smith Chart program several months ago. In that case, it was an unintended effect. I didn't want to have the overlay graphic on the input screen! I don't remember the how's and why's, but if it happens again, I'll make note of it.

I don't think the Prime is able to do that normally, it was several rev's ago, and may have been a bug that just happened to have that result. It would be a nice feature, though, especially considering the geographical value.
Find all posts by this user
Quote this message in a reply
Post Reply 




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