package geometry
- Alphabetic
- By Inheritance
- geometry
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Type Members
- final case class Affine(r: Drawable, affine: AffineTransform) extends Drawable with Product with Serializable
Apply an affine transformation to the passed in Drawable.
- final case class AffineTransform(scaleX: Double = 1, shearX: Double = 0, shearY: Double = 0, scaleY: Double = 1, shiftX: Double = 0, shiftY: Double = 0) extends Product with Serializable
- final case class BorderRect(width: Double, height: Double) extends Drawable with Product with Serializable
A rectangle whose outline may be colored.
A rectangle whose outline may be colored.
- width
the width of the rectangle
- height
the height of the rectangle
- trait CanvasBasedRenderContext extends RenderContext
- case class CanvasRenderContext(canvas: CanvasRenderingContext2D) extends CanvasBasedRenderContext with Product with Serializable
- final case class Disc(radius: Double) extends Drawable with Product with Serializable
A filled disc.
A filled disc.
- Note
Like all
Drawable
s,Disc
s are positioned from their upper left corner. CallDisc.centered
to create aDisc
that can be positioned from its vertex.
- sealed trait Drawable extends AnyRef
All Drawable objects define a draw method that draws to a 2D canvas, and a bounding box (Extent).
All Drawable objects define a draw method that draws to a 2D canvas, and a bounding box (Extent). The bounding box must not change.
- final case class EmptyDrawable() extends Drawable with Product with Serializable
A drawable that displays nothing when drawn.
- case class EmptyEvent() extends InteractionEvent with Product with Serializable
- case class Extent(width: Double, height: Double) extends Product with Serializable
Extent defines an object's rectangular bounding box.
Extent defines an object's rectangular bounding box. As discussed in "Monoids: Theme and Variations" by Yorgey, rectangular bounding boxes don't play well with rotation. We'll eventually need something fancier like the convex hull.
- width
bounding box width
- height
bounding box height
- sealed trait Gradient2d extends AnyRef
- final case class GradientFill(r: Drawable, fill: Gradient2d) extends Drawable with Product with Serializable
Apply a gradient fill to a fillable Drawable.
- case class GradientStop(offset: Double, color: Color) extends Product with Serializable
- case class Grid(numRows: Int, numCols: Int, rs: Seq[Drawable], bottomPadding: Double = 0, rightPadding: Double = 0) extends Product with Serializable
- final case class Group(items: Seq[Drawable]) extends Drawable with Product with Serializable
Combined a sequence of Drawables into a single Drawable.
- case class IEInfo(innerLocation: Point, clientLocation: Point) extends Product with Serializable
- final case class Interaction(r: Drawable, interactionEvent: InteractionEvent*) extends Drawable with Product with Serializable
Apply a fill color to a fillable Drawable.
- sealed trait InteractionEvent extends AnyRef
- final case class Line(length: Double, strokeWidth: Double) extends Drawable with Product with Serializable
A horizontal line.
A horizontal line.
- length
the length of the line
- strokeWidth
the thickness of the line
- final case class LineDash(r: Drawable, style: LineStyle) extends Drawable with Product with Serializable
Apply a line dash to a Drawable.
Apply a line dash to a Drawable.
- r
The drawable to apply the style to.
- style
The LineStyle to apply.
- final case class LineStyle(dashPattern: Seq[Double] = Seq.empty[Double], offset: Double = 0.0) extends Product with Serializable
The stroke pattern of a line.
The stroke pattern of a line.
- dashPattern
A sequence containing distances between the solid portions of the line and the invisible portions. A single value will result in equal-sized opaque segments and gaps. An empty list uses a solid line. All values must be positive.
- offset
The "phase" of the dash pattern.
- case class LinearGradient(x0: Double, y0: Double, x1: Double, y1: Double, stops: Seq[GradientStop]) extends Gradient2d with Product with Serializable
- case class OnClick(e: (IEInfo) => Unit) extends InteractionEvent with Product with Serializable
- case class OnHover(e: (IEInfo) => Unit) extends InteractionEvent with Product with Serializable
- final case class Path(points: Seq[Point], strokeWidth: Double) extends Drawable with Product with Serializable
A path with a strokable outline.
A path with a strokable outline.
- points
The points in the path. The path will be drawn in the same order as the provided sequence.
- strokeWidth
The thickness of the line.
- implicit class Placeable extends AnyRef
- final case class Polygon(boundary: Seq[Point]) extends Drawable with Product with Serializable
A filled polygon.
A filled polygon.
- boundary
the points on the boundary of the polygon.
- case class RadialGradient(x0: Double, y0: Double, r0: Double, x1: Double, y1: Double, stops: Seq[GradientStop]) extends Gradient2d with Product with Serializable
- final case class Rect(width: Double, height: Double) extends Drawable with Product with Serializable
A filled rectangle.
A filled rectangle.
- width
the width of the rectangle
- height
the height of the rectangle
- trait RenderContext extends AnyRef
- final case class Resize(r: Drawable, extent: Extent) extends Drawable with Product with Serializable
Change the size of the bounding box of a Drawable without changing the contents.
- final case class Rotate(r: Drawable, degrees: Double) extends Drawable with Product with Serializable
Rotate the passed in Drawable.
- final case class Scale(r: Drawable, x: Double = 1, y: Double = 1) extends Drawable with Product with Serializable
Scale the passed in Drawable.
- implicit class SeqPlaceable extends AnyRef
- final case class StrokeStyle(r: Drawable, fill: Color) extends Drawable with Product with Serializable
Apply a border color to a strokable Drawable.
- final case class StrokeWeight(r: Drawable, weight: Double) extends Drawable with Product with Serializable
Adjust the thickness of the border on a strokeable Drawable.
- final case class Style(r: Drawable, fill: Color) extends Drawable with Product with Serializable
Apply a fill color to a fillable Drawable.
- final case class Text(msg: String, size: Double = Text.defaultSize, fontFace: String = Text.defaultFontFace, extentOpt: Option[Extent] = None) extends Drawable with Product with Serializable
Some text.
Some text.
- msg
the string to render.
- size
the font size of the text.
- trait TextMetricsInterface extends AnyRef
- final case class Translate(r: Drawable, x: Double = 0, y: Double = 0) extends Drawable with Product with Serializable
Translate the passed in Drawable.
- final case class Wedge(degrees: Double, radius: Double) extends Drawable with Product with Serializable
A piece of a circle.
Value Members
- def above(top: Drawable, bottom: Drawable): Drawable
- def beside(left: Drawable, right: Drawable): Drawable
- def distributeH(drawables: Seq[Drawable], spacing: Double = 0): Drawable
- def distributeV(drawables: Seq[Drawable], spacing: Double = 0): Drawable
- def fit(item: Drawable, extent: Extent): Drawable
- def fit(item: Drawable, width: Double, height: Double): Drawable
- def flowH(drawables: Seq[Drawable], hasWidth: Extent): Drawable
- def pad(item: Drawable, left: Double = 0, right: Double = 0, top: Double = 0, bottom: Double = 0): Drawable
- def padAll(item: Drawable, size: Double): Drawable
- object Affine extends Serializable
- object AffineTransform extends Serializable
- object Align
- object BorderRect extends Serializable
- object CanvasOp
- object Clipping
- object Disc extends Serializable
- object Drawable
- object EmptyDrawable extends Serializable
- object Extent extends Serializable
- object Gradient2d
- object GradientFill extends Serializable
- object GradientStop extends Serializable
- object Group extends Serializable
- object Interaction extends Serializable
- object InteractionEvent
- object Line extends Serializable
- object LineDash extends Serializable
- object LineStyle extends Serializable
- object LinearGradient extends Serializable
- object MultilineText
- object Path extends Serializable
- object Polygon extends Serializable
- object RadialGradient extends Serializable
- object Rect extends Serializable
- object Resize extends Serializable
- object Rotate extends Serializable
- object Scale extends Serializable
- object StrokeStyle extends Serializable
- object StrokeWeight extends Serializable
- object Style extends Serializable
- object Text extends Serializable
- object TextMetrics extends TextMetricsInterface
- object Translate extends Serializable
- object Wedge extends Serializable