[visionegg] Question about removal/hiding of already displayed text in a viewport.

  • From: "Cohen, Ethan D" <ethan.cohen@xxxxxxxxxxx>
  • To: visionegg@xxxxxxxxxxxxx
  • Date: Mon, 9 Jul 2007 19:59:10 -0400

 

Andrew:

 

We are newbies and have a question about using Visionegg for text
display on a screen also using a mouse controlled bar.....

 

 

Suppose you create a viewport and then place black text code in the
viewport something like this...... 

 

 

import VisionEgg

VisionEgg.start_default_logging(); VisionEgg.watch_exceptions()

 

from VisionEgg.Core import *

from VisionEgg.MoreStimuli import *

from VisionEgg.Text import *

from math import *

import pygame

 

# Initialize OpenGL graphics screen.

screen = get_default_screen()

 

# Set the background color to white (RGBA).

screen.parameters.bgcolor = (1.0,1.0,1.0,0.0)

 

Text( text = "Position1 ",

             position = (15,20),

             anchor='left',

             color = (0.0,0.0,0.0,1.0))

 

screen.clear()

    viewport.draw()

    swap_buffers()

    frame_timer.tick()

 

Now suppose you want to delete the text from the viewport. You cannot
make it white, because other black objects can "mouse" over its location
and the text is revealed.

 

1. Would you put the text in a separate viewport, and then turn it on
and off?

2. Is there some sort of a command switch for the opacity of the text,
like there is for text texture backgrounds?

3. Can you replace the "text" with nothing....if fear blank spaces might
make something you could see on the screen?

 

Suggestions Anyone?

 

 

 

 

Ethan Cohen, Ph.D.
FDA Center for Devices and Radiological Health

WO62 Office Rm 1134.

White Oak Federal Res Ctr.

10903 New Hampshire Ave.

Silver Spring, MD 20993

 

New: 

Offc: 301-796-2485 

Lab:301-796-2762

Fax: 301-796-9927

 

 

Other related posts: