scalation.scala2d
Members list
Type members
Classlikes
Arc is a convenience case class for Arc2D (a subclass of RectangularShape).
Arc is a convenience case class for Arc2D (a subclass of RectangularShape).
Attributes
- Supertypes
-
trait Producttrait Equalsclass Doubletrait Serializableclass Arc2Dclass RectangularShapetrait Cloneabletrait Shapeclass Objecttrait Matchableclass AnyShow all
The Arrow class uses Java's Path2D class to create a line with an arrowhead on the far end. The main line is defined by points 'p1' and 'p2'. Points 'p3' and 'p4' are the corners of the triangular arrowhead.
The Arrow class uses Java's Path2D class to create a line with an arrowhead on the far end. The main line is defined by points 'p1' and 'p2'. Points 'p3' and 'p4' are the corners of the triangular arrowhead.
Value parameters
- len
-
the length of the arrowhead on the line/arrow
- p1
-
the starting point for the line/arrow
- p2
-
the ending point for the line/arrow
Attributes
- Supertypes
-
trait Producttrait Equalstrait CurvilinearShapeclass Doubletrait Serializableclass Path2Dtrait Cloneabletrait Shapeclass Objecttrait Matchableclass AnyShow all
The BorderLayout object is a convenience object for java.awt.BorderLayout.
The BorderLayout object is a convenience object for java.awt.BorderLayout.
Attributes
- Supertypes
-
class BorderLayouttrait Serializabletrait LayoutManager2trait LayoutManagerclass Objecttrait Matchableclass AnyShow all
- Self type
-
BorderLayout.type
The Colors convenience object defines numerous common colors. Source of colors:
The Colors convenience object defines numerous common colors. Source of colors:
Attributes
- See also
- Supertypes
-
class Objecttrait Matchableclass Any
- Self type
-
Colors.type
The CurvilinearShape trait provides a general type for lines and curves. It is analogous to RectangularShape.
Ellipse is a convenience case class for Ellipse2D (a subclass of RectangularShape).
Ellipse is a convenience case class for Ellipse2D (a subclass of RectangularShape).
Attributes
- Supertypes
-
trait Producttrait Equalsclass Doubletrait Serializableclass Ellipse2Dclass RectangularShapetrait Cloneabletrait Shapeclass Objecttrait Matchableclass AnyShow all
The Frame class is a convenience class for JFrame.
The Frame class is a convenience class for JFrame.
Attributes
- Supertypes
-
class JFrametrait RootPaneContainertrait WindowConstantsclass Frameclass Windowtrait Accessibleclass Containerclass Componenttrait Serializabletrait MenuContainertrait ImageObserverclass Objecttrait Matchableclass AnyShow all
- Known subtypes
-
class StatTableclass VizFrameclass DgAnimatorclass SimpleAnimator2class Histogramclass Plotclass PlotCclass PlotMShow all
The Hexagon class provides 6-sided polygons.
The Hexagon class provides 6-sided polygons.
Attributes
- Supertypes
-
trait Producttrait Equalsclass Polygonclass Polygontrait Serializabletrait Shapeclass Objecttrait Matchableclass AnyShow all
Line is a convenience case class for Line2D (a subclass of RectangularShape).
Line is a convenience case class for Line2D (a subclass of RectangularShape).
Attributes
- Supertypes
-
trait Producttrait Equalsclass Doubletrait Serializableclass Line2Dtrait Cloneabletrait Shapeclass Objecttrait Matchableclass AnyShow all
The Octagon class provides 8-sided polygons.
The Octagon class provides 8-sided polygons.
Attributes
- Supertypes
-
trait Producttrait Equalsclass Polygonclass Polygontrait Serializabletrait Shapeclass Objecttrait Matchableclass AnyShow all
Path is a convenience case class for Path2D. Its subtypes (case class Polygon, etc.) are defined in other files in the scala2d package.
Path is a convenience case class for Path2D. Its subtypes (case class Polygon, etc.) are defined in other files in the scala2d package.
Attributes
- Supertypes
-
trait Producttrait Equalsclass Doubletrait Serializableclass Path2Dtrait Cloneabletrait Shapeclass Objecttrait Matchableclass AnyShow all
The Pentagon class provides 5-sided polygons.
The Pentagon class provides 5-sided polygons.
Attributes
- Supertypes
-
trait Producttrait Equalsclass Polygonclass Polygontrait Serializabletrait Shapeclass Objecttrait Matchableclass AnyShow all
The Polygon class adds an abstract setFrame method to java.awt.Polygon for compatibility with RectangularShape.
The Polygon class adds an abstract setFrame method to java.awt.Polygon for compatibility with RectangularShape.
Attributes
- Supertypes
-
class Polygontrait Serializabletrait Shapeclass Objecttrait Matchableclass AnyShow all
- Known subtypes
The QArrow class uses Java's Path2D class to create a quad curve with an arrowhead on the far end. The main curve is defined by points 'p1' and 'p2' along with a control point 'pc'. Points 'p3' and 'p4' are the corners of the triangular arrowhead.
The QArrow class uses Java's Path2D class to create a quad curve with an arrowhead on the far end. The main curve is defined by points 'p1' and 'p2' along with a control point 'pc'. Points 'p3' and 'p4' are the corners of the triangular arrowhead.
Value parameters
- len
-
the length of the arrowhead on the curve/arc
- p1
-
the starting point for the curve/arc
- p2
-
the ending point for the curve/arc
- pc
-
the control point for the curve/arc
Attributes
- Supertypes
-
trait Producttrait Equalstrait CurvilinearShapeclass Doubletrait Serializableclass Path2Dtrait Cloneabletrait Shapeclass Objecttrait Matchableclass AnyShow all
The QCurve class enhances the QuadCurve.Double class (from the java.awt.geom package) by allowing entities to move along such quadratic curves as well as lines. Although the curve could be developed as a quadratic function where y = ax^2 + bx + c. The following quadratic bezier formulation is used: p(t) = (x(t), y(t)) = [(1-t)^2 * p1] + [2 * (1-t) * t * pc] + [t^2 * p2].
The QCurve class enhances the QuadCurve.Double class (from the java.awt.geom package) by allowing entities to move along such quadratic curves as well as lines. Although the curve could be developed as a quadratic function where y = ax^2 + bx + c. The following quadratic bezier formulation is used: p(t) = (x(t), y(t)) = [(1-t)^2 * p1] + [2 * (1-t) * t * pc] + [t^2 * p2].
Value parameters
- p1
-
the starting point for the quad curve
- p2
-
the ending point for the quad curve
- pc
-
the control point for the quad curve
- straight
-
whether the quad curve is straight (i.e., a line)
Attributes
- Companion
- object
- Supertypes
-
trait Producttrait Equalstrait CurvilinearShapeclass Doubletrait Serializableclass QuadCurve2Dtrait Cloneabletrait Shapeclass Objecttrait Matchableclass AnyShow all
The Quad class provides 4-sided polygons.
The Quad class provides 4-sided polygons.
Attributes
- Supertypes
-
trait Producttrait Equalsclass Polygonclass Polygontrait Serializabletrait Shapeclass Objecttrait Matchableclass AnyShow all
Rectangle is a convenience case class for Rectangle2D(a subclass of RectangularShape).
Rectangle is a convenience case class for Rectangle2D(a subclass of RectangularShape).
Attributes
- Supertypes
-
trait Producttrait Equalsclass Doubletrait Serializableclass Rectangle2Dclass RectangularShapetrait Cloneabletrait Shapeclass Objecttrait Matchableclass AnyShow all
RoundRectangle is a convenience case class for RoundRectangle2D (a subclass of RectangularShape).
RoundRectangle is a convenience case class for RoundRectangle2D (a subclass of RectangularShape).
Attributes
- Supertypes
-
trait Producttrait Equalsclass Doubletrait Serializableclass RoundRectangle2Dclass RectangularShapetrait Cloneabletrait Shapeclass Objecttrait Matchableclass AnyShow all
The Transform trait provides a simple technique for transforming (translation, scaling and rotation) rectangular shapes.
The Transform trait provides a simple technique for transforming (translation, scaling and rotation) rectangular shapes.
Attributes
- Supertypes
-
class Objecttrait Matchableclass Any
- Known subtypes
-
class Animator
The Triangle class provides 3-sided polygons.
The Triangle class provides 3-sided polygons.
Attributes
- Supertypes
-
trait Producttrait Equalsclass Polygonclass Polygontrait Serializabletrait Shapeclass Objecttrait Matchableclass AnyShow all
Useful trig constants.
Useful trig constants.
Attributes
- Supertypes
-
class Objecttrait Matchableclass Any
- Self type
-
TrigConstants.type
The VizFrame class puts the canvas in the visualization/drawing frame.
The VizFrame class puts the canvas in the visualization/drawing frame.
Value parameters
- canvas
-
the drawing canvas
- h
-
the height of the frame
- o
-
the offset of the frame
- title
-
the title for the frame
- w
-
the width of the frame
Attributes
- Supertypes
-
class Frameclass JFrametrait RootPaneContainertrait WindowConstantsclass Frameclass Windowtrait Accessibleclass Containerclass Componenttrait Serializabletrait MenuContainertrait ImageObserverclass Objecttrait Matchableclass AnyShow all
- Known subtypes
The ZoomablePanel class extends Panel with the ability to zoom in and out. The mouse wheel controls the amount of zooming, while mouse dragging repositions the objects in the panel (drawing canvas). Must add the following statement into your paintComponent method. g2d.setTransform (at) // used for zooming @author Casey Bowman
The ZoomablePanel class extends Panel with the ability to zoom in and out. The mouse wheel controls the amount of zooming, while mouse dragging repositions the objects in the panel (drawing canvas). Must add the following statement into your paintComponent method. g2d.setTransform (at) // used for zooming @author Casey Bowman
Attributes
- See also
-
`docs.oracle.com/en/java/javase/20/docs/api/java.desktop/java/awt/geom/AffineTransform.html
animationpackage for examples - Supertypes
-
trait MouseMotionListenertrait MouseListenertrait MouseWheelListenertrait EventListenerclass JPaneltrait Accessibleclass JComponentclass Containerclass Componenttrait Serializabletrait MenuContainertrait ImageObserverclass Objecttrait Matchableclass AnyShow all
- Known subtypes
Attributes
- Supertypes
-
class Objecttrait Matchableclass Any
Attributes
- Supertypes
-
class Objecttrait Matchableclass Any
Attributes
- Supertypes
-
class Objecttrait Matchableclass Any
Attributes
- Supertypes
-
class Objecttrait Matchableclass Any
Attributes
- Supertypes
-
class Objecttrait Matchableclass Any
Attributes
- Supertypes
-
class Objecttrait Matchableclass Any
Attributes
- Supertypes
-
class Objecttrait Matchableclass Any
Attributes
- Supertypes
-
class Objecttrait Matchableclass Any
Attributes
- Supertypes
-
class Objecttrait Matchableclass Any
Types
The Shapes file provides type aliases for basic Java awt types.
The Shapes file provides type aliases for basic Java awt types.
Attributes
The scala2d package contains classes, traits and objects for simple 2D graphics in Scala, based upon java.swing, java.awt and It makes java.awt and javax.swing GUI classes available and insulates the rest of ScalaTion from changes to GUI libraries. Only scalation.scala2d should import from java.awtorjavax.swing`.
The scala2d package contains classes, traits and objects for simple 2D graphics in Scala, based upon java.swing, java.awt and It makes java.awt and javax.swing GUI classes available and insulates the rest of ScalaTion from changes to GUI libraries. Only scalation.scala2d should import from java.awtorjavax.swing`.
Attributes
- See also
-
Shapes.scala for providing classes in
java.awt.geom.
The RectPolyShape type is a union type for rectangular shapes and polygons.
The RectPolyShape type is a union type for rectangular shapes and polygons.
Attributes
Value members
Concrete methods
The arrowTest main function is used to test the Arrow class.
The arrowTest main function is used to test the Arrow class.
runMain scalation.scala2d.arrowTest
Attributes
The colorsTest main function is used to test the Colors object.
The colorsTest main function is used to test the Colors object.
runMain scalation.scala2d.colorsTest
Attributes
The lineTest main function tests drawing a line.
The lineTest main function tests drawing a line.
runMain scalation.scala2d.lineTest
Attributes
The polygonTest main function tests the Triangle, Quad, Pentagon, Hexagon and Octagon classes, testing the addPoints method.
The polygonTest main function tests the Triangle, Quad, Pentagon, Hexagon and Octagon classes, testing the addPoints method.
runMain scalation.scala2d.polygonTest
Attributes
The polygonTest2 main function tests the Triangle, Quad, Pentagon, Hexagon and Octagon classes, testing the setFrame method.
The polygonTest2 main function tests the Triangle, Quad, Pentagon, Hexagon and Octagon classes, testing the setFrame method.
runMain scalation.scala2d.polygonTest2
Attributes
The qArrowTest main function is used to test the QArrow class.
The qArrowTest main function is used to test the QArrow class.
runMain scalation.scala2d.qArrowTest
Attributes
The qCurveTest main function tests the QCurve classes' quad curves.
The qCurveTest main function tests the QCurve classes' quad curves.
runMain scalation.scala2d.qCurveTest
Attributes
The qCurveTest2 main function tests traversal of QCurve's (quad curves).
The qCurveTest2 main function tests traversal of QCurve's (quad curves).
runMain scalation.scala2d.qCurveTest2
Attributes
Return the top-left coordinates (x, y) of the polygon's bounding box.
Return the top-left coordinates (x, y) of the polygon's bounding box.
Value parameters
- bb
-
the polygon's bounding box
Attributes
Write the graphs into a buffered image file.
Write the graphs into a buffered image file.
Value parameters
- fname
-
the name of the file
- gframe
-
the gframe containing the graphics
Attributes
- See also
-
stackoverflow.com/questions/5655908/export-jpanel-graphics-to-png-or-gif-or-jpg/39490801#39490801
The writeImageTest main function is used to test the writing an image file.
The writeImageTest main function is used to test the writing an image file.
Attributes
- See also
-
scalation.mathstat.PlotM
runMain scalation.scala2d.writeImageTest