Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.opengis.go.display.primitive
Interface GraphicArc

All Superinterfaces:
  Graphic

    public interface GraphicArc

extends Graphic

A `GraphicArc` represents a portion of an ellipse.

A `GraphicArc` is constructed from either an elliptic instance of `Conic`, or the following graphical values:

- Its `center`, an instance of `DirectPosition`,
- Its `width` and `height`, double precision values measured in length units from the `center`,
- Its `rotation` angle, a double precision value,
- Its arc `start` angle, a double precision value,
- Its arc `end` angle, a double precision value.

The geometric shape of `GraphicArc` can be modified via these parameters (the parameters are converted and passed to the underlying `Conic` object). Similarly, if the underlying `Conic` changes shape but remains an ellipse, then the `GraphicArc` reflects that behavior (see `Graphic.refresh()`). If the `Conic` changes to a form other than an ellipse, then the behavior of `GraphicArc` is undefined.

The ellipse is oriented by centering it at the origin of a local Cartesian plane, with the major axis of the ellipse is aligned with the x-axis (abcissa). Start and end points of the elliptic arc are measured positively as a counterclockwise angle from the positive x-axis.

The rotation of the ellipse with respect to an external Coordinate Reference System is measured positively as a clockwise angle, starting from a reference line within the Coordinate Reference System and ending at the x-axis of the local Cartesian plane.

The external Coordinate Reference System is the Coordinate Reference System of the DirectPosition correlating to the center of the ellipse. If the width and height parameters are specified in `com.dautelle.units.Length.Pixel`s, then a `GraphicArc` shall retain shape and orientation regardless of where it appears on the screen canvas. If a `setWidth` or `setHeight` method is called with a conflicting type of `Unit`, then the `GraphicArc` should convert its other parameter to the new `Unit`s. Thus, if a `GraphicArc` is defined in pixels, and setWidth is called with a new value and the `com.dautelle.units.Length.Meter` `Unit`, then the `GraphicArc` should convert its height to meters as well.

Nested Class Summary
`static class` | `GraphicArc.ArcClosure` Instances of the `ArcClosure` class represent the various methods of connecting the endpoints of an arc.

Field Summary

Fields inherited from interface Graphic
`DEFAULT_AUTO_EDIT, DEFAULT_BLINK_PATTERN, DEFAULT_BLINKING, DEFAULT_DRAG_SELECTABLE, DEFAULT_MAX_SCALE, DEFAULT_MIN_SCALE, DEFAULT_PICKABLE, DEFAULT_SELECTED, DEFAULT_VISIBLE, DEFAULT_Z_ORDER`

Method Summary
`DirectPosition` | `getCenter()` Returns the center of the ellipse defining this `GraphicArc`.
`PathType` | `getClosurePathType()` Retrieves the algorithm that is used in computing the "in-between" pixels of the `ArcClosure` verteces when the arc is rendered.
`GraphicArc.ArcClosure` | `getClosureType()` Returns the closureType.
`double` | `getEnd(Unit unit)` Returns this `GraphicArc`'s ending bearing.
`double` | `getHeight(Unit unit)` Returns the size of the height axis of the ellipse defining this `GraphicArc`, in terms of the given `Unit`.
`PolygonSymbolizer` | `getPolygonSymbolizer()` Returns the `GraphicStyle` for this `GraphicPolygon`, which is required to be a `PolygonSymbolizer`.
`double` | `getRotation(Unit unit)` Returns this `GraphicArc`'s orientation source.
`double` | `getStart(Unit unit)` Returns this `GraphicArc`'s start bearing.
`double` | `getWidth(Unit unit)` Returns the size of the width axis of the ellipse defining this `GraphicArc`, in terms of the given `Unit`.
`boolean` | `isAllowingExtentsChange()` Indicates whether this `GraphicArc` is displaying edit handles for changing the angular extents of the defining ellipse.
`boolean` | `isAllowingRotation()` Indicates whether this `GraphicArc` is displaying an anchor handle for changing the rotation of the defining ellipse.
`boolean` | `isCircle()` Indicates whether this `GraphicArc` is a circle.
`boolean` | `isClosedEllipse()` Indicates whether this `GraphicArc` is a closed ellipse.
`void` | `setAllowingExtentsChange(boolean newValue)` Sets the boolean that indicates whether this `GraphicArc` is displaying edit handles for changing the angular extents of the defining ellipse.
`void` | `setAllowingRotation(boolean newValue)` Sets the boolean that indicates whether this `GraphicArc` displays an anchor handle for changing the rotation of the defining ellipse.
`void` | `setArc(DirectPosition center, double width, double height, Unit lengthUnit, double rotation, double start, double end, Unit angleUnit)` Sets the geometry for this `GraphicArc`.
`void` | `setCenter(DirectPosition center)` Sets the center of the ellipse defining this `GraphicArc`.
`void` | `setClosurePathType(PathType pathType)` Sets the algorithm that is used in computing the "in-between" pixels of the `ArcClosure` verteces when the arc is rendered.
`void` | `setClosureType(GraphicArc.ArcClosure closureType)` Sets the closureType, which determines how the endpoints of this `GraphicArc` are connected.
`void` | `setEnd(double end, Unit unit)` Sets this `GraphicArc`'s end bearing.
`void` | `setHeight(double height, Unit unit)` Sets the size of the height axis of the ellipse defining this `GraphicArc`, in terms of the given `Unit`.
`void` | `setRotation(double rotation, Unit unit)` Sets the orientation for the width axis.
`void` | `setStart(double start, Unit unit)` Sets this `GraphicArc`'s start bearing.
`void` | `setWidth(double width, Unit unit)` Sets the size of the width axis of the ellipse defining this `GraphicArc`, in terms of the given `Unit`.

