Commit 8ba6db28 authored by h2b's avatar h2b

Documentation slightly improved.

parent 98583d13
......@@ -10,7 +10,7 @@ A `World` provides graphics in world coordinates. For instance,
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 at 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).
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.
......@@ -32,6 +32,7 @@ To fill a circle of color `Magenta` and radius 75.0 around the origin of our wor
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 Shapes
......@@ -45,7 +46,7 @@ Of course, you can define your own shapes. Just implement the `Shape.Drawable` o
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. 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`.
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`.
(For details see the [API](#api).)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment