View Single Post
  #2  
Old 05-16-2008, 07:24 PM
farshizzo farshizzo is offline
WorldViz Team Member
 
Join Date: Mar 2003
Posts: 2,849
There is no way to change the size/position of the html window. It is mainly used to display instructional text. The most common way to display an icon on the screen is to use a texture quad. Here is some sample code that shows how to do it. Let me know if anything is unclear.
Code:
import viz
viz.go()

#Add environment
viz.add('gallery.ive')

#Add texture quad and link it to upper left corner of screen
quad = viz.addTexQuad(parent=viz.ORTHO,align=viz.TEXT_LEFT_TOP,size=1)
viz.link(viz.LeftTop,quad,offset=(20,-20,0))

#Add icon texture
icon = viz.add('ball.jpg')

#Apply texture to quad and resize quad to size of texture
quad.texture(icon)
quad.setScale(icon.getSize())
Reply With Quote