Class DXFEllipse

  • All Implemented Interfaces:
    DXFObject

    public class DXFEllipse
    extends DXFEntity
    Class representing an elliptical arc.
    Author:
    jsevy
    • Constructor Summary

      Constructors 
      Constructor Description
      DXFEllipse​(RealPoint center, RealPoint majorAxisEndpoint, double axisRatio, double startParameter, double endParameter, boolean isCounterclockwise, java.awt.Graphics2D graphics)
      Create an elliptical arc corresponding to the specified parameters.
    • Constructor Detail

      • DXFEllipse

        public DXFEllipse​(RealPoint center,
                          RealPoint majorAxisEndpoint,
                          double axisRatio,
                          double startParameter,
                          double endParameter,
                          boolean isCounterclockwise,
                          java.awt.Graphics2D graphics)
        Create an elliptical arc corresponding to the specified parameters. Note that this is the most general case of an ellipse, since the major and minor axes need not be parallel to the x or y axes.
        Parameters:
        center - The center of the ellipse
        majorAxisEndpoint - The endpoint of the major axis, relative to the center of the ellipse
        axisRatio - The ratio between the length of the minor axis and the length of the major axis
        startParameter - Parameter t corresponding to the start point of the arc represented as (a*cos(t), b*sin(t)), rotated so that t = 0 corresponds to the major axis endpoint.
        endParameter - Parameter t corresponding to the end point of the arc represented as (a*cos(t), b*sin(t)), rotated so that t = 0 corresponds to the major axis endpoint.
        isCounterclockwise - Indicate direction of arc, clockwise or counterclockwise
        graphics - The graphics object specifying parameters for the arc (color, thickness)
    • Method Detail

      • toDXFString

        public java.lang.String toDXFString()
        Implementation of DXFObject interface method; creates DXF text representing the elliptical arc.
        Specified by:
        toDXFString in interface DXFObject
        Overrides:
        toDXFString in class DXFEntity