I use only Label, Sprite and Layer. Nothing else.

I tried something simple like

/ / / / / / / / / / / / / / / / / / / / / / / / / / / /
import pyglet
pyglet.options['graphics_vbo'] = False
from cocos.sprite import Sprite
from cocos.layer import Layer
from cocos.scene import Scene
from cocos.director import director
from cocos.text import Label

import Image
im = Image.new('RGB', (100, 50), (255, 0, 0))
im.save('red.png', 'PNG')

class Layer1(Layer):

    def __init__(self):
        super(Layer1 ,self).__init__()
        s = Sprite('red.png')
        s.position = 300, 300
        self.add(s)
        self.test = Label('ABCDEF',
            font_size=14,
            anchor_x='left', anchor_y='center',
            position=(300, 300),
            color=(255,255,255,255))
        self.add(self.test, z=2)

if __name__ == '__main__':
    director.init(width=800, height=600)
    scene1 = Scene(Layer1())
    director.run(scene1)
/ / / / / / / / / / / / / / / / / / / / / / / / / / / /

I do not get a lot of real #FFFFFF in the text.
The pixels of the white text over the red sprite are often almost red.
Same for white pixel over black background. They are grey.
This is especially tru because I use a small font size.

Is there a way to control the blending ?

On 16 fév, 04:32, Richard Jones <[email protected]> wrote:
> On 15 February 2012 23:41, Philippe <[email protected]> wrote:
>
> > If I put a Label, like :
> >        self.test = Label('Hello',
> >            font_size=24,
> >            anchor_x='left', anchor_y='center',
> >            color=(255,255,255,255))
> >        self.add(self.test)
>
> > Then, I take a screenshot and zoom on the text.
> > I can check the color, and instead of 255,255,255, I have 231,231,231
>
> > Is there a way to get real white ?
> > This probably apply to every object. There is always a kind a blur
> > effect over the window content.
>
> Do if you draw a plain triangle or quad you also see non-white drawn?
>
> Do you have a previous glColor call in effect?
>
>      Richard

-- 
You received this message because you are subscribed to the Google Groups 
"cocos2d discuss" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/cocos-discuss?hl=en.

Reply via email to