Set-coords arc floating precision
Hello, My name is Nate. I have never participated in one of these lists before so I don't know the protocol so I apologize if this isn't the appropriate channel. I am working on an application where I need arrows on the end of arcs, which I am accomplishing by adding very small lines to the end points. However I think I have discovered that set-coords when used with an arc won't update the position unless the coordinates are integers which makes my approach impossible. Is there a workaround for this issue? Thank you, Nate
On Fri, Oct 02, 2015 at 08:55:17PM -0400, Nate Chodosh wrote:
Hello,
Hello!
My name is Nate. I have never participated in one of these lists before so I don't know the protocol so I apologize if this isn't the appropriate channel.
No problem! Welcome! :)
I am working on an application where I need arrows on the end of arcs, which I am accomplishing by adding very small lines to the end points. However I think I have discovered that set-coords when used with an arc won't update the position unless the coordinates are integers which makes my approach impossible. Is there a workaround for this issue?
No sure I can see the point here as you did not provided any code but if you are rendering on the screen, as I guess, you will have to deal with rounding anyway: if you want to draw at x = 1.5 (for example) you have to decide which pixel draw (x = 1 or x = 2) as there is "nothing" between pixel.
Thank you, Nate
Bye! C.
Thanks for the welcome! Right, I know that rounding has to occur eventually but if I extend my line ltk seems to be able to draw an arrow head that looks rotated to a precision greater than the 45 degree increments allowed by a single pixel long line. So I'm wondering if it's possible to get that precision without the long "tail" on the arrow. Googling has turned up this <http://www.perlmonks.org/?node_id=800025> which seems to indicate that my idea would work directly in tk so does ltk perform the rounding earlier? Thanks, Nate On Sun, Oct 4, 2015 at 5:24 AM cage <cage@katamail.com> wrote:
On Fri, Oct 02, 2015 at 08:55:17PM -0400, Nate Chodosh wrote:
Hello,
Hello!
My name is Nate. I have never participated in one of these lists before so I don't know the protocol so I apologize if this isn't the appropriate channel.
No problem! Welcome! :)
I am working on an application where I need arrows on the end of arcs, which I am accomplishing by adding very small lines to the end points. However I think I have discovered that set-coords when used with an arc won't update the position unless the coordinates are integers which makes my approach impossible. Is there a workaround for this issue?
No sure I can see the point here as you did not provided any code but if you are rendering on the screen, as I guess, you will have to deal with rounding anyway: if you want to draw at x = 1.5 (for example) you have to decide which pixel draw (x = 1 or x = 2) as there is "nothing" between pixel.
Thank you, Nate
Bye! C.
participants (2)
-
cage
-
Nate Chodosh