Fix text rendering on top of transparent background

db4
Slava Pestov 2009-03-10 16:59:15 -05:00
parent 2f26d5f3da
commit ceafe8c69e
2 changed files with 5 additions and 3 deletions

View File

@ -41,4 +41,6 @@ M: gradient draw-interior
[ last-vertices>> gl-vertex-pointer ]
[ last-colors>> gl-color-pointer ]
[ colors>> draw-gradient ]
} cleave ;
} cleave ;
M: gradient pen-background 2drop transparent ;

View File

@ -1,6 +1,6 @@
! Copyright (C) 2009 Slava Pestov.
! See http://factorcode.org/license.txt for BSD license.
USING: kernel accessors opengl ui.pens ui.pens.caching ;
USING: kernel accessors opengl math colors ui.pens ui.pens.caching ;
IN: ui.pens.solid
TUPLE: solid < caching-pen color interior-vertices boundary-vertices ;
@ -29,4 +29,4 @@ M: solid draw-boundary
(gl-rect) ;
M: solid pen-background
nip color>> ;
nip color>> dup alpha>> 1 number= [ drop transparent ] unless ;