Discussion of article "Studying the CCanvas Class. How to Draw Transparent Objects" - page 4
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
MQL4 ;)
I do not welcome MQL4. All examples are only in MQL5.
And the result of the script:
Vladimir, a question for you as an expert.
There is a panel in the form of a canvas. And then trend lines are drawn on the chart. How to hide them behind the canvas?
Screenshots of the MetaTrader trading platform
RTS Splice, H1, 2016.10.16
JSC ''Otkritie Broker'', MetaTrader 5, Demo
Vladimir, a question for you as an expert.
There is a panel in the form of a canvas. And then trend lines are drawn on the chart. How to hide them behind the canvas?
Thanks for the article. Unfortunately all the documentation links in it are broken.
Thanks for the message - the help has been rebuilt, hence the errors. We will correct the links.
By means of the class CCanvas?
P.S. Use CCanvas.CreateBitmap:
Creates a graphical resource bound to a chart object.
1. Creates a graphical resource in the main window of the current chart.
bool CreateBitmap(
const string name, // name
const datetimetime, // time
const doubleprice, // price
constintwidth, // width
const int height, // height
ENUM_COLOR_FORMAT clrfmt=COLOR_FORMAT_XRGB_NOALPHA// format
);
Thus you will be able to bind one corner of a Canvas. But width and height, all the same, will be set in pixels.
Can I write in Russian here?
Because you give instructions to one, but in reality you profess double standards.
Thanks for the article. Unfortunately, all the links to the documentation in it are broken.
The links have been corrected. Thanks for the message.
Errors remain.
Introduction paragraph:
...
Before you start drawing directly with the CCanvas class, you need to learn some definitions related to colour handling. For example, what is transparency and what is an alpha channel.
...
Item "5.1 Create a script "Illusion.mq5""
...
Draw a painted circle. The circle will be drawn over the colour we filled the canvas with (canvas_XRGB_NOALPHA.Erase(ColorToARGB(colr,alpha));).
canvas_XRGB_NOALPHA.CreateBitmapLabel - Here we have created a graphic resource bound to the chart object.
Fill the whole canvas with colour in ARGB format with transparency alpha
Output text - type of image processing for this canvas. Text colour in ARGB format with alpha channel equal to 255, i.e. the colour of the output text.
If we want everything drawn to be displayed on the screen, we need to refresh the screen.
Since we created the graphic resource with a binding to the chart object ( CreateBitmapLabel method), we will delete the resource using the Destroy() method.
...
Greetings, guys, can you tell me how to make the information panel so that the icons of deals are not superimposed on top.
It seems to be in the foreground, everything is drawn behind it, but the deals are overlaid on top.