cache function
- Keith Baxter
- Posts: 4674
- Joined: Wed Dec 20, 2017 11:00 am
- Location: Botswana
cache function
@Corjan
Possible to have a cache() function for cache-ing large data loaded like canvas_draw() items.
Looking to load ONCE a canvas_draw() and store to cache for recall. If my investigation is anything to go by it is in the lua library.
Should be a quick and easy one to implement for us . Right
Keith
Possible to have a cache() function for cache-ing large data loaded like canvas_draw() items.
Looking to load ONCE a canvas_draw() and store to cache for recall. If my investigation is anything to go by it is in the lua library.
Should be a quick and easy one to implement for us . Right
Keith
AMD RYZEN 9 5950X CPU, Corsair H80I cooler, ASUS TUF GAMING B550-PLUS AMD Ryzen Mother Board, 32Gb ram Corsair Vengeance 3000Mh, MSI GTX960 4G graphics card
Re: cache function
Hi,
All variables etc in lua are already stored in memory, no need to cache that.
Corjan
All variables etc in lua are already stored in memory, no need to cache that.
Corjan
- Keith Baxter
- Posts: 4674
- Joined: Wed Dec 20, 2017 11:00 am
- Location: Botswana
Re: cache function
@Corjan
Maybe my terminology is incorrect.
If we cannot resize the contents of a canvas using the move() function, then I will need to be able to store old drawn canvases. How do you suggest this is done?
Create multiple canvases for each zoom level?
Keith
Maybe my terminology is incorrect.
If we cannot resize the contents of a canvas using the move() function, then I will need to be able to store old drawn canvases. How do you suggest this is done?
Create multiple canvases for each zoom level?
Keith
AMD RYZEN 9 5950X CPU, Corsair H80I cooler, ASUS TUF GAMING B550-PLUS AMD Ryzen Mother Board, 32Gb ram Corsair Vengeance 3000Mh, MSI GTX960 4G graphics card
Re: cache function
Hi,
Creating multiple canvasses for each zoom level is going to use a lot of resources, I would not suggest you doing that.
You can scale the content within the canvas already with _scale function.
But I will change the move function, so canvas will scale with it. You are right in that that makes more sense,
Corjan
Creating multiple canvasses for each zoom level is going to use a lot of resources, I would not suggest you doing that.
You can scale the content within the canvas already with _scale function.
But I will change the move function, so canvas will scale with it. You are right in that that makes more sense,
Corjan
- Keith Baxter
- Posts: 4674
- Joined: Wed Dec 20, 2017 11:00 am
- Location: Botswana
Re: cache function
Thank you for considering changing/fixing the canvas to scale with the move() function Corjan.Corjan wrote: ↑Thu Sep 03, 2020 11:32 am Hi,
Creating multiple canvasses for each zoom level is going to use a lot of resources, I would not suggest you doing that.
You can scale the content within the canvas already with _scale function.
But I will change the move function, so canvas will scale with it. You are right in that that makes more sense,
Corjan
That is going to be a game changer for shifting and zooming around vector maps and their layers.
Keith
AMD RYZEN 9 5950X CPU, Corsair H80I cooler, ASUS TUF GAMING B550-PLUS AMD Ryzen Mother Board, 32Gb ram Corsair Vengeance 3000Mh, MSI GTX960 4G graphics card
- Keith Baxter
- Posts: 4674
- Joined: Wed Dec 20, 2017 11:00 am
- Location: Botswana
Re: cache function
@Corjan
Somewhere I asked for a _polygon() function. This has resurfaced. and I attempt to rejuvenate your appetite for this function or a compromise.
Reason being, I also want a smoothing factor to be added. So that polygons can have rounded corners and not straight lines.
Else something along the lines of a radius to be added to the _line_to() and _arc_to() functions like we have in the _rect() function.
@Sling your thought as well please.
Of course not restricted to those mentioned.
Keith
Somewhere I asked for a _polygon() function. This has resurfaced. and I attempt to rejuvenate your appetite for this function or a compromise.
Reason being, I also want a smoothing factor to be added. So that polygons can have rounded corners and not straight lines.
Else something along the lines of a radius to be added to the _line_to() and _arc_to() functions like we have in the _rect() function.
@Sling your thought as well please.
Of course not restricted to those mentioned.
Keith
AMD RYZEN 9 5950X CPU, Corsair H80I cooler, ASUS TUF GAMING B550-PLUS AMD Ryzen Mother Board, 32Gb ram Corsair Vengeance 3000Mh, MSI GTX960 4G graphics card
Re: cache function
That is exactly what the bezier_to and arc_to are for.
Corjan
Corjan
- Keith Baxter
- Posts: 4674
- Joined: Wed Dec 20, 2017 11:00 am
- Location: Botswana
Re: cache function
@Corjan
No that is not what I am referring to.
I just want to add a simple radius to each junction point. What you suggest makes manipulating data way to complected and the extra points will have to be set. KISS
I just want something like in the _rect() where we can add a radius to the corners.
Keith
AMD RYZEN 9 5950X CPU, Corsair H80I cooler, ASUS TUF GAMING B550-PLUS AMD Ryzen Mother Board, 32Gb ram Corsair Vengeance 3000Mh, MSI GTX960 4G graphics card
Re: cache function
The arc_to does exactly the same as the rect corner radius:
http://siminnovations.com/wiki/index.php?title=Arc_to
Corjan
http://siminnovations.com/wiki/index.php?title=Arc_to
Corjan
- Keith Baxter
- Posts: 4674
- Joined: Wed Dec 20, 2017 11:00 am
- Location: Botswana
Re: cache function
Sorry for slow responding. I am churning and manipulating data, so the reaction time is lethargic.Corjan wrote: ↑Fri Sep 04, 2020 2:34 pm The arc_to does exactly the same as the rect corner radius:
http://siminnovations.com/wiki/index.php?title=Arc_to
Corjan
Ok so it looks like no appetite for simplicity. I respect. Maybe i am also not understanding correct and we are not finding each other on this point.
I just thought, for guys like "ME" a simple _line_to(x,y,corner) would be a lot easier than going the _bezier_to(cp1x, cp1y, cp2x, cp2y, x, y) route. That can be used for other applications where one is not relying on complex programming and math to draw sophisticated shapes.
Or first prize _polygon(x,y,x,y,x,y,x,y,x,y,corner)
Sleep on it. It has been a long week.
Keith
AMD RYZEN 9 5950X CPU, Corsair H80I cooler, ASUS TUF GAMING B550-PLUS AMD Ryzen Mother Board, 32Gb ram Corsair Vengeance 3000Mh, MSI GTX960 4G graphics card