org.eclipse.graphiti.services

## Interface IPeLayoutService

All Known Subinterfaces:
  ILayoutService, IPeService, IUiLayoutService

All Known Implementing Classes:
  LayoutServiceImpl, PeServiceImpl, UiLayoutService

    public interface IPeLayoutService

The interface IPeLayoutService provides services (e.g. query location info for a pictogram element) which makes it easier to write layout features.

### Method Summary

All Methods Instance Methods Abstract Methods
`ILocation` `getConnectionMidpoint(Connection c, double d)` Gets the connection midpoint.
`IRectangle` `getGaBoundsForAnchor(Anchor anchor)` Returns the bounds of the graphics algorithm, which is referenced by the anchor.
`ILocationInfo` `getLocationInfo(Shape shape, int x, int y)` Returns the location info for a specific position inside a shape.
`ILocation` `getLocationRelativeToDiagram(Anchor anchor)` Returns the location of the anchor relative to the diagram.
`ILocation` `getLocationRelativeToDiagram(Shape shape)` Returns the location of the shape relative to the diagram.

### Method Detail

#### getConnectionMidpoint

    ILocation getConnectionMidpoint(Connection c,
                                    double d)

Gets the connection midpoint.

Parameters:
  `c` - the connection
  `d` - a relative location on the connection (must be between 0 and 1)
Returns:
  the connection midpoint

#### getGaBoundsForAnchor

    IRectangle getGaBoundsForAnchor(Anchor anchor)

Returns the bounds of the graphics algorithm, which is referenced by the anchor.

Parameters:
  `anchor` - the anchor
Returns:
  the bounds of the anchor graphics algorithm

#### getLocationInfo

    ILocationInfo getLocationInfo(Shape shape,
                                  int x,
                                  int y)

Returns the location info for a specific position inside a shape. The location info contains the shape and the graphics algorithm at the given position.

Parameters:
  `shape` - the shape
  `x` - x coordinate
  `y` - y coordinate
Returns:
  the location info
See Also:
  `ILocationInfo`

#### getLocationRelativeToDiagram

    ILocation getLocationRelativeToDiagram(Anchor anchor)

Returns the location of the anchor relative to the diagram.

Parameters:
  `anchor` - the given anchor
Returns:
  the relative location

#### getLocationRelativeToDiagram

    ILocation getLocationRelativeToDiagram(Shape shape)

Returns the location of the shape relative to the diagram.

Parameters:
  `shape` - the given shape
Returns:
  the relative location