Support

If you have a problem or need to report a bug please email : support@dsprobotics.com

There are 3 sections to this support area:

DOWNLOADS: access to product manuals, support files and drivers

HELP & INFORMATION: tutorials and example files for learning or finding pre-made modules for your projects

USER FORUMS: meet with other users and exchange ideas, you can also get help and assistance here

NEW REGISTRATIONS - please contact us if you wish to register on the forum

Users are reminded of the forum rules they sign up to which prohibits any activity that violates any laws including posting material covered by copyright

[Ruby] Pen Bug/Issue/Annoyance

For general discussion related FlowStone

[Ruby] Pen Bug/Issue/Annoyance

Postby tulamide » Sun Apr 24, 2016 11:45 am

It isn't important if it is a bug or an annoyance, but it needs to be addressed.
There are times when you need to draw pixel-accurate. Unfortunately the brush and the pen act differently, and the brush is the one that acts correct.

Let's have a look at a rectangle drawn two times, first with the brush, then with a pen. The pen is aligned "inset", which means it should behave just like the brush (no pixel border crossing, full size)
01.png
01.png (8.77 KiB) Viewed 10338 times


It seems to be one pixel too large on the right and bottom. Is it really? Well, let's zoom in...
02.png
02.png (9.6 KiB) Viewed 10338 times
"There lies the dog buried" (German saying translated literally)
tulamide
 
Posts: 2714
Joined: Sat Jun 21, 2014 2:48 pm
Location: Germany

Re: [Ruby] Pen Bug/Issue/Annoyance

Postby tulamide » Sun Apr 24, 2016 11:45 am

Let's reduce the size by one pixel in width and height, since unzoomed it seems to be too large.
03.png
03.png (8.8 KiB) Viewed 10337 times


Perfect! Or is it? Another zoom will tell:
04.png
04.png (12.84 KiB) Viewed 10337 times
Last edited by tulamide on Sun Apr 24, 2016 11:48 am, edited 1 time in total.
"There lies the dog buried" (German saying translated literally)
tulamide
 
Posts: 2714
Joined: Sat Jun 21, 2014 2:48 pm
Location: Germany

Re: [Ruby] Pen Bug/Issue/Annoyance

Postby tulamide » Sun Apr 24, 2016 11:45 am

Here's another example with two rectangles, both drawn with brush and pen.
05.png
05.png (9.89 KiB) Viewed 10336 times
06.png
06.png (9.43 KiB) Viewed 10336 times


And now the issue becomes apparent. The larger pen rectangle seems to only draw half as thick on the right and bottom! Which let's me assume that "inset" doesn't really inset, but just moves the starting point by 50% to the right and bottom, and then clips to the full size.

I had a lot of problems because of that behavior. For example, on the 1:1 zoom-level it will snap to pixels, which means that sometimes the lines right/bottom are drawn, sometimes not. Especially if the values aren't as acurate as in this example.

Please consider this being a bug and change its behavior.
"There lies the dog buried" (German saying translated literally)
tulamide
 
Posts: 2714
Joined: Sat Jun 21, 2014 2:48 pm
Location: Germany

Re: [Ruby] Pen Bug/Issue/Annoyance

Postby Tronic » Mon Apr 25, 2016 3:46 am

Sigh...
I do not think is direct related to Pen method,
I get the same problem even if drawing two rectangle filled, and clip them to just have the edge,
the same annoying results,
I believe that the problem is how it is clipped in origin, and not by our commands,
it seems to have a error of calculation of the actual area to draw.
Tronic
 
Posts: 539
Joined: Wed Dec 21, 2011 12:59 pm


Return to General

Who is online

Users browsing this forum: No registered users and 49 guests