Discussion of article "Studying the CCanvas Class. How to Draw Transparent Objects" - page 3
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
Here's a question.
I draw different shapes in the canvas and overlay them on each other. How to make the colours remain original without blending?
I set COLOR_FORMAT_XRGB_NOALPHA, but mixing takes place :-(((.
However, I have this variant. There is a picture of CPicture type attached to a dialogue of CDialog type. It is linked to a resource of CCanvas type. The latter is created without binding to a window.
Vladimir, I'm not good at canvas....
Here's a question.
I draw different shapes in the canvas and overlay them on each other. How to make the colours remain original without blending?
I set COLOR_FORMAT_XRGB_NOALPHA, but blending takes place :-(((
...
The colour drawn in the canvas (let's call it "top" or last) replaces the colour drawn in the canvas earlier.
Vladimir, thank you very much!
I just overlooked the ColorToARGB() conversion.
Vladimir, thank you very much!
I just overlooked the ColorToARGB() conversion.
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.
Let's do an excercise more easily. I go to put a circle moves with the price; but, why does not it move in axis Y?
That is the code
Let's do an excercise more easily. I go to put a circle moves with the price; but, why does not it move in axis Y?
That is the code
Let's do an excercise more easily. I go to put a circle moves with the price; but, why does not it move in axis Y?
That is the code
"Time[]," "Close[]" - mistake. There are no such variables in MQL5!