]> gitweb.factorcode.org Git - factor.git/commitdiff
charts: add chart-dim
authorAlexander Iljin <ajsoft@yandex.ru>
Fri, 20 Jan 2017 00:44:44 +0000 (03:44 +0300)
committerJohn Benediktsson <mrjbq7@gmail.com>
Mon, 17 Apr 2017 20:54:51 +0000 (13:54 -0700)
charts.factor

index 2771024ab1507831362296731aa4166e210241ef..132a106de3a51b75e44e1def46764b27b830526b 100644 (file)
@@ -11,6 +11,10 @@ M: chart pref-dim* drop { 300 300 } ;
 : chart-axes ( chart -- seq )
     drop { { 0 300 } { 0 300 } } ;
 
+! Return the width and height of the visible area, in pixels.
+: chart-dim ( chart -- seq )
+    drop { 300 300 } ;
+
 ! There are several things to do to present data on the screen.
 ! Map the data coordinates to the screen coordinates.
 ! Cut off data outside the presentation window. When cutting off vertically, split the line into segments and add new points if necessary. Return an array of line segments.