Bug 406929 - Provide information about line segment in context object
Summary: Provide information about line segment in context object
Status: ASSIGNED
Alias: None
Product: Graphiti
Classification: Modeling
Component: Core (show other bugs)
Version: 0.9.0   Edit
Hardware: All All
: P4 enhancement (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-04-30 12:02 EDT by Hallvard Traetteberg CLA
Modified: 2013-05-06 03:13 EDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Hallvard Traetteberg CLA 2013-04-30 12:02:34 EDT
The Graphiti feature objects all rely on various context objects providing relevant information about the triggering/driving user interaction. E.g. a context object may implement IPictogramElementContext and provide the pictogram you clicked on and ILocationContext and provide x,y coordinates.

When interacting with a connection with bend-points, you may similarly need to know the specific segment you clicked on, e.g. to split it. It may also be useful to know its start and end locations, since this isn't always easy to compute from anchors.

I propose an IConnectionSegmentContext with the following methods:
- Connection getConnection() // could be FreeFormConnection or CurvedConnection
- int getLineSegmentNum() // index into bendpoints or control points
- int getStartX() // the actual start-point, computed from the underlying figure
- int getStartY()
- int getEndX() // the actual end-point, computed from the underlying figure
- int getEndY()
Comment 1 Michael Wenz CLA 2013-05-06 03:13:50 EDT
Enhancement for post-Kepler