Methods inherited from interface Graphic
`addGraphicListener, cloneGraphic, dispose, fireGraphicEvent, getAutoEdit, getBlinking, getBlinkPattern, getClientProperty, getDragSelectable, getGraphicStyle, getMaxScale, getMinScale, getName, getParent, getPickable, getSelected, getSymbology, getVisible, getZOrderHint, isPassingEventsToParent, isShowingAnchorHandles, isShowingEditHandles, putClientProperty, refresh, removeGraphicListener, setAutoEdit, setBlinking, setBlinkPattern, setDragSelectable, setGraphicStyle, setMaxScale, setMinScale, setName, setParent, setPassingEventsToParent, setPickable, setSelected, setShowingAnchorHandles, setShowingEditHandles, setSymbology, setVisible, setZOrderHint`

Method Detail

### setArc

    void setArc(DirectPosition center,
                double width,
                double height,
                Unit lengthUnit,
                double rotation,
                double start,
                double end,
                Unit angleUnit)

  Sets the geometry for this `GraphicArc`.

  The geometry is oriented by centering the ellipse at the origin of a local Cartesian plane, with the major axis of the ellipse is aligned with the x-axis (abcissa). Start and end points of the elliptic arc are measured positively as a counterclockwise angle from the positive x-axis.

  The rotation of the ellipse with respect to an external Coordinate Reference System is measured positively as a clockwise angle, starting from a reference line within the Coordinate Reference System and ending at the x-axis of the local Cartesian plane.

  The geometric values are set on the underlying `Conic` geometry for this `Graphic`.

  Parameters:
    `center` - the location of the centerpoint of the ellipse defining this `GraphicArc`.
    `width` - the length of the major axis of the ellipse defining this `GraphicArc`.
    `height` - the length of the minor axis of the ellipse defining this `GraphicArc`.
    `lengthUnit` - the unit of width and height.
    `rotation` - the rotation of the ellipse defining this `GraphicArc` with respect to the Coordinate Reference System of the centerpoint DirectPosition.
    `start` - the angle of starting point of the arc, drawn clockwise from the positive side of the major axis.
    `end` - the angle of the ending point of the arc, drawn clockwise from the positive side of the major axis.
    `angleUnit` - the unit of rotation.
  Throws:
    `GeometryNotSupportedException` - if the width value is smaller than the height value is not an ellipse.

### setCenter

    void setCenter(DirectPosition center)

  Sets the center of the ellipse defining this `GraphicArc`. Value is set on the underlying `Conic` geometry for this `Graphic`.

### getCenter

    DirectPosition getCenter()

  Returns the center of the ellipse defining this `GraphicArc`. Value is acquired from the underlying `Conic` geometry for this `Graphic`.

### setWidth

    void setWidth(double width,
                  Unit unit)

  Sets the size of the width axis of the ellipse defining this `GraphicArc`, in terms of the given `Unit`. Value is set on the underlying `Conic` geometry for this `Graphic`.

  Parameters:
    `width` - Size of the width axis.
    `unit` - the `Unit` of the width value.

### getWidth

    double getWidth(Unit unit)

  Returns the size of the width axis of the ellipse defining this `GraphicArc`, in terms of the given `Unit`. Value is acquired from the underlying `Conic` geometry for this `Graphic`.

  Parameters:
    `unit` - the `Unit` of the width value.
  Returns:
    The size of the width axis of the arc.

### setHeight

    void setHeight(double height,
                   Unit unit)

  Sets the size of the height axis of the ellipse defining this `GraphicArc`, in terms of the given `Unit`. Value is set on the underlying `Conic` geometry for this `Graphic`.

  Parameters:
    `height` - Size of the height axis.
    `unit` - the `Unit` of the height value.

