Page 5 of 5

Re: Reverse Viewport

Posted: Fri Aug 12, 2022 1:35 pm
by jph
I would have thought this was possible ?
But not on a single gauge' or canvas.

For example, if the 'background text' is it's own 'gauge' and the red box is also it's own gauge, along with the area above the red box being a stand alone 'gauge', and the area below being a stand alone 'gauge', then , afaik, the running tapes can be kept within the boundary of the gauge so the 'above the red box' would be constrained to its own 'gauge AREA and have its own LIMITS' and same with the 'below the red box' a its own 'gauge'
There will be limitations with the gauge shape etc, but.....
it would still be rather complex but perhaps another angle to consider.

Re: Reverse Viewport

Posted: Fri Aug 12, 2022 1:51 pm
by Keith Baxter
Hi,

To do HUD transparency there would have to be a "BLOCK" feature.

_fill(BLOCK)

Doing it this way allows for any shape. A _move_to() _line_to() _line_to(), _rect(), _circle(), etc, etc.

Any canvas behind or above would not be blocked.

Only objects drawn before the _fill(BLOCK) on that canvas will be blocked. Anything after would be visible.

Keith

Re: Reverse Viewport

Posted: Fri Aug 12, 2022 2:01 pm
by The Artful Dodger
To jph:
Thank you for the video - believe me, I have been looking at videos of HUDs for weeks but I haven't found one working.

However, I am concerned with what you did there - you posted someone else's work, I presume, considering the time frame, without their permission - something I would never, ever do! I have been called paranoid, but I'm concerned I'm not paranoid enough!!

Sparky

Re: Reverse Viewport

Posted: Fri Aug 12, 2022 2:37 pm
by Sling
Just caught up on this thread from yesterday. Now the request is understood I see how it’s come about. The best current solution for this would be to use 2 viewports and 2 identical tapes. One viewport shows above the box and one below it. That’s pretty simple to implement and will give the desired result.

Tony

Re: Reverse Viewport

Posted: Fri Aug 12, 2022 3:26 pm
by The Artful Dodger
Hi, Sling:

You got it in one! That's exactly what I did!

Sparky

Re: Reverse Viewport

Posted: Sat Aug 13, 2022 3:38 am
by Sling
Good stuff. If we had gotten to understanding what you needed sooner I could of suggested this near the beginning. At least you have a solution now.

As a side note and while on this subject I would like to see a circular or polygon viewport added as rect does not always work. An additional argument to swap the viewport from everything inside the box to everything outside as you requested would also be welcome if it’s not too difficult to implement.