|
1.2 Coordinate SystemsJCCKit handles three different coordinate systems:
1.2.1 DCS --> DICSThe first mapping is performed by an implementation of Transformation. The result is a two-dimensional point in DICS (represented by an instance of GraphPoint).Currently CartesianTransformation is the only implementation: It transforms from a Cartesian DCS into DICS with optional logarithmic transformation of x and y coordinates. 1.2.2 DICS --> DDCSMapping GraphPoints into device-dependent coordinates is done by a concrete Renderer.In DICS the x axis goes from left to right and the y axis from bottom to top. In all currently implemented Renderers (i.e. GraphicsRenderer, Graphics2DRenderer, and SVGRenderer) the transformation keeps the aspect ratio and the y axis of DDCS goes from top to bottom.
For example, in the SVGRenderer the mapping is just: (x,y) --> (x,-y) The device-independent Cartesian coordinate system is infinitely extended. But the device is always bounded by a (rectangular) border. Therefore, one has to specify which rectangle in DICS must be mapped inside the device border. This is done by specifing the lower-left and upper-right corner of a virtual paper in DICS. This rectangle is mapped to DDCS in such a way that it just fits into the device border. Because the aspect ratio of the device border is in general different from the aspect ratio of the virtual paper some positional information has to be specified. This is done by defining vertical and horizontal anchors. For more details see the constructor of PlotCanvas.
|
(C) 2003-2004 Franz-Josef Elmer. All rights reserved. Last modified: 4/25/2003 |