Canvas issue
-
After reading some docs, I am sure you are not telling something.
You want to draw on something that is white, correct?
So your canvas must be a child of something that is white.For instance:
Rectangle { color: white; Canvas { ... } }Is that the case here?
-
After reading some docs, I am sure you are not telling something.
You want to draw on something that is white, correct?
So your canvas must be a child of something that is white.For instance:
Rectangle { color: white; Canvas { ... } }Is that the case here?
-
OK, I just run your example, and it seems to work.
I have a white background on which I can draw.
When I draw I see the traces of my mouse with a big "point" size.
Draw color is blue.Everything seems to work.
Now, since I don't have your "Neuro" file, THAT may be your problem...
-
Ahhhh! I understand now! (I think)
You think that what ever background you choose, it will be part of your canvas?
That is NOT the case!The canvas just is a container for some points being drawn!
For instance, you can take the canvas, and put it on something else like a red Rectangle.
It will still have the same points, but now on a red background.In other words, the canvas does NOT hold any information at all about the background. It just knows about some pixels.
-
But that explaines why you see "black" instead of "white" on your Context2D
I am assuming you are just interested in the points, and not the background, for further processing.
So forget about the canvas background, ok?@peteritv Huge thanks, I finnally got what's going on! A visible background of working application is just a result of visual compositing the Canvas with it's parent and these two does not share any properties between each other. Thanks a lot again, I think it is very important to know such nuances.