net.sf.latexdraw.glib.views.Java2D.impl
Class LEllipseView<S extends IEllipse>
java.lang.Object
net.sf.latexdraw.glib.views.AbstractView<S>
net.sf.latexdraw.glib.views.Java2D.impl.LShapeView<S>
net.sf.latexdraw.glib.views.Java2D.impl.LRectangularView<S>
net.sf.latexdraw.glib.views.Java2D.impl.LEllipseView<S>
- All Implemented Interfaces:
- IAbstractView, IViewShape, Pickable
- Direct Known Subclasses:
- LArcView, LCircleView
class LEllipseView<S extends IEllipse>
- extends LRectangularView<S>
Defines a view of the IEllipse model.
This file is part of LaTeXDraw.
Copyright (c) 2005-2012 Arnaud BLOUIN
LaTeXDraw is free software; you can redistribute it and/or modify it under
the terms of the GNU General Public License as published by the Free Software
Foundation; either version 2 of the License, or (at your option) any later version.
LaTeXDraw is distributed without any warranty; without even the implied
warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
General Public License for more details.
03/11/2008
- Since:
- 3.0
- Author:
- Arnaud BLOUIN
Field Summary |
protected static double[][] |
POINTS
Used to compute the drawing of an ellipse. |
static double |
U
Used to compute the drawing of an ellipse. |
Constructor Summary |
protected |
LEllipseView(S model)
Creates an initialises the Java view of a LEllipse. |
Method Summary |
protected static void |
curveQuarter(double tlx,
double tly,
double width,
double height,
java.awt.geom.Path2D path,
double[] points)
Adds a "curveTo" segment to the given path. |
static void |
setEllipsePath(java.awt.geom.Path2D path,
double tlx,
double tly,
double width,
double height)
Creates an ellipse in the given path. |
protected void |
setRectangularShape(java.awt.geom.Path2D path,
double tlx,
double tly,
double width,
double height)
Creates a rectangular shape in the given path using the given information. |
Methods inherited from class net.sf.latexdraw.glib.views.Java2D.impl.LShapeView |
beginRotation, contains, contains, endRotation, flush, getBorder, getPath, getPicker, getRotatedShape2D, getRotatedShape2D, getStroke, getStrokeThickness, intersects, paint, paintArrows, paintBorders, paintFilling, paintShadow, paintShowPointsDots, paintShowPointsLines, update, updatePath, updatePathArrows |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
U
public static final double U
- Used to compute the drawing of an ellipse.
POINTS
protected static final double[][] POINTS
- Used to compute the drawing of an ellipse.
LEllipseView
protected LEllipseView(S model)
- Creates an initialises the Java view of a LEllipse.
- Parameters:
model
- The model to view.- Since:
- 3.0
curveQuarter
protected static void curveQuarter(double tlx,
double tly,
double width,
double height,
java.awt.geom.Path2D path,
double[] points)
- Adds a "curveTo" segment to the given path. This segment is one of the four quarter of an ellipse.
- Parameters:
tlx
- The top-left X-coordinate of the ellipse.tly
- The top-left Y-coordinate of the ellipse.width
- The width of the ellipse.height
- The height of the ellipse.path
- The path to complete.points
- @see POINTS attribute. Contains values used to draw the ellipse quarter.
- Throws:
java.lang.NullPointerException
- If one of the given parameters is null.- Since:
- 3.0
setRectangularShape
protected void setRectangularShape(java.awt.geom.Path2D path,
double tlx,
double tly,
double width,
double height)
- Description copied from class:
LRectangularView
- Creates a rectangular shape in the given path using the given information. The path is not cleared.
- Specified by:
setRectangularShape
in class LRectangularView<S extends IEllipse>
- Parameters:
path
- The path to fill.tlx
- The X-coordinate of the top-left of the rectangular shape to draw.tly
- The Y-coordinate of the top-left of the rectangular shape to draw.width
- The width of the rectangular shape.height
- The height of the rectangular shape.
setEllipsePath
public static void setEllipsePath(java.awt.geom.Path2D path,
double tlx,
double tly,
double width,
double height)
- Creates an ellipse in the given path.
- Parameters:
path
- The path to fill.tlx
- The top left X-coordinate of the ellipse.tly
- The top left Y-coordinate of the ellipse.width
- The width of the ellipse.height
- The height of the ellipse.- Since:
- 3.0