]> gitweb.factorcode.org Git - factor.git/commitdiff
charts.lines: drop slices that are out of y range in drawable-chunks
authorAlexander Iljin <ajsoft@yandex.ru>
Fri, 13 Jan 2017 14:51:42 +0000 (17:51 +0300)
committerJohn Benediktsson <mrjbq7@gmail.com>
Mon, 17 Apr 2017 20:54:50 +0000 (13:54 -0700)
lines/lines.factor

index 16bde0b85f2d2fa325315591907e89ced58fba81..c96dbc45ead16af109fbb9a3252c84ba871d9ced 100644 (file)
@@ -110,8 +110,10 @@ TUPLE: line < gadget color data ;
 ! Return the (empty?) sequence of chunks, possibly with some new
 ! points at ymin and ymax at the gap bounds.
 : drawable-chunks ( data ymin,ymax -- chunks )
-    first2 '[ [ second _ _ between<=> ] bi@ = ]
-    monotonic-split-slice ;
+    first2 [
+        '[ [ second _ _ between<=> ] bi@ = ]
+        monotonic-split-slice
+    ] 2keep '[ first second _ _ between? not ] reject ;
 
 PRIVATE>