C47 - missing LINE function

This area is for discussion about these families of custom high-end Scientific Calculator applications for SwissMicros devices.
User avatar
rudi
Posts: 413
Joined: Wed Nov 03, 2021 9:03 am
Location: Denmark
Contact:

C47 - missing LINE function

Post by rudi »

In the documentation, a LINE function is mentioned, however, when I try to execute is from a program, I get the "No such function" error
LINE : Draw line : Setting : ON : Menu PLSTAT (page 1 primary F1) : Draw a line between points

Is is "only" available as a command in PLSTAT mode?

I would like a fast LINE drawing function, more drawing primitives would also be handy; ELLIPSE, RECTANGLE.
Any plans for such functions?
/Rudi

DM-42 (s/n 06999), HP-42S, HP-35s, HP-11c, HP-32SII (ex HP-41CV, ex HP-75C, ex HP-48G + a lot, really lot of a accessories)
Denmark
User avatar
pauli
Posts: 251
Joined: Tue May 02, 2017 10:11 am
Location: Australia

Re: C47 - missing LINE function

Post by pauli »

If someone volunteered to implement more, I'm sure they'd be considered for inclusion.
Otherwise, they'll have to wait for one of the team to build up sufficient motivation to design and implement them.
User avatar
rudi
Posts: 413
Joined: Wed Nov 03, 2021 9:03 am
Location: Denmark
Contact:

Re: C47 - missing LINE function

Post by rudi »

pauli wrote:
Tue Mar 21, 2023 7:32 am
If someone volunteered to implement more, I'm sure they'd be considered for inclusion.
Otherwise, they'll have to wait for one of the team to build up sufficient motivation to design and implement them.
I would certainly volunteer, if it was a bit easier to setup the development environment.
I have tried a couple of times, but never quite made it work.

Edit:
I cloned the git repository, but there's an external tool, that I need to install, don't quite remember what it was, but I never really got it working.
/Rudi

DM-42 (s/n 06999), HP-42S, HP-35s, HP-11c, HP-32SII (ex HP-41CV, ex HP-75C, ex HP-48G + a lot, really lot of a accessories)
Denmark
User avatar
PierreMengisen
Posts: 305
Joined: Wed Nov 29, 2017 1:38 pm
Location: Neuchâtel CH

Re: C47 - missing LINE function

Post by PierreMengisen »

Hi Rudi,
I see that LINE is not a function.
So you have to use AGRAPH (to display what you want) or POINT to display a big 3x3 pie!
And of course PIXEL to display ... a pixel!
Pierre
[TI59 with PC100C; TI-84 Plus CE-T; HP41CV with HP IL loop & 2*82161A DCD & 82162 TP; HP15C; HP28S; DM41; DM41L; DM42; DM41X]
User avatar
Jaymos
Posts: 1633
Joined: Sun Nov 04, 2018 7:03 pm
Location: Cape Town

Re: C47 - missing LINE function

Post by Jaymos »

pauli wrote:
Tue Mar 21, 2023 7:32 am
If someone volunteered to implement more, I'm sure they'd be considered for inclusion.
Otherwise, they'll have to wait for one of the team to build up sufficient motivation to design and implement them.
True. In addition:

There is no spec for commands to draw. The closest to a spec was this list I dreamt up at some point. A good start would be a spec of how this is to be done, and not a haphazard addition of commands like LINE and CIRCLE or what not.

Consider this and either replace it or enhance it.

viewtopic.php?f=2&t=2216&p=25356&hilit=Graphics#p25356
Jaco Mostert
Elec Eng, South Africa
https://47calc.com C47 (s/n 03818 & 06199), WP43 (0015). In box: HP42S, HP32Sii, WP34S&C, HP28C, HP35s, EL-506P, EL-W506, PB700; ex: FX702P, 11C, HP67 & HP85; iOS: 42s Byron, Free42+, WP31S/34S, HCalc.
User avatar
RJvM
Posts: 276
Joined: Wed Jun 02, 2021 9:21 am
Location: Gelderland, Netherlands

Re: C47 - missing LINE function

Post by RJvM »

PierreMengisen wrote:
Tue Mar 21, 2023 5:36 pm
Hi Rudi,
I see that LINE is not a function.
So you have to use AGRAPH (to display what you want) or POINT to display a big 3x3 pie!
And of course PIXEL to display ... a pixel!
Thanks, correct; it is indicated as a setting in the manuals, both with the PLSTAT menu and in the full index; admittedly, it is without much context in the latter document; I intend to clarify that it is a setting, soon.
Robbert Jan, MSEE, RPN user since 1976 and a collector for many years I now own all the important ones: HP-35, 45, 55, 65, 97, 19, 21, 25, 34, 10-16, 41, 42, 71, 48, 50, Prime, DM41, DM42, WP43, C47, R47; Project 47 team member https://47calc.com
User avatar
rudi
Posts: 413
Joined: Wed Nov 03, 2021 9:03 am
Location: Denmark
Contact:

Re: C47 - missing LINE function

Post by rudi »

