[Question] Function or Purpose of Color Square in Canvas

DISCLAIMER: I didn’t post this on the GIT, because I think we should discuss this issue first as I’m not sure this is even a bug,but rather a problem with the design of Pencil2D. Once we’ve solved how to proceed I’ll post the issue on Github to keep track of it, IF needed.

–Image Demo–

–Steps to reproduce–

  1. Zoom-In until you see a square in the middle of the canvas

  2. Draw stuff and watch it change, whoooaahhh!! B-)

  3. Profit (?)

–Notes–

To be honest I have no idea what the heck is that. My theory is that it is a graphical representation, perhaps an instance, of the “canvas object” (I apologize if these are not the terms to be used).

I just want to know what is this, and why it’s there. Do we need it there? (no other graphics app has this, so why should we?)

Once we know what, how and why. We can proceed to decide if we need to keep it or just “hide” it.

 

Even I was surprised when I found this square when I first downloaded the nightly build. I just assumed its some kind of a marker for the centre of the canvas.

Yeah I’ve wondered what this was myself, I don’t think it’s unintentional. I assume it’s to mark the center of the canvas but there are probably better ways to do so, if there is even a need to do so.

Wow wtf… that has got to be a bug, and a very recent one. I can’t seem to reproduce this bug on build dec. 19 and earlier… i can however reproduce it on the newest nightly build, so between build dec. 19 (possibly never too) and the latest build, something went wrong.

I have noticed this dot too but never took the time to check what it was and remove it. Maybe something that @chchwy have added to mark the center of the screen during his re-factoring devs and forgot to remove it.

It should be reported as a bug.

@feeef the thing is that the square is interactive. If you perform any operation inside pencil the square will not only change colour but shape, sometimes it even displays a graphical cross, which I take is a cartesian coordinate graph. That’s why I thought it was like some kind of graphical initialization routine for the pencil2d canvas.

That is interesting! @chchwy, what do you think?

Easter Egg?

I think the first occurrence is at

git checkout 16311bd070950df39db6a1b67fbef146a01f0ca2
HEAD is now at 16311bd… [UnitTest] Add object test.
(It actually looks very primitive at this point.)
tests/test_object.cpp

I’m not sure that’s it though. I searched for “test_object.h” in the project and the only other occurrence I found (other than the test_object.cpp) was in tests/test.pro If that’s it, I don’t understand how its getting in there.

Assuming it’s not causing harm, we should have some fun with it.
In a place I used to work, I was asked by the chief design engineer of the customer if I ever saw the kid fishing on the prototype. It was an early version of helicopter transmission and there sitting on a cooling fin, if you looked real real real hard was a little kid with a fishing line in the water… (I’m dating myself and this was in the age where mechanical drawings where still done by hand) Apparently he got bored and figured since it was only a prototype, what the heck.