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 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.
Dennis Kirichenko: 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.
Allow the use of cookies to log in to the MQL5.com website.
Please enable the necessary setting in your browser, otherwise you will not be able to log in.
You are signed in. Two-factor authentication has been disabled. Set it up again and scan a new QR code, or continue with two-factor authentication disabled.
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!