Packages

  • package root
    Definition Classes
    root
  • package de
    Definition Classes
    root
  • package h2b
    Definition Classes
    de
  • package scala
    Definition Classes
    h2b
  • package lib
    Definition Classes
    scala
  • package simgraf

    This is a Scala library of graphics utilities.

    This is a Scala library of graphics utilities. It is focused on simple drawing of shapes and functions without the need of instructing the graphics system by a dozen or so settings before a simple picture is shown. It is not meant to program graphical user interfaces with buttons, menus and so on.

    The World

    A World provides graphics in world coordinates. For instance,

    val w = World(p1, p2)(p0, w, h, title)

    defines a world that has a coordinate system with a Point p1 in the lower-left corner and the upper-right corner at p2. All operations ensure clipping to that area, so that it is safe to use coordinates outside of it.

    The second parameter group defines the location on the screen: p0 denotes the upper left Pixel, w and h the width and the height of the window in pixels and title gives a window title (that will not reduce the drawing area).

    A Point defines a location in the world coordinate system using two doubles, while a Pixel denotes a location on the screen by means of two integers.

    Note that the y axis of the world coordinate system is directed from bottom to top while at the screen level it is vice versa.

    So, for example

    val w = World(Point(-100,-100), Point(100,100))(Pixel(0,0), 200, 200, "Circle")

    defines a world with x and y axis both ranging from -100 to +100 shown in a window of size 200x200 pixels at the upper left corner of the screen titled "Circle".

    Once you have a world, you can execute several methods on it: plot a point or clear the world to a specified color, use moveTo or drawTo for plotter-like operations and -- at the highest abstraction -- draw or fill shapes of type Drawable or Fillable, respectively.

    Each world maintains an activeColor which can be set and is used for most drawings and fillings until it is changed (except for those that use their own color).

    To fill a circle of color Magenta and radius 75.0 around the origin of our world w on a white background, we write:

    w.clear(Color.White)
    w.activeColor = Color.Magenta
    w.fill(Circle(Point(0,0), 75.0))

    That's it: with these three lines of code and the definition of w above you get a graphic on the screen.

    The Screen

    A Screen provides direct pixel graphics. It is the back end of World.

    It can be used on its own if no world coordinate system is needed and bare screen-pixel coordinates shall be applied instead. Though, there are no fancy general shape-oriented draw and fill operations as World has to offer, but only some primitives like setPixel, drawLine, drawSquare, fillSquare, moveTo or drawTo.

    Definition Classes
    lib
  • package layout

    A package collecting some tools for positioning elements on the screen.

    A package collecting some tools for positioning elements on the screen.

    It contains a Cell (a rectangular area) and a GridLayout of cells organized into rows and columns as this:

    ----------------------------
    | cell | cell | cell | ... |
    ----------------------------
    | cell | cell | cell | ... |
    ----------------------------
    | cell | cell | cell | ... |
    ----------------------------
    | ...  | ...  | ...  | ... |
    ----------------------------
    

    Various factory methods are provided that construct grid layouts from a sample cell, within a cell or on the whole screen.

    Definition Classes
    simgraf
    Since

    1.1.0

  • Cell
  • Floating
  • GridLayout

class GridLayout extends Cell with Iterable[Cell]

A layout of cells organized into rows and columns as this:

----------------------------
| cell | cell | cell | ... |
----------------------------
| cell | cell | cell | ... |
----------------------------
| cell | cell | cell | ... |
----------------------------
| ...  | ...  | ...  | ... |
----------------------------

The horizontal axis is oriented from left to right, while the vertical axis is oriented from top to bottom.

Since

