Arc

smile.pictures.Arc
object Arc

Arcs of ellipses, and whole ellipses.

import smile.colors.PresetColor.*
import smile.modeling.*

val arch = Arc(Pos.Origin, 120, 120, 0, 180, None, lineWith(Crimson, 8, round = true))
val bowl = Arc(Pos.Origin, 120, 80, 180, 180, fillWith(Gold), lineWith(Black, 2, round = true))

A red arch, the upper half of a circle drawn as a thick line A golden
bowl, the lower half of an ellipse filled up to its chord

Attributes

Source
Shapes.scala
Graph
Supertypes
class Object
trait Matchable
class Any
Self type
Arc.type

Members list

Value members

Concrete methods

def apply(pos: Pos = ..., width: Double, height: Double, startAngle: Double = ..., arcAngle: Double = ..., fill: Option[FillStyle], line: Option[StrokeStyle]): Shape

The part of the ellipse width wide and height high centered at pos that sweeps from startAngle by arcAngle degrees, counterclockwise on screen from three o'clock for a positive extent. An extent of 360 or more is the whole ellipse. A partial sweep is filled as the segment its chord cuts off.

The part of the ellipse width wide and height high centered at pos that sweeps from startAngle by arcAngle degrees, counterclockwise on screen from three o'clock for a positive extent. An extent of 360 or more is the whole ellipse. A partial sweep is filled as the segment its chord cuts off.

The arc's anchor is the middle of the arc's own box. For a partial arc that differs from pos, the middle of the whole ellipse's box. To turn an arc about the ellipse's center, use rotateAround(angle, pos).

Attributes

Throws
IllegalArgumentException

if a size is negative or not a number, or an angle is not finite

Source
Shapes.scala