Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mark the start or end point of lines (and polygon) #601

Closed
finscn opened this issue Jan 27, 2014 · 20 comments
Closed

Mark the start or end point of lines (and polygon) #601

finscn opened this issue Jan 27, 2014 · 20 comments
Assignees
Labels
feature It's a feature, not a bug.
Milestone

Comments

@finscn
Copy link

finscn commented Jan 27, 2014

when I draw a line for doing something , eg. as an enemy's move path.
I want to know which is startpoint , which is end point in editor.

Thanks

@benstahl
Copy link

This would be useful. I would also like to add a related request for a function to reverse the point sequence of a polyline.

@finscn
Copy link
Author

finscn commented Oct 3, 2014

I hope the first point(start point) of polygon is also marked

@finscn
Copy link
Author

finscn commented Feb 8, 2015

Is this feature in the develope plan ?

@bjorn
Copy link
Member

bjorn commented Feb 8, 2015

@finscn It could be, along with the 240 other issues of course. Unfortunately, I don't have much time for Tiled development anymore. If you want to help out, please consider supporting me financially at https://www.patreon.com/bjorn. Thanks!

@finscn
Copy link
Author

finscn commented Feb 11, 2015

Ok. I've chosen $1 per month (my name is Rocky Wei ). I'm a Chinese poor man (indie developer , no job) now. I will give you more when my game could take money for me.

Thanks

@bjorn
Copy link
Member

bjorn commented Feb 11, 2015

@finscn That's really appreciated!

@bjorn bjorn added this to the 0.12.0 milestone Apr 10, 2015
@bjorn bjorn self-assigned this May 5, 2015
@bjorn
Copy link
Member

bjorn commented May 5, 2015

Hmm, I've done a quick implementation of this but I'm not comfortable pushing it into Tiled 0.12 at this point, since it affects the boundary offset. I'd like to revisit how objects are rendered and implement this properly after the Tiled 0.12 release.

In any case here's how I think this could look, with the dot marking the start point (which should also make clear what the end point is):

selection_006

@bjorn bjorn modified the milestones: Tiled 0.13, Tiled 0.12 May 5, 2015
@finscn
Copy link
Author

finscn commented May 6, 2015

Thank you very much !!!!!! love you & kiss you

@finscn
Copy link
Author

finscn commented May 6, 2015

One Suggestion : @bjorn , I think an arrow at end point is better than a circle at start point.

2015-05-06 2 44 52

@bjorn
Copy link
Member

bjorn commented May 6, 2015

@finscn Hmm, I think I prefer the dot for the following reasons:

  • It is easier to implement since it does not depend on the direction of the line and does not need special code to handle drawing it at different zoom levels.
  • It can't be misinterpeted as a part of the shape.
  • It looks cleaner and is hence more acceptable to have always on, whereas for the arrowheads I think I'd need to add an option to turn it off for those who don't need it.

I can see the problem with the ambiguity though...

@bjorn
Copy link
Member

bjorn commented Jul 20, 2015

So, I went for the "simple" implementation (it still required change 1b82bed to be made first so I could expand the item's bounding rect for repainting without affecting its selection outline).

The reasons not go with the arrow are the same as in my previous comment. Hopefully it's a pretty rare case to have a polyline connected like that.

@finscn
Copy link
Author

finscn commented Jul 21, 2015

@bjorn , Could you let this feature apply to Polygon ? Thanks

@finscn finscn changed the title Mark the start or end point of lines Mark the start or end point of lines (and polygon) Jul 22, 2015
@bjorn
Copy link
Member

bjorn commented Jul 22, 2015

No problem, reopening this issue until I got around to it.

@bjorn bjorn reopened this Jul 22, 2015
@bjorn bjorn closed this as completed in 9371681 Jul 23, 2015
@bjorn
Copy link
Member

bjorn commented Jul 23, 2015

In hindsight, I wonder if it would be better to mark this starting point only in "edit polyline/polygon" mode and not always. There was also a request to display the node indexes for all points, which could also be something for the edit mode. So anyways, possibility for improvement is still there as usual. :-)

@ridiculousRPG
Copy link

Just an idea: Maybe one could draw a second smaller circle that indicates the direction? Would this be easier than the arrow?

@bjorn
Copy link
Member

bjorn commented Jul 24, 2015

@ridiculousRPG It would essentially have the same complexity (first issue) but it would probably avoid the visual issues regarding interpretation and noise.

Are you asking because you need this or just trying to help? I would personally prefer a somewhat more complete solution that is only used when the Edit Polygons tool is active.

@ridiculousRPG
Copy link

I just thought maybe it would be easier to draw than the arrow when I was reading the comments.

@ridiculousRPG
Copy link

I thought that the coordinates of the end of the first line segment should be available and drawing a smaller point like illustrated should be easy and solves the problem...
test

@finscn
Copy link
Author

finscn commented Sep 6, 2015

@bjorn , I think @ridiculousRPG 's suggestion about polygon is good.
In my case , the polygon's direction is very important , I use polygon for mark move-path.

@bjorn
Copy link
Member

bjorn commented Sep 6, 2015

@finscn I think issue #145 describes a better solution to that problem, which is at least less arbitrary and more generally useful.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature It's a feature, not a bug.
Projects
None yet
Development

No branches or pull requests

4 participants