How do you draw precise borders around a rectangle?

For general discussion related FlowStone
User avatar
Spogg
Posts: 3368
Joined: Thu Nov 20, 2014 4:24 pm
Location: Birmingham, England
Contact:

Re: How do you draw precise borders around a rectangle?

Post by Spogg »

@Nowhk:
I see the same in 3.08.1

I get the same difference as you between schematic view and focus mode.
Windows 7 with Intel on-chip graphics in the core i7.

It becomes more visibly apparent when you make the View area really small and this was my issue with my small menu selector box from Synthmaker. I couldn't get the border "right".
You are not alone!

Cheers

Spogg
Nowhk
Posts: 275
Joined: Mon Oct 27, 2014 6:45 pm

Re: How do you draw precise borders around a rectangle?

Post by Nowhk »

Ah ok! So maybe its a Bug, or MyCo can shed light to this...
I'm on Windows 10 Professional (64bit) anyway.
tulamide
Posts: 2714
Joined: Sat Jun 21, 2014 2:48 pm
Location: Germany

Re: How do you draw precise borders around a rectangle?

Post by tulamide »

No, I don't see the same. And the code is correct, plus, the used values are indeed excluding subpixels. So there seems to be an issue introduced past 3.0.6 (which I use)
"There lies the dog buried" (German saying translated literally)
Nowhk
Posts: 275
Joined: Mon Oct 27, 2014 6:45 pm

Re: How do you draw precise borders around a rectangle?

Post by Nowhk »

Spogg wrote:@Nowhk:
I see the same in 3.08.1

tulamide wrote:No, I don't see the same. And the code is correct, plus, the used values are indeed excluding subpixels. So there seems to be an issue introduced past 3.0.6 (which I use)

Well, at the end no bugs or issues. I've discovered that using "v.setSmoothingMode("off")" fix the problem with border bottom. For precise drawing, this option + multiple of 0.125 works perfectly 8-)
Thanks both!
Tronic
Posts: 539
Joined: Wed Dec 21, 2011 12:59 pm

Re: How do you draw precise borders around a rectangle?

Post by Tronic »

FS-User-Guide
pag. - 188 -
see the Pen Alignment section

Code: Select all

   pen = Pen.new (Color.ew(225)), 0.1
   pen.setAlignment "inset" # default is "center"


draw you rectangle and take care if you have to subtract the Pen size or not for the width and height.
Tronic
Posts: 539
Joined: Wed Dec 21, 2011 12:59 pm

Re: How do you draw precise borders around a rectangle?

Post by Tronic »

Here the demo of Pen Alignment with "inset" mode
Rectangle Border_with_Pen_Alignment_Tronic.fsm
(565 Bytes) Downloaded 870 times
Tronic
Posts: 539
Joined: Wed Dec 21, 2011 12:59 pm

Re: How do you draw precise borders around a rectangle?

Post by Tronic »

With the pen with "inset" alignment....
I don't expect to subtract anything to the rectangle, so...
YES it's an BUG....
the rectangle is drawed correctly, but the view size have 1 pixel lag....
always the rendering View remove the last x/y from the rectangle, with the default grid,
but you can have different result if you try to zoom in/out...
this is not an :arrow: BUG? why...? :?
Post Reply