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
4 posts
• Page 1 of 1
[Ruby] Pen Bug/Issue/Annoyance
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)
It seems to be one pixel too large on the right and bottom. Is it really? Well, let's zoom in...
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)
It seems to be one pixel too large on the right and bottom. Is it really? Well, let's zoom in...
"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
Let's reduce the size by one pixel in width and height, since unzoomed it seems to be too large.
Perfect! Or is it? Another zoom will tell:
Perfect! Or is it? Another zoom will tell:
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
Here's another example with two rectangles, both drawn with brush and pen.
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.
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
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.
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
4 posts
• Page 1 of 1
Who is online
Users browsing this forum: No registered users and 68 guests