Discussion of article "Visualize this! MQL5 graphics library similar to 'plot' of R language" - page 5
You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
All smoothing methods are highly dependent on line opacity. At about 50% opacity everything becomes unaliased and has artefacts.
Now there are artefacts even with fully opaque lines.
We were talking about trying to draw a fully opaque circle with smoothed edges (using Wu's algorithm) without losing smoothness.
This requires special methods of filling with smoothed edges.
There are now artefacts even with completely opaque lines.
It was about trying to draw a fully opaque circle with smoothed edges (using Wu's algorithm) without loss of smoothness.
This requires special methods of filling with smoothed edges.
I understand that you can't do it yourself?
I realise I can't do it on my own?
Why not? Give it a try! )
You can even solve the case you mentioned:
Forum on trading, automated trading systems and testing trading strategies
Discussion of the article "Visualise it! Graphical library in MQL5 as an analogue of plot from R"
Artyom Trishkin, 2023.07.31 12:39 AM
All smoothing methods strongly depend on line opacity. At about 50% opacity everything becomes non-smooth and has artefacts.
That is, drawing on a fully transparent canvas (CCanvas) can be done taking into account the bottom layer (chart and other objects) and it will be without artefacts.
But it seems rather crutchy and cumbersome. It is also unclear how much it will affect performance. I would still like the developers of the terminal to fix this bug.
Why not? Give it a try! )
You can even solve the case you mentioned:
That is, rendering on a fully transparent canvas (CCanvas) can be done taking into account the bottom layer (chart and other objects) and it will be artefact-free.
But it seems rather crutchy and cumbersome. It is also unclear how much it will affect performance. I would still like the developers of the terminal to fix this bug.
I would send such a task (if not the developers, but forum members) to Nikolai @Nikolai Semko for solution ;)
I would send such a task (if not developers, but forum members) to Nikolai @Nikolai Semko for solving ;)
He works with only one canvas.
And I'm not ready to rewrite my graphics library to make everything work on one canvas.
Although it is interesting, but knowing how much time it may take, I can't decide to undertake such a challenge at the moment. I don't have as much time now as I used to.
It only works with one canvas.
And I'm not ready to rewrite my graphics library to make everything work on one canvas.
Although it's interesting, but knowing how much time it might take I can't decide to undertake such a challenge at the moment. I don't have as much time now as I used to.
Well, it's an algorithm. What difference does it make - on one canvas or several?
Well, it's an algorithm. What difference does it make whether it's on one canvas or several?
We've discussed two problems:
1. If this is the one I was talking about originally, then an algorithmic solution would be sufficient for some cases.
2. If it's the one you mentioned, then a couple of functions won't do here. You need a scheme where all layers are stored in arrays. Each layer should be drawn taking into account what is drawn on the layers under it. In addition, all methods in the CCanvas class should be corrected. The colour of each pixel should be blended with the one below it, taking into account the transparency. Then there will be no artefacts (gaps, jagged edges, etc.). If you do it right, then you can implement translucency with blurring. All this is easy enough to implement on a single canvas. But when several canvases are used, it is much more difficult to implement.
It only works with one canvas.
And I'm not ready to rewrite my graphics library to make everything work on one canvas.
Although it's interesting, but knowing how much time it might take I can't decide to undertake such a challenge at the moment. There isn't as much time now as there used to be.
We discussed two challenges:
1. If it is the one I was talking about originally, then for some cases an algorithmic solution would be sufficient.
2. If it is the one you mentioned, then a couple of functions will not do. You need a scheme where all layers are stored in arrays. Each layer should be drawn taking into account what is drawn on the layers under it. In addition, all methods in the CCanvas class should be corrected. The colour of each pixel should be blended with the one below it, taking into account the transparency. Then there will be no artefacts (gaps, jagged edges, etc.). If you do it right, then you can implement translucency with blurring. All this is easy enough to implement on a single canvas. But when several canvases are used, it is much more difficult to implement.
I thought I was only talking about the smoothing algorithm. Without regard to overlaying transparent canvases on each other. Although... If you superimpose them, new problems will surely appear. That's why I referred to Nikolay - you see, he's got all neural connections for a long time, and his brain is probably already thinking by itself, taking into account all possible problems with the canvas )
I thought I was just talking about the smoothing algorithm. With no reference to overlaying transparent canvases on top of each other. Although... If you superimpose them, new problems will surely pop up. That's why I referred to Nikolay - you see, he's got all neural connections for a long time, and his brain is probably already thinking by itself taking into account all possible problems with the canvas).
Artem, these are really not trivial tasks that require new neural connections. For example, in SVG there is such a concept as viewBox. I've already watched a lot of videos about how it works, read a lot of documentation, written a lot of code, and still sometimes I get stumped. I still don't have the necessary neural connections, even though it seemed several times that I had figured it all out.