Help  CoordSystem
CoordSystem is a graphical object that can be used to define a coordinate system in a graphic medium. Coordinates can be transform between the defined and the standard coordinate system of the graphic (with one pixel as a unit and (00) in to top left corner, with coordinates increasing from left to right and from top to bottom).
Contents
 1 Drawing
 2 Hierarchy
 3 Properties
 4 Methods
 5 Objects inherited from PointSet
 6 See also
Drawing
This object cannot be drawn with the mouse directly, instead you have to draw the subobjects origin
and the referenceLine
(see below).
Hierarchy
CoordSystem
Properties
Point origin
The origin of the coordinate system.
Line referenceLine
This line should be used to drawn along an objects in the graphic of which the length is known. Together with equivalenceInUnits
this defines the coordinate transformation.
Decimal equivalenceInUnits
Defines how long the reference line is in units.
Decimal xIncrease
Defines if the x values of this coordinate system are increasing. Set 1 here to get xvalues that increase from left to right and 1 to get xvalues that increase from right to left.
Decimal yIncrease
Defines if the y values of this coordinate system are increasing. Set 1 here to get yvalues that increase from bottom to top and 1 to get yvalues that increase from top to bottom.
Methods
Decimal unitsToPixels(Decimal units)
Converts a length value in units of this coordinate system to pixels.
Parameters
 Decimal units  the value in units to be converted.
Returns
The value in pixels.
Decimal pixelsToUnits(Decimal pixels)
Converts a length value in pixels to units of this coordinate system.
Parameters
 Decimal pixels  the value in pixels to be converted.
Returns
The value in units of the coordinate system.
Decimal xInUnits(Decimal pixels)
Converts a xcoordinate in pixels to a xcoordinate in units of this coordinate system. This method is different from pixelsToUnits
because it also regards the origin of the coordinate system and the increasing direction of the xaxes.
Parameters
 Decimal pixels  the value in pixels to be converted.
Returns
The value in units of the coordinate system.
Decimal yInUnits(Decimal pixels)
Converts a ycoordinate in pixels to a ycoordinate in units of this coordinate system. This method is different from pixelsToUnits
because it also regards the origin of the coordinate system and the increasing direction of the yaxes.
Parameters
 Decimal pixels  the value in pixels to be converted.
Returns
The value in units of the coordinate system.
Decimal pixelCountToArea(Decimal pixelCount)
Calculates the area in units which the specified number of pixels fill out. This method can e.g. be used to calculate the area covered by a PointSet.
A call of pixelCountToArea(pixelCount)
is equivalent to pixelsCount * pow(pixelsToUnits(1); 2)
.
Parameters
 Decimal pixelCount  the number of pixels which make up the area
Returns
The area in units of the coordinate system.
Examples
Expression  Result 

pow<code>A.I[0].aCoordSystem.pixelCountToArea(1) 
The area one pixel takes up in units of aCoordSystem (contained in the analysis A ).

A.I[0].aCoordSystem.pixelCountToArea(A.I[0].aPointSet.count()) 
The area in the units of CoordSystem aCoordSystem (contained in the analysis A ) wich is covered by the PointSet aPointSet (contained in the analysis A ).

Decimal areaToPixelCount(Decimal area)
Calculates the number of pixels which make up the specified areasize in units. This method is the inverse function of pixelCountToArea
(see above). Note that this method could also return noninteger values depending on the specified area value.
A call of areaToPixelCount(pixelCount)
is equivalent to pixelsCount / pow(pixelsToUnits(1); 2)
.
Parameters
 Decimal area  the area in units of this CoordSystem
Returns
The number of pixels which would make up the specified area.
Objects inherited from PointSet
none