theta = Math.toRadians(theta); dx = -arc.getWidth()/2.0*Math.sin(theta); dy = arc.getHeight()/2.0*Math.cos(theta);
theta = Math.toRadians(theta); dx = -arc.getWidth()/2.0*Math.sin(theta); dy = arc.getHeight()/2.0*Math.cos(theta);
theta = Math.toRadians(theta); dx = -arc.getWidth()/2.0*Math.sin(theta); dy = arc.getHeight()/2.0*Math.cos(theta);
theta = Math.toRadians(theta); dx = -arc.getWidth()/2.0*Math.sin(theta); dy = arc.getHeight()/2.0*Math.cos(theta);
theta = Math.toRadians(theta); dx = -arc.getWidth()/2.0*Math.sin(theta); dy = arc.getHeight()/2.0*Math.cos(theta);
double ext = arc.getAngleExtent(); double width = arc.getWidth(); double height = arc.getHeight();
double ext = arc.getAngleExtent(); double width = arc.getWidth(); double height = arc.getHeight();
stream.writeDouble(arc.getY()); stream.writeDouble(arc.getWidth()); stream.writeDouble(arc.getHeight()); stream.writeDouble(arc.getAngleStart()); stream.writeDouble(arc.getAngleExtent());
stream.writeDouble(arc.getY()); stream.writeDouble(arc.getWidth()); stream.writeDouble(arc.getHeight()); stream.writeDouble(arc.getAngleStart()); stream.writeDouble(arc.getAngleExtent());
stream.writeDouble(arc.getY()); stream.writeDouble(arc.getWidth()); stream.writeDouble(arc.getHeight()); stream.writeDouble(arc.getAngleStart()); stream.writeDouble(arc.getAngleExtent());
/** {@inheritDoc} */ public void draw(final Shape s) { if (s instanceof Rectangle2D) { final Rectangle2D r2 = (Rectangle2D) s; drawRect(r2.getX(), r2.getY(), r2.getWidth(), r2.getHeight()); } else if (s instanceof Ellipse2D) { final Ellipse2D e2 = (Ellipse2D) s; drawOval(e2.getX(), e2.getY(), e2.getWidth(), e2.getHeight()); } else if (s instanceof RoundRectangle2D) { final RoundRectangle2D r2 = (RoundRectangle2D) s; drawRoundRect(r2.getX(), r2.getY(), r2.getWidth(), r2.getHeight(), r2.getArcWidth(), r2.getArcHeight()); } else if (s instanceof Arc2D) { final Arc2D a2 = (Arc2D) s; drawArc(a2.getX(), a2.getY(), a2.getWidth(), a2.getHeight(), a2.getAngleStart(), a2.getAngleExtent()); } else { Path p = (Path) SHAPE_CACHE.get(s); if (p == null) { p = pathIterator2Path(s.getPathIterator(null)); SHAPE_CACHE.put(s, p); } drawPath(p); } }
/** {@inheritDoc} */ public void fill(final Shape s) { if (s instanceof Rectangle2D) { final Rectangle2D r2 = (Rectangle2D) s; fillRect(r2.getX(), r2.getY(), r2.getWidth(), r2.getHeight()); } else if (s instanceof Ellipse2D) { final Ellipse2D e2 = (Ellipse2D) s; fillOval(e2.getX(), e2.getY(), e2.getWidth(), e2.getHeight()); } else if (s instanceof RoundRectangle2D) { final RoundRectangle2D r2 = (RoundRectangle2D) s; fillRoundRect(r2.getX(), r2.getY(), r2.getWidth(), r2.getHeight(), r2.getArcWidth(), r2.getArcHeight()); } else if (s instanceof Arc2D) { final Arc2D a2 = (Arc2D) s; fillArc(a2.getX(), a2.getY(), a2.getWidth(), a2.getHeight(), a2.getAngleStart(), a2.getAngleExtent()); } else { Path p = (Path) SHAPE_CACHE.get(s); if (p == null) { p = pathIterator2Path(s.getPathIterator(null)); SHAPE_CACHE.put(s, p); } fillPath(p); } }
Arc2D arc = (Arc2D) shape; return new Arc2D.Double(arc.getX(), arc.getY(), arc.getWidth(), arc.getHeight(), arc.getAngleStart(), arc.getAngleExtent(), arc.getArcType());
Arc2D arc = (Arc2D) shape; return new Arc2D.Double(arc.getX(), arc.getY(), arc.getWidth(), arc.getHeight(), arc.getAngleStart(), arc.getAngleExtent(), arc.getArcType());
/** * Writes a serializable object description to the given object output stream. * * @param o the to be serialized object. * @param stream the outputstream that should receive the object. * @throws IOException if an I/O error occured. */ public void writeObject( final Object o, final ObjectOutputStream stream ) throws IOException { final Arc2D arc = (Arc2D) o; stream.writeDouble( arc.getX() ); stream.writeDouble( arc.getY() ); stream.writeDouble( arc.getWidth() ); stream.writeDouble( arc.getHeight() ); stream.writeDouble( arc.getAngleStart() ); stream.writeDouble( arc.getAngleExtent() ); stream.writeInt( arc.getArcType() ); }
Arc2D arc = (Arc2D) shape; return new Arc2D.Double(arc.getX(), arc.getY(), arc.getWidth(), arc.getHeight(), arc.getAngleStart(), arc.getAngleExtent(), arc.getArcType());
shapePts[1] = ((Arc2D) shape).getY(); shapePts[2] = ((Arc2D) shape).getWidth(); shapePts[3] = ((Arc2D) shape).getHeight(); shapePts[4] = ((Arc2D) shape).getAngleStart(); shapePts[5] = ((Arc2D) shape).getAngleExtent();
double x = shp.getX() - r/2; double y = shp.getY() - r/2; double height = shp.getHeight() + r; double width = shp.getWidth() + r; Shape origin = new Arc2D.Double(x, y, width, height, shp.getAngleStart(), shp.getAngleExtent(), shp.getArcType());
return new Arc2D.Double(a2.getX(), a2.getY(), a2.getWidth(), a2.getHeight(), a2.getAngleStart(), a2 .getAngleExtent(), a2.getArcType());
put(arc.getY()); put(arc.getWidth()); put(arc.getHeight()); put(arc.getAngleStart()); put(arc.getAngleExtent());