### getHeight

    double getHeight(Unit unit)

  Returns the size of the height axis of the ellipse defining this `GraphicArc`, in terms of the given `Unit`. Value is acquired from the underlying `Conic` geometry for this `Graphic`.

  Parameters:
    `unit` - the `Unit` of the height value.
  Returns:
    The size of the height axis of the arc.

### setRotation

    void setRotation(double rotation,
                     Unit unit)

  Sets the orientation for the width axis. On a `Canvas`, this might be the angle between the positive X axis and the width axis of the arc. For a projected arc, this might be the angle between due north and the width axis.

  Parameters:
    `rotation` - orientation of the arc.
    `unit` - the `Unit` for the angle value.

### getRotation

    double getRotation(Unit unit)

  Returns this `GraphicArc`'s orientation source.

  Parameters:
    `unit` - the `Unit` for the angle value.
  Returns:
    orientation of the arc.

### setStart

    void setStart(double start,
                  Unit unit)

  Sets this `GraphicArc`'s start bearing. The arc is stroked counter-clockwise from start to end.

  Parameters:
    `start` - the start Orientation.
    `unit` - the `Unit` for the angle value.

### getStart

    double getStart(Unit unit)

  Returns this `GraphicArc`'s start bearing. The arc is stroked counter-clockwise from start to end.

  Parameters:
    `unit` - the `Unit` for the angle value.
  Returns:
    the arc start Orientation.

### setEnd

    void setEnd(double end,
                Unit unit)

  Sets this `GraphicArc`'s end bearing. The arc is stroked counter-clockwise from start to end.

  Parameters:
    `end` - the end orientation.
    `unit` - the `Unit` for the angle value.

### getEnd

    double getEnd(Unit unit)

  Returns this `GraphicArc`'s ending bearing. The arc is stroked counter-clockwise from start to end.

  Parameters:
    `unit` - the `Unit` for the angle value.
  Returns:
    the arc end orientation.

### setClosureType

    void setClosureType(GraphicArc.ArcClosure closureType)

  Sets the closureType, which determines how the endpoints of this `GraphicArc` are connected. This is one of the constants defined in the `ArcClosure` class. The integer values corresponding to these constants are the same as the closure type values in `java.awt.geom.Arc2D`.

  Parameters:
    `closureType` - Closure type of the arc (one of the ArcClosure constants: OPEN, CHORD, or PIE)

### getClosureType

    GraphicArc.ArcClosure getClosureType()

  Returns the closureType.

  Returns:
    Closure type of the arc (one of `ArcClosure` constants OPEN, CHORD, or PIE). The integer values corresponding to these constants are the same as the constants OPEN, CHORD, and PIE from `java.awt.geom.Arc2d`.

### isAllowingRotation

    boolean isAllowingRotation()

  Indicates whether this `GraphicArc` is displaying an anchor handle for changing the rotation of the defining ellipse.

### setAllowingRotation

    void setAllowingRotation(boolean newValue)

  Sets the boolean that indicates whether this `GraphicArc` displays an anchor handle for changing the rotation of the defining ellipse.

### isCircle

    boolean isCircle()

  Indicates whether this `GraphicArc` is a circle. The implementation should test for this based on the geometry settings.

### isClosedEllipse

    boolean isClosedEllipse()

  Indicates whether this `GraphicArc` is a closed ellipse. The implementation should test for this based on the geometry settings.

### isAllowingExtentsChange

    boolean isAllowingExtentsChange()

  Indicates whether this `GraphicArc` is displaying edit handles for changing the angular extents of the defining ellipse.

### setAllowingExtentsChange

    void setAllowingExtentsChange(boolean newValue)

  Sets the boolean that indicates whether this `GraphicArc` is displaying edit handles for changing the angular extents of the defining ellipse.

### getPolygonSymbolizer

    PolygonSymbolizer getPolygonSymbolizer()

  Returns the `GraphicStyle` for this `GraphicPolygon`, which is required to be a `PolygonSymbolizer`.

  Returns:
    the GraphicPolygon's `GraphicStyle`.

### setClosurePathType

    void setClosurePathType(PathType pathType)

  Sets the algorithm that is used in computing the "in-between" pixels of the `ArcClosure` verteces when the arc is rendered. This does not when there is no closure, i.e. when isClosedEllipse() is false, or for `ArcClosure.OPEN`.

  Parameters:
    `pathType` - This must be one of the static constants in the PathType class or one of its subclasses.

### getClosurePathType

    PathType getClosurePathType()

  Retrieves the algorithm that is used in computing the "in-between" pixels of the `ArcClosure` verteces when the arc is rendered. This does not when there is no closure, i.e. when isClosedEllipse() is false, or for `ArcClosure.OPEN`.

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 1994-2008 Open Geospatial Consortium. All Rights Reserved.