abstract class World extends AnyRef
Provides graphics in world coordinates.
It will have a coordinate system specified by its lower-left and upper-right corner. All operations ensure clipping to that area, so that it is safe to use coordinates outside of it.
Implementations of this abstract class must provide a screen
object.
- Exceptions thrown
IllegalArgumentException
if left bound of the world coordinate system greater than or equal to right bound or lower bound of the world coordinate system greater than or equal to upper bound
- Alphabetic
- By Inheritance
- World
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Instance Constructors
-
new
World(p1: Point, p2: Point)
- p1
lower left corner of the world coordinate system
- p2
upper right corner of the world coordinate system
- Exceptions thrown
IllegalArgumentException
if left bound of the world coordinate system greater than or equal to right bound or lower bound of the world coordinate system greater than or equal to upper bound
Concrete Value Members
-
final
def
!=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
##(): Int
- Definition Classes
- AnyRef → Any
-
final
def
==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- def activeColor: Color
- def activeColor_=(col: Color): Unit
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
-
def
clear(col: Color): Unit
Sets the the whole world to a specified color.
Sets the the whole world to a specified color.
- col
specified color
-
def
clone(): AnyRef
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
def
draw(d: Drawable): Unit
Draws the specified shape within this world using the active color.
-
def
drawTo(p: Point): Unit
Draws a line in the active color from the active starting point to the given endpoint and sets the latter as new starting point for the next
drawTo
operation.Draws a line in the active color from the active starting point to the given endpoint and sets the latter as new starting point for the next
drawTo
operation.No methods other than
moveTo
anddrawTo
have an effect on the starting point. -
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
equals(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
def
fill(f: Fillable): Unit
Fills the specified shape within this world using the active color.
-
def
finalize(): Unit
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( classOf[java.lang.Throwable] )
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
-
def
hashCode(): Int
- Definition Classes
- AnyRef → Any
- def height: Int
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
-
var
lineWidthHint: LineWidth
Specifies preferred thickness of curves in pixels.
Specifies preferred thickness of curves in pixels. (Meant as a suggestion, not as a strict directive to be obeyed.)
-
def
moveTo(p: Point): Unit
Sets starting point for next
drawtTo
.Sets starting point for next
drawtTo
.No methods other than
moveTo
anddrawTo
have an effect on this starting point. -
final
def
ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
final
def
notify(): Unit
- Definition Classes
- AnyRef
-
final
def
notifyAll(): Unit
- Definition Classes
- AnyRef
- val p1: Point
- val p2: Point
-
def
plot(p: Point, col: Color = activeColor): Unit
Plots a point in a given color.
Plots a point in a given color.
- col
optional, defaults to active color
-
def
scaleX: Double
- Attributes
- protected[de.h2b.scala.lib.simgraf]
-
def
scaleY: Double
- Attributes
- protected[de.h2b.scala.lib.simgraf]
- def screenX(x: Double): Int
- def screenY(y: Double): Int
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
-
implicit
def
toPixel(p: Point): Pixel
- Attributes
- protected[de.h2b.scala.lib.simgraf]
-
implicit
def
toPoint(p: Pixel): Point
- Attributes
- protected[de.h2b.scala.lib.simgraf]
-
def
toString(): String
- Definition Classes
- AnyRef → Any
-
final
def
wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
- def width: Int
- def worldX(x: Int): Double
- def worldY(y: Int): Double