]> gitweb.factorcode.org Git - factor.git/commitdiff
Fix conflict
authorSlava Pestov <slava@slava-pestovs-macbook-pro.local>
Thu, 12 Feb 2009 15:22:35 +0000 (09:22 -0600)
committerSlava Pestov <slava@slava-pestovs-macbook-pro.local>
Thu, 12 Feb 2009 15:22:35 +0000 (09:22 -0600)
1  2 
extra/ui/render/test/test.factor

index 412ce5a0a5c1782fc330b99e9f6817b8cb25c870,bd3c0826529cafaf6612aa8e172f7f236bb1d743..1aa892557f92cad6227c8c7a7f1465a01cc3fb0e
@@@ -1,10 -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 images.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 colors.constants images ;
 -ui.render ui opengl opengl.gl images images.loader ;
++namespaces grouping fry cap images.bitmap ui.gadgets ui.gadgets.packs
++ui.gadgets.borders ui.gadgets.grids ui.gadgets.grid-lines
++ui.gadgets.labels ui.gadgets.buttons ui.pens ui.pens.solid ui.render
++ui opengl opengl.gl colors.constants images images.loader ;
  IN: ui.render.test
  
  SINGLETON: line-test
@@@ -30,17 -30,15 +30,17 @@@ SYMBOL: render-outpu
  
  : bitmap= ( bitmap1 bitmap2 -- ? )
      [
 -        [ [ buffer>> ] [ 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 -- )
      screenshot
      [ render-output set-global ]
      [
-         "resource:extra/ui/render/test/reference.bmp" <image>
+         "resource:extra/ui/render/test/reference.bmp" load-image
          bitmap= "is perfect" "needs work" ?
          "Your UI rendering " prepend
          message-window
@@@ -59,27 -57,27 +59,27 @@@ M: take-screenshot draw-boundar
      <shelf>
          take-screenshot new >>boundary
          <gadget>
 -            black <solid> >>interior
 +            COLOR: black <solid> >>interior
              { 98 98 } >>dim
 -        1 <border> add-gadget
 +        { 1 1 } <border> add-gadget
          <gadget>
 -            gray <solid> >>boundary
 +            COLOR: gray <solid> >>boundary
              { 94 94 } >>dim
 -        3 <border>
 -            red <solid> >>boundary
 +        { 3 3 } <border>
 +            COLOR: red <solid> >>boundary
          add-gadget
              <line-gadget> <line-gadget> <line-gadget> 3array
              <line-gadget> <line-gadget> <line-gadget> 3array
              <line-gadget> <line-gadget> <line-gadget> 3array
          3array <grid>
              { 5 5 } >>gap
 -            blue <grid-lines> >>boundary
 +            COLOR: blue <grid-lines> >>boundary
          add-gadget
          <gadget>
              { 14 14 } >>dim
 -            black <checkmark-paint> >>interior
 -            black <solid> >>boundary
 -        4 <border>
 +            COLOR: black <checkmark-paint> >>interior
 +            COLOR: black <solid> >>boundary
 +        { 4 4 } <border>
          add-gadget ;
      
  : ui-render-test ( -- )