Page 1 of 1

A couple of Suggestions

Posted: Tue Aug 02, 2022 4:40 pm
by The Artful Dodger
Hello, all:
I have a couple of suggestions regarding your API documentation. First let me say that the instrument I am creating is a HUD.
1. I am having a great deal of trouble understanding the canvas and exactly how it works - not the details of each of the functions, but the overall subject. One of my biggest difficulties with canvas is the following: I have been creating a single instrument so my panel size is the same as my instrument. But I have five different spots on the panel where actually separate instruments exist. So, I have created a canvas covering the total instrument. Then I created a canvas for each of the sub-areas. Finally, I have different locations within that sub-ares so I have created another canvas for. I presumed that would allow me to treat each area somewhat independently. Anyway, I am having a great deal to trouble understanding exactly where the origin is everywhere: Is it at the corner of the panel or is it in the top (latest added) canvas? I think it would help a great deal if that were explained in a separate section and, if it changed, anywhere else it changed.
2. Another spot where I am having a problem is with the examples that accompany each of the functions. Many of them include an image, but no way to know what the example looked like. I think it would be a great help if you could put a link in each example so that the appropriate example could be studied properly.

Just some ruminations as I try to make transparent instruments!

Sparky

Re: A couple of Suggestions

Posted: Tue Aug 02, 2022 5:03 pm
by Keith Baxter
Hi,

Canvas is relatively simple. it has x,y,w,h.
The X and Y positions are related to the left top of the canvas (BASE START POINT). Note 0(x), 0(y) are aligned to your instrument 0(x), 0(y).
In other words, A canvas with a 10(x),0(y) would start 10 pixels to the right of the instrument. Likewise a canvas with a -20(x), 0(y) would start 20 pixels to the left of the instrument.

It should also be understood that canvases can be moved using the move() function. The move function allows for changing all the parameters.
It should also be noted that canvases can be added and removed from groups and then those groups moved and manipulated. Canvases can be redrawn as many times as you want.

Keith

Re: A couple of Suggestions

Posted: Tue Aug 02, 2022 5:10 pm
by The Artful Dodger
Hi, Keith:
I am still confused about what good they do? If you create one over a section of an instrument, what does it do for you that's different from not creating it?

Sparky

Re: A couple of Suggestions

Posted: Tue Aug 02, 2022 5:15 pm
by Keith Baxter
The Artful Dodger wrote: Tue Aug 02, 2022 5:10 pm Hi, Keith:
I am still confused about what good they do? If you create one over a section of an instrument, what does it do for you that's different from not creating it?

Sparky
Hi Sparky,

I have some time and can give some insight on the discord. I can share my screenand we can do a few examples so that you get the gist of the power canvas has.

Keith

Re: A couple of Suggestions

Posted: Tue Aug 02, 2022 5:19 pm
by The Artful Dodger
Hi, Keith:

You're way above my head - I've done this with microsoft (opposite direction) but I have NO idea how to set that up!

Sparky

Re: A couple of Suggestions

Posted: Tue Aug 02, 2022 5:21 pm
by The Artful Dodger
By the way, I took your advice and I have the speed tape working with canvas, except the part in the middle that shows exactly your speed isn't there yet. It's been fun!

Re: A couple of Suggestions

Posted: Tue Aug 02, 2022 5:22 pm
by Keith Baxter
The Artful Dodger wrote: Tue Aug 02, 2022 5:19 pm Hi, Keith:

You're way above my head - I've done this with microsoft (opposite direction) but I have NO idea how to set that up!

Sparky
Sparky
Here is the link. Give it a try. If you get stuck I will help.
https://discord.gg/jhKmwQ9RH7

Keith