From b0a55d16f7959bee3ea004f669710d5bedfc56d8 Mon Sep 17 00:00:00 2001 From: Slava Pestov Date: Mon, 9 Feb 2009 22:52:20 -0600 Subject: [PATCH] Fix ui.render.test --- extra/ui/render/test/test.factor | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/extra/ui/render/test/test.factor b/extra/ui/render/test/test.factor index e43a8dbaa5..8abfc82a35 100755 --- a/extra/ui/render/test/test.factor +++ b/extra/ui/render/test/test.factor @@ -1,10 +1,10 @@ -! Copyright (C) 2008 Slava Pestov. +! Copyright (C) 2008, 2009 Slava Pestov. ! See http://factorcode.org/license.txt for BSD license. USING: accessors colors arrays kernel sequences math byte-arrays namespaces grouping fry cap graphics.bitmap ui.gadgets ui.gadgets.packs ui.gadgets.borders ui.gadgets.grids ui.gadgets.grid-lines ui.gadgets.labels ui.gadgets.buttons -ui.render ui opengl opengl.gl ; +ui.render ui opengl opengl.gl colors.constants ; IN: ui.render.test SINGLETON: line-test @@ -30,8 +30,10 @@ SYMBOL: render-output : bitmap= ( bitmap1 bitmap2 -- ? ) [ - [ [ array>> ] [ stride 4 align ] bi group ] [ stride ] bi - '[ _ head twiddle ] map + dup [ [ height>> ] [ stride ] bi * ] [ array>> length ] bi = [ + [ [ array>> ] [ stride 4 align ] bi group ] [ stride ] bi + '[ _ head twiddle ] map + ] unless ] bi@ = ; : check-rendering ( gadget -- ) @@ -57,26 +59,26 @@ M: take-screenshot draw-boundary take-screenshot new >>boundary - black >>interior + COLOR: black >>interior { 98 98 } >>dim { 1 1 } add-gadget - gray >>boundary + COLOR: gray >>boundary { 94 94 } >>dim { 3 3 } - red >>boundary + COLOR: red >>boundary add-gadget 3array 3array 3array 3array { 5 5 } >>gap - blue >>boundary + COLOR: blue >>boundary add-gadget { 14 14 } >>dim - black >>interior - black >>boundary + COLOR: black >>interior + COLOR: black >>boundary { 4 4 } add-gadget ;