Interface ILspStampLocationLabelPainter

All Superinterfaces:
ILspLabelPainter, ILspPainter, ILspPaintGroupsChangeListener
All Known Implementing Classes:
TLspLabelPainter

public interface ILspStampLocationLabelPainter extends ILspLabelPainter

ILspLabelPainter extension that adds support for ALspStampLabelLocations.

ILspStampLocationLabelPainter extends ILspLabelPainter by imposing an additional requirement: the label size must not depend on the label location. So you can think of it as a fixed stamp, that is only moved and rotated to avoid label overlap, but does not change size. As this allows labeling algorithms to work more efficiently, most of the Lightspeed labeling facility works with stamp labels.

The exact location of this label can be interpreted using the following methods:

This interface makes a few assumptions:

  • The size of the label should not depend on the label location.
  • The anchor point should not depend on the label location. I.e. : the (unrotated) offset between the upper left corner of the bounds and the anchor point should always be the same for a label.
Since:
2012.0
  • Method Details

    • labelDimensionSFCT

      void labelDimensionSFCT(TLspLabelID aLabelID, TLspPaintState aPaintState, TLspContext aContext, Dimension2D aDimensionSFCT) throws TLcdNoBoundsException
      Returns the dimension of the given label. Since the dimension shouldn't depend on the location of the label, no ALspLabelLocation is passed in this method.
      Parameters:
      aLabelID - the identifier of the label for which to calculate the dimension.
      aPaintState - the paint state.
      aContext - the context.
      aDimensionSFCT - the object in which to store the dimension.
      Throws:
      TLcdNoBoundsException - when the dimension of the label could not be calculated.
    • labelAnchorPointOffsetSFCT

      void labelAnchorPointOffsetSFCT(TLspLabelID aLabel, Dimension2D aDimension, TLspPaintState aPaintState, TLspContext aContext, ILcd2DEditablePoint aOffsetSFCT)
      Returns the anchor point offset. This value is the offset of the anchor point, relative to the upper left corner of the bounds, assuming the rotation is 0.

      By default this method returns an offset of (width / 2, height / 2). Since the anchor offset shouldn't depend on the location of the label, no ALspLabelLocation is passed in this method.

      Parameters:
      aLabel - a label.
      aDimension - the dimension of the label.
      aPaintState - the paint state.
      aContext - the context.
      aOffsetSFCT - the point in which the anchor point offset will be stored.
    • worldObjectAnchorPointSFCT

      void worldObjectAnchorPointSFCT(TLspLabelID aLabel, ALspLabelLocations aLabelLocations, TLspPaintState aPaintState, TLspContext aContext, ILcd3DEditablePoint aObjectAnchorPointSFCT) throws TLcdNoBoundsException

      Calculates the object anchor point for the given label in world coordinates.

      Note : the returned point should not depend on the given label location. I.e. it should be the same point for every stamp label location.

      If the given label is anchored to another label, i.e. getAnchorObject returns a TLspLabelID, this method will throw a TLcdNoBoundsException.

      Parameters:
      aLabel - the identifier of the label for which to calculate the anchor point.
      aLabelLocations - context information. Can be used when a label depends on an other label.
      aPaintState - the paint state.
      aContext - the context.
      aObjectAnchorPointSFCT - the point in which to store the object anchor point.
      Throws:
      TLcdNoBoundsException - when the label is anchored to a TLspLabelID or when the object anchor point could not be calculated.
    • viewObjectAnchorPointSFCT

      void viewObjectAnchorPointSFCT(TLspLabelID aLabel, ALspLabelLocations aLabelLocations, TLspPaintState aPaintState, TLspContext aContext, ILcd3DEditablePoint aObjectAnchorPointSFCT) throws TLcdNoBoundsException
      Calculates the object anchor point for the given label in view coordinates.

      Note : the returned point should not depend on the given label location. I.e. it should be the same point for every stamp label location.

      Parameters:
      aLabel - the identifier of the label for which to calculate the anchor point.
      aLabelLocations - context information. Can be used when a label depends on an other label.
      aPaintState - the paint state.
      aContext - the context.
      aObjectAnchorPointSFCT - the point in which to store the object anchor point.
      Throws:
      TLcdNoBoundsException - when the object anchor point could not be calculated.