1.1.0

Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. GridLayout
  2. Iterable
  3. IterableLike
  4. GenIterable
  5. GenIterableLike
  6. Traversable
  7. GenTraversable
  8. GenericTraversableTemplate
  9. TraversableLike
  10. GenTraversableLike
  11. Parallelizable
  12. TraversableOnce
  13. GenTraversableOnce
  14. FilterMonadic
  15. HasNewBuilder
  16. Cell
  17. Equals
  18. AnyRef
  19. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Type Members

  1. type Self = Iterable[Cell]
    Attributes
    protected[this]
    Definition Classes
    TraversableLike
  2. class WithFilter extends FilterMonadic[A, Repr]
    Definition Classes
    TraversableLike

Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int
    Definition Classes
    AnyRef → Any
  3. def ++[B >: Cell, That](that: GenTraversableOnce[B])(implicit bf: CanBuildFrom[Iterable[Cell], B, That]): That
    Definition Classes
    TraversableLike → GenTraversableLike
  4. def ++:[B >: Cell, That](that: Traversable[B])(implicit bf: CanBuildFrom[Iterable[Cell], B, That]): That
    Definition Classes
    TraversableLike
  5. def ++:[B >: Cell, That](that: TraversableOnce[B])(implicit bf: CanBuildFrom[Iterable[Cell], B, That]): That
    Definition Classes
    TraversableLike
  6. def /:[B](z: B)(op: (B, Cell) ⇒ B): B
    Definition Classes
    TraversableOnce → GenTraversableOnce
  7. def :\[B](z: B)(op: (Cell, B) ⇒ B): B
    Definition Classes
    TraversableOnce → GenTraversableOnce
  8. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  9. def addString(b: StringBuilder): StringBuilder
    Definition Classes
    TraversableOnce
  10. def addString(b: StringBuilder, sep: String): StringBuilder
    Definition Classes
    TraversableOnce
  11. def addString(b: StringBuilder, start: String, sep: String, end: String): StringBuilder
    Definition Classes
    TraversableOnce
  12. def aggregate[B](z: ⇒ B)(seqop: (B, Cell) ⇒ B, combop: (B, B) ⇒ B): B
    Definition Classes
    TraversableOnce → GenTraversableOnce
  13. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  14. def at(origin: Pixel): GridLayout

    A copy of this grid layout at a new origin.

    A copy of this grid layout at a new origin.

    Definition Classes
    GridLayoutCell
  15. def canEqual(that: Any): Boolean
    Definition Classes
    IterableLike → Equals
  16. val cell: Cell
  17. def clone(): AnyRef
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  18. def collect[B, That](pf: PartialFunction[Cell, B])(implicit bf: CanBuildFrom[Iterable[Cell], B, That]): That
    Definition Classes
    TraversableLike → GenTraversableLike
  19. def collectFirst[B](pf: PartialFunction[Cell, B]): Option[B]
    Definition Classes
    TraversableOnce
  20. val cols: Int
  21. def companion: GenericCompanion[Iterable]
    Definition Classes
    Iterable → GenIterable → Traversable → GenTraversable → GenericTraversableTemplate
  22. def copyToArray[B >: Cell](xs: Array[B], start: Int, len: Int): Unit
    Definition Classes
    IterableLike → TraversableLike → TraversableOnce → GenTraversableOnce
  23. def copyToArray[B >: Cell](xs: Array[B]): Unit
    Definition Classes
    TraversableOnce → GenTraversableOnce
  24. def copyToArray[B >: Cell](xs: Array[B], start: Int): Unit
    Definition Classes
    TraversableOnce → GenTraversableOnce
  25. def copyToBuffer[B >: Cell](dest: Buffer[B]): Unit
    Definition Classes
    TraversableOnce
  26. def count(p: (Cell) ⇒ Boolean): Int
    Definition Classes
    TraversableOnce → GenTraversableOnce
  27. def drop(n: Int): Iterable[Cell]
    Definition Classes
    IterableLike → TraversableLike → GenTraversableLike
  28. def dropRight(n: Int): Iterable[Cell]
    Definition Classes
    IterableLike
  29. def dropWhile(p: (Cell) ⇒ Boolean): Iterable[Cell]
    Definition Classes
    TraversableLike → GenTraversableLike
  30. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  31. def equals(other: Any): Boolean
    Definition Classes
    Cell → Equals → AnyRef → Any
  32. def exists(p: (Cell) ⇒ Boolean): Boolean
    Definition Classes
    IterableLike → TraversableLike → TraversableOnce → GenTraversableOnce
  33. def filter(p: (Cell) ⇒ Boolean): Iterable[Cell]
    Definition Classes
    TraversableLike → GenTraversableLike
  34. def filterNot(p: (Cell) ⇒ Boolean): Iterable[Cell]
    Definition Classes
    TraversableLike → GenTraversableLike
  35. def finalize(): Unit
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  36. def find(p: (Cell) ⇒ Boolean): Option[Cell]
    Definition Classes
    IterableLike → TraversableLike → TraversableOnce → GenTraversableOnce
  37. def fit(w: Int, h: Int, o: Orientation = Cell.DefaultOrientation): Cell

    Returns a new cell with specified dimensions and orientation within this cell.

    Returns a new cell with specified dimensions and orientation within this cell.

    w

    the width of of the cell to be fitted in

    h

    the height of of the cell to be fitted in

    o

    the orientation of of the cell to be fitted in within this cell (defaults to centring both dimensions)

    returns

    the resulting new cell

    Definition Classes
    Cell
    Note

    If the cell to be fitted in does not fit into this cell the resulting cell's origin might be negative.

  38. def flatMap[B, That](f: (Cell) ⇒ GenTraversableOnce[B])(implicit bf: CanBuildFrom[Iterable[Cell], B, That]): That
    Definition Classes
    TraversableLike → GenTraversableLike → FilterMonadic
  39. def flatten[B](implicit asTraversable: (Cell) ⇒ GenTraversableOnce[B]): Iterable[B]
    Definition Classes
    GenericTraversableTemplate
  40. val floating: Floating
  41. def fold[A1 >: Cell](z: A1)(op: (A1, A1) ⇒ A1): A1
    Definition Classes
    TraversableOnce → GenTraversableOnce
  42. def foldLeft[B](z: B)(op: (B, Cell) ⇒ B): B
    Definition Classes
    TraversableOnce → GenTraversableOnce
  43. def foldRight[B](z: B)(op: (Cell, B) ⇒ B): B
    Definition Classes
    IterableLike → TraversableOnce → GenTraversableOnce
  44. def forall(p: (Cell) ⇒ Boolean): Boolean
    Definition Classes
    IterableLike → TraversableLike → TraversableOnce → GenTraversableOnce
  45. def foreach[U](f: (Cell) ⇒ U): Unit
    Definition Classes
    IterableLike → TraversableLike → GenTraversableLike → TraversableOnce → GenTraversableOnce → FilterMonadic
  46. def genericBuilder[B]: Builder[B, Iterable[B]]
    Definition Classes
    GenericTraversableTemplate
  47. final def getClass(): Class[_]
    Definition Classes
    AnyRef → Any
  48. def groupBy[K](f: (Cell) ⇒ K): Map[K, Iterable[Cell]]
    Definition Classes
    TraversableLike → GenTraversableLike
  49. def grouped(size: Int): Iterator[Iterable[Cell]]
    Definition Classes
    IterableLike
  50. def hasDefiniteSize: Boolean
    Definition Classes
    TraversableLike → TraversableOnce → GenTraversableOnce
  51. def hashCode(): Int
    Definition Classes
    Cell → AnyRef → Any
  52. def head: Cell
    Definition Classes
    IterableLike → TraversableLike → GenTraversableLike
  53. def headOption: Option[Cell]
    Definition Classes
    TraversableLike → GenTraversableLike
  54. val height: Int
    Definition Classes
    Cell
  55. def init: Iterable[Cell]
    Definition Classes
    TraversableLike → GenTraversableLike
  56. def inits: Iterator[Iterable[Cell]]
    Definition Classes
    TraversableLike
  57. def isEmpty: Boolean
    Definition Classes
    IterableLike → TraversableLike → TraversableOnce → GenTraversableOnce
  58. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  59. final def isTraversableAgain: Boolean
    Definition Classes
    TraversableLike → GenTraversableLike → GenTraversableOnce
  60. def iterator: Iterator[Cell]
    Definition Classes
    GridLayout → IterableLike → GenIterableLike
  61. def last: Cell
    Definition Classes
    TraversableLike → GenTraversableLike
  62. def lastOption: Option[Cell]
    Definition Classes
    TraversableLike → GenTraversableLike
  63. def map[B, That](f: (Cell) ⇒ B)(implicit bf: CanBuildFrom[Iterable[Cell], B, That]): That
    Definition Classes
    TraversableLike → GenTraversableLike → FilterMonadic
  64. def max[B >: Cell](implicit cmp: Ordering[B]): Cell
    Definition Classes
    TraversableOnce → GenTraversableOnce
  65. def maxBy[B](f: (Cell) ⇒ B)(implicit cmp: Ordering[B]): Cell
    Definition Classes
    TraversableOnce → GenTraversableOnce
  66. def min[B >: Cell](implicit cmp: Ordering[B]): Cell
    Definition Classes
    TraversableOnce → GenTraversableOnce
  67. def minBy[B](f: (Cell) ⇒ B)(implicit cmp: Ordering[B]): Cell
    Definition Classes
    TraversableOnce → GenTraversableOnce
  68. def mkString: String
    Definition Classes
    TraversableOnce → GenTraversableOnce
  69. def mkString(sep: String): String
    Definition Classes
    TraversableOnce → GenTraversableOnce
  70. def mkString(start: String, sep: String, end: String): String
    Definition Classes
    TraversableOnce → GenTraversableOnce
  71. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  72. def newBuilder: Builder[Cell, Iterable[Cell]]
    Attributes
    protected[this]
    Definition Classes
    GenericTraversableTemplate → HasNewBuilder
  73. def nonEmpty: Boolean
    Definition Classes
    TraversableOnce → GenTraversableOnce
  74. final def notify(): Unit
    Definition Classes
    AnyRef
  75. final def notifyAll(): Unit
    Definition Classes
    AnyRef
  76. val origin: Pixel
    Definition Classes
    Cell
  77. def par: ParIterable[Cell]
    Definition Classes
    Parallelizable
  78. def parCombiner: Combiner[Cell, ParIterable[Cell]]
    Attributes
    protected[this]
    Definition Classes
    TraversableLike → Parallelizable
  79. def partition(p: (Cell) ⇒ Boolean): (Iterable[Cell], Iterable[Cell])
    Definition Classes
    TraversableLike → GenTraversableLike
  80. def product[B >: Cell](implicit num: Numeric[B]): B
    Definition Classes
    TraversableOnce → GenTraversableOnce
  81. def reduce[A1 >: Cell](op: (A1, A1) ⇒ A1): A1
    Definition Classes
    TraversableOnce → GenTraversableOnce
  82. def reduceLeft[B >: Cell](op: (B, Cell) ⇒ B): B
    Definition Classes
    TraversableOnce
  83. def reduceLeftOption[B >: Cell](op: (B, Cell) ⇒ B): Option[B]
    Definition Classes
    TraversableOnce → GenTraversableOnce
  84. def reduceOption[A1 >: Cell](op: (A1, A1) ⇒ A1): Option[A1]
    Definition Classes
    TraversableOnce → GenTraversableOnce
  85. def reduceRight[B >: Cell](op: (Cell, B) ⇒ B): B
    Definition Classes
    IterableLike → TraversableOnce → GenTraversableOnce
  86. def reduceRightOption[B >: Cell](op: (Cell, B) ⇒ B): Option[B]
    Definition Classes
    TraversableOnce → GenTraversableOnce
  87. def repr: Iterable[Cell]
    Definition Classes
    TraversableLike → GenTraversableLike
  88. def reversed: List[Cell]
    Attributes
    protected[this]
    Definition Classes
    TraversableOnce
  89. val rows: Int
  90. def sameElements[B >: Cell](that: GenIterable[B]): Boolean
    Definition Classes
    IterableLike → GenIterableLike
  91. def scan[B >: Cell, That](z: B)(op: (B, B) ⇒ B)(implicit cbf: CanBuildFrom[Iterable[Cell], B, That]): That
    Definition Classes
    TraversableLike → GenTraversableLike
  92. def scanLeft[B, That](z: B)(op: (B, Cell) ⇒ B)(implicit bf: CanBuildFrom[Iterable[Cell], B, That]): That
    Definition Classes
    TraversableLike → GenTraversableLike
  93. def scanRight[B, That](z: B)(op: (Cell, B) ⇒ B)(implicit bf: CanBuildFrom[Iterable[Cell], B, That]): That
    Definition Classes
    TraversableLike → GenTraversableLike
    Annotations
    @migration
    Migration

    (Changed in version 2.9.0) The behavior of scanRight has changed. The previous behavior can be reproduced with scanRight.reverse.

  94. def seq: Iterable[Cell]
    Definition Classes
    Iterable → GenIterable → Traversable → GenTraversable → Parallelizable → TraversableOnce → GenTraversableOnce
  95. def size: Int
    Definition Classes
    TraversableOnce → GenTraversableOnce
  96. def sizeHintIfCheap: Int
    Attributes
    protected[scala.collection]
    Definition Classes
    GenTraversableOnce
  97. def slice(from: Int, until: Int): Iterable[Cell]
    Definition Classes
    IterableLike → TraversableLike → GenTraversableLike
  98. def sliding(size: Int, step: Int): Iterator[Iterable[Cell]]
    Definition Classes
    IterableLike
  99. def sliding(size: Int): Iterator[Iterable[Cell]]
    Definition Classes
    IterableLike
  100. def span(p: (Cell) ⇒ Boolean): (Iterable[Cell], Iterable[Cell])
    Definition Classes
    TraversableLike → GenTraversableLike
  101. def splitAt(n: Int): (Iterable[Cell], Iterable[Cell])
    Definition Classes
    TraversableLike → GenTraversableLike
  102. def stringPrefix: String
    Definition Classes
    TraversableLike → GenTraversableLike
  103. def sum[B >: Cell](implicit num: Numeric[B]): B
    Definition Classes
    TraversableOnce → GenTraversableOnce
  104. final def synchronized[T0](arg0: ⇒ T0): T0
    Definition Classes
    AnyRef
  105. def tail: Iterable[Cell]
    Definition Classes
    TraversableLike → GenTraversableLike
  106. def tails: Iterator[Iterable[Cell]]
    Definition Classes
    TraversableLike
  107. def take(n: Int): Iterable[Cell]
    Definition Classes
    IterableLike → TraversableLike → GenTraversableLike
  108. def takeRight(n: Int): Iterable[Cell]
    Definition Classes
    IterableLike
  109. def takeWhile(p: (Cell) ⇒ Boolean): Iterable[Cell]
    Definition Classes
    IterableLike → TraversableLike → GenTraversableLike
  110. def thisCollection: Iterable[Cell]
    Attributes
    protected[this]
    Definition Classes
    IterableLike → TraversableLike
  111. def to[Col[_]](implicit cbf: CanBuildFrom[Nothing, Cell, Col[Cell]]): Col[Cell]
    Definition Classes
    TraversableLike → TraversableOnce → GenTraversableOnce
  112. def toArray[B >: Cell](implicit arg0: ClassTag[B]): Array[B]
    Definition Classes
    TraversableOnce → GenTraversableOnce
  113. def toBuffer[B >: Cell]: Buffer[B]
    Definition Classes
    TraversableOnce → GenTraversableOnce
  114. def toCollection(repr: Iterable[Cell]): Iterable[Cell]
    Attributes
    protected[this]
    Definition Classes
    IterableLike → TraversableLike
  115. def toIndexedSeq: IndexedSeq[Cell]
    Definition Classes
    TraversableOnce → GenTraversableOnce
  116. def toIterable: Iterable[Cell]
    Definition Classes
    IterableLike → TraversableOnce → GenTraversableOnce
  117. def toIterator: Iterator[Cell]
    Definition Classes
    IterableLike → TraversableLike → GenTraversableOnce
    Annotations
    @deprecatedOverriding( ... , "2.11.0" )
  118. def toList: List[Cell]
    Definition Classes
    TraversableOnce → GenTraversableOnce
  119. def toMap[T, U](implicit ev: <:<[Cell, (T, U)]): Map[T, U]
    Definition Classes
    TraversableOnce → GenTraversableOnce
  120. def toSeq: Seq[Cell]
    Definition Classes
    TraversableOnce → GenTraversableOnce
  121. def toSet[B >: Cell]: Set[B]
    Definition Classes
    TraversableOnce → GenTraversableOnce
  122. def toStream: Stream[Cell]
    Definition Classes
    IterableLike → TraversableLike → GenTraversableOnce
  123. def toString(): String
    Definition Classes
    GridLayout → TraversableLike → Cell → AnyRef → Any
  124. def toTraversable: Traversable[Cell]
    Definition Classes
    TraversableLike → TraversableOnce → GenTraversableOnce
    Annotations
    @deprecatedOverriding( ... , "2.11.0" )
  125. def toVector: Vector[Cell]
    Definition Classes
    TraversableOnce → GenTraversableOnce
  126. def transpose[B](implicit asTraversable: (Cell) ⇒ GenTraversableOnce[B]): Iterable[Iterable[B]]
    Definition Classes
    GenericTraversableTemplate
    Annotations
    @migration
    Migration

    (Changed in version 2.9.0) transpose throws an IllegalArgumentException if collections are not uniformly sized.

  127. def unzip[A1, A2](implicit asPair: (Cell) ⇒ (A1, A2)): (Iterable[A1], Iterable[A2])
    Definition Classes
    GenericTraversableTemplate
  128. def unzip3[A1, A2, A3](implicit asTriple: (Cell) ⇒ (A1, A2, A3)): (Iterable[A1], Iterable[A2], Iterable[A3])
    Definition Classes
    GenericTraversableTemplate
  129. def view(from: Int, until: Int): IterableView[Cell, Iterable[Cell]]
    Definition Classes
    IterableLike → TraversableLike
  130. def view: IterableView[Cell, Iterable[Cell]]
    Definition Classes
    IterableLike → TraversableLike
  131. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  132. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  133. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  134. val width: Int
    Definition Classes
    Cell
  135. def withFilter(p: (Cell) ⇒ Boolean): FilterMonadic[Cell, Iterable[Cell]]
    Definition Classes
    TraversableLike → FilterMonadic
  136. def zip[A1 >: Cell, B, That](that: GenIterable[B])(implicit bf: CanBuildFrom[Iterable[Cell], (A1, B), That]): That
    Definition Classes
    IterableLike → GenIterableLike
  137. def zipAll[B, A1 >: Cell, That](that: GenIterable[B], thisElem: A1, thatElem: B)(implicit bf: CanBuildFrom[Iterable[Cell], (A1, B), That]): That
    Definition Classes
    IterableLike → GenIterableLike
  138. def zipWithIndex[A1 >: Cell, That](implicit bf: CanBuildFrom[Iterable[Cell], (A1, Int), That]): That
    Definition Classes
    IterableLike → GenIterableLike

Inherited from Iterable[Cell]

Inherited from IterableLike[Cell, Iterable[Cell]]

Inherited from GenIterable[Cell]

Inherited from GenIterableLike[Cell, Iterable[Cell]]

Inherited from Traversable[Cell]

Inherited from GenTraversable[Cell]

Inherited from TraversableLike[Cell, Iterable[Cell]]

Inherited from GenTraversableLike[Cell, Iterable[Cell]]

Inherited from Parallelizable[Cell, ParIterable[Cell]]

Inherited from TraversableOnce[Cell]

Inherited from GenTraversableOnce[Cell]

Inherited from FilterMonadic[Cell, Iterable[Cell]]

Inherited from HasNewBuilder[Cell, Iterable[de.h2b.scala.lib.simgraf.layout.Cell] @scala.annotation.unchecked.uncheckedVariance]

Inherited from Cell

Inherited from Equals

Inherited from AnyRef

Inherited from Any

Ungrouped