Jaymos wrote:
Tue Mar 21, 2023 8:14 pm
pauli wrote:
Tue Mar 21, 2023 7:32 am
If someone volunteered to implement more, I'm sure they'd be considered for inclusion.
Otherwise, they'll have to wait for one of the team to build up sufficient motivation to design and implement them.
True. In addition:

There is no spec for commands to draw. The closest to a spec was this list I dreamt up at some point. A good start would be a spec of how this is to be done, and not a haphazard addition of commands like LINE and CIRCLE or what not.

Consider this and either replace it or enhance it.

viewtopic.php?f=2&t=2216&p=25356&hilit=Graphics#p25356
I would be happy to provide some C snippets, containing code that renders a LINE, RECT and ELLIPSE.
I also assume, that in the source to C43, there is some sort of fast setpixel function?

All three functions should take two 2D integer points as parameters, p0 and p1.
LINE will draw a line between p0 and p1.
RECT will draw a rectangle, where p0 and p1 are diagonally opposite corners (no requirements to which is left/right/upper/lower, the code detects this)
ELLIPSE will draw an ellipse with bounding rect p0 and p1, same specs as for RECT.
For all three functions, p0 and p1 are allowed to lie outside the screen rect and will be clipped automatically. Thus allowing for drawing figures, that only partially lies on the screen.

Another thing, I am writing a program, that uses AGRAPH to draw objects on the screen and they may sometimes partially overlap.
It would be convenient, if it was possible to set the raster-operation, ROP, for AGRAPH. Could be inspired from MS BitBlt function. To allow overlapping, the MERGECOPY ROP would be needed.
SRCCOPY : (default) copies pixels
MERGECOPY : merges pixels (OR)
/Rudi

DM-42 (s/n 06999), HP-42S, HP-35s, HP-11c, HP-32SII (ex HP-41CV, ex HP-75C, ex HP-48G + a lot, really lot of a accessories)
Denmark
dlachieze
Posts: 613
Joined: Thu May 04, 2017 12:20 pm
Location: France

Re: C47 - missing LINE function

Post by dlachieze »

rudi wrote:
Wed Mar 22, 2023 5:35 am
Another thing, I am writing a program, that uses AGRAPH to draw objects on the screen and they may sometimes partially overlap.
It would be convenient, if it was possible to set the raster-operation, ROP, for AGRAPH. Could be inspired from MS BitBlt function. To allow overlapping, the MERGECOPY ROP would be needed.
SRCCOPY : (default) copies pixels
MERGECOPY : merges pixels (OR)
Look at the GRAMOD variable in the WP43 Reference Manual. I’ve not tested it but it should do what you need.
DM42: 00425 - DM41X: β00066 - WP43: 00042
User avatar
rudi
Posts: 413
Joined: Wed Nov 03, 2021 9:03 am
Location: Denmark
Contact:

Re: C47 - missing LINE function

Post by rudi »

dlachieze wrote:
Wed Mar 22, 2023 7:27 am
rudi wrote:
Wed Mar 22, 2023 5:35 am
Another thing, I am writing a program, that uses AGRAPH to draw objects on the screen and they may sometimes partially overlap.
It would be convenient, if it was possible to set the raster-operation, ROP, for AGRAPH. Could be inspired from MS BitBlt function. To allow overlapping, the MERGECOPY ROP would be needed.
SRCCOPY : (default) copies pixels
MERGECOPY : merges pixels (OR)
Look at the GRAMOD variable in the WP43 Reference Manual. I’ve not tested it but it should do what you need.
Thanks - found it on p94 in the WP43! Just what I was looking for.
However - I was looking for the functionality in the HP-42S/DM-42 manuals, since I wanted to make my program compatible with DM42.
And even worse, GRAMOD doesn't seem to be in the C47 ??? XEQ 'GRAMOD' => No such function?
I was under the impression, that WP43 was a subset of C47 and all WP43 functions are contained in C47 but not nesecary the other way arround?
/Rudi

DM-42 (s/n 06999), HP-42S, HP-35s, HP-11c, HP-32SII (ex HP-41CV, ex HP-75C, ex HP-48G + a lot, really lot of a accessories)
Denmark
User avatar
Walter
Posts: 3070
Joined: Tue May 02, 2017 11:13 am
Location: On a mission close to DRS, Germany

Re: C47 - missing LINE function

Post by Walter »

rudi wrote:
Wed Mar 22, 2023 8:02 am
dlachieze wrote:
Wed Mar 22, 2023 7:27 am
Look at the GRAMOD variable in the WP43 Reference Manual. I’ve not tested it but it should do what you need.
Thanks - found it on p94 in the WP43! Just what I was looking for.
...
I was under the impression, that WP43 was a subset of C47 and all WP43 functions are contained in C47 but not nesecary the other way arround?
Sorry, wrong impression. WP43 was the root, but C47 & Co deviated based on a different concept of its UI, now for some years. Think of Darwin.

BTW, you won't execute a variable, will you? ;)
WP43 SN00000, 34S, and 31S for obvious reasons; HP-35, 45, ..., 35S, 15CE, DM16L S/N# 00093, DM42β SN:00041
Post Reply