Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » GEF » Help with polygons
Help with polygons [message #202624] Fri, 11 November 2005 14:47 Go to next message
Eclipse UserFriend
Originally posted by: radicr.stop.spam.gmail.com

Hello all,

I have already been asking questions here, and i thought i could solve the
problem on my own but i am stuck for few days.
The problem is that i need to implement functionality in GEF something like
corel draw (much simpler, though!) Users should get the tool from the
palette and draw polygons with non rectangular and various shapes. So, my
diagram does have picture in the background and picture has got contures
that user would use to draw lines and polygons so i could extract some model
informations from it. Ideally would be that when user closes the polygon - i
have an editpart and i would offer proprety sheet where he could enter some
additional data. Maybe i am not explaining good enough (sorry), but i need
to use this map and to enable users to mark regions of the map thus
extracting some menanigful data - in fact users would mark borders of same
space units on the floor. The best way would be that user marks some
rectangle and holding for example ctrl key adds points - i would then add
those points to the pointlist and extending user's marked space.
I was trying with Polygon, Polyline, PolyLineConnection but i didnt make it
to get clear situation in my head how this could be achieved. Problem with
polygon is that it cant be resized and i dont know what would be convenient
way for user to mark the shape or add new points. Polyline is not intended
to be used as a figure model (i think i have read it somewhere). Polyline
connection could be useful with BendpointConnectionRouter like it is used in
Logic example, because user can drag points and make shapes as he wants but
i dont need connection since i dont connect anything, i need just EditPart -
not ConnectionEditPart

I could maybe allow user to drop points to the diagram - and i would need
lets say PointEditPart for each point. Then, i could also have connections
for connecting these points. Where user has finished his drawing - i would
need to "merge" all these points and editparts to one editpart that would
represent the desired shape and one editpart in the model. Problem is that i
think GEF is not intended to work this way.

So, any help from the more experienced users is appreciated.

--
Pozdrav,
Radovan
Re: Help with polygons [message #202779 is a reply to message #202624] Sat, 12 November 2005 11:14 Go to previous message
Eclipse UserFriend
Originally posted by: radicr.killspam.eunet.yu

I realize that question is a little bit long and people hate to read many
lines of the posting. Basically, it would be helpful if someone would give
some hints how to draw curve objects in GEF. That would give me a good
start, and i didnt have any success finding any example on the net - just
question about it in this ng.

Thanks,
Radovan

"Radovan Radic" <radicr.stop.spam@gmail.com> wrote in message
news:dl2av7$ml6$1@news.eclipse.org...
> Hello all,
>
Previous Topic:Draw2D does not work correct when I change the Label font size
Next Topic:Contribute to Eclipse
Goto Forum:
  


Current Time: Fri Apr 26 13:07:22 GMT 2024

Powered by FUDForum. Page generated in 0.03292 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top