Skip to content

Commit

Permalink
patch Font to stop dark edges when blending
Browse files Browse the repository at this point in the history
  • Loading branch information
paddywwoof committed Oct 7, 2016
1 parent 1c00d0d commit 1750598
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 4 deletions.
2 changes: 1 addition & 1 deletion ReadMe.rst
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ or via mesa or ANGLE on 'big' machines. This makes it generally *faster*
and opens up the world of *shaders* that allow effects such as normal and
reflection maps, blurring and many others. It has various demos of built-in
shapes, landscapes, model loading, walk-about camera and much more! See the demos
included with this code and experiment with them ..
on github.com/pi3d/pi3d_demos and experiment with them ..

If you are reading this document as the ReadMe in the repository then you
can find the full version of the documentation here
Expand Down
2 changes: 1 addition & 1 deletion pi3d/constants/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
pi3d.constants contains constant values, mainly integers, from OpenGL ES 2.0.
"""

__version__ = '2.13'
__version__ = '2.14'

STARTUP_MESSAGE = """
Expand Down
9 changes: 7 additions & 2 deletions pi3d/util/Font.py
Original file line number Diff line number Diff line change
Expand Up @@ -150,10 +150,15 @@ def __init__(self, font, color=(255,255,255,255), codepoints=None,
xindex = 0
yindex += 1

RGBs = 'RGBA' # if self.alpha else 'RGB' # always alpha
self.im = self.im.convert(RGBs)
#RGBs = 'RGBA' # if self.alpha else 'RGB' # always alpha
#self.im = self.im.convert(RGBs)
self.image = np.array(self.im)
self._tex = ctypes.c_int()
if background_color is None:
if isinstance(color, str):
from PIL import ImageColor
color = ImageColor.getrgb(color)
self.image[:,:,:3] = color[:3]

def _load_disk(self):
"""
Expand Down

0 comments on commit 1750598

Please sign in to comment.