Re: Box-resizing


Mathias Stümpert wrote:
> Just a small question. What ist the best way to resize the box to
> exactly match the size of the whole Display?
>

In python, use subs.py's "setBoxSize()":

setBoxSize(display, percent=100)

The code is:

def setBoxSize(display, percent=.70, clip=1):
  pc=display.getProjectionControl()
  pcMatrix=pc.getMatrix()
  if len(pcMatrix) > 10:
    pcMatrix[0]=percent
    pcMatrix[5]=percent
    pcMatrix[10]=percent
  else:
    pcMatrix[0]=percent/.64
    pcMatrix[3]=-percent/.64
  pc.setMatrix(pcMatrix)

which could be translated into Java if that is what you are using.

tom
--
Tom Whittaker (tomw@xxxxxxxxxxxxx)
University of Wisconsin-Madison
Space Science and Engineering Center
Phone/VoiceMail: 608/262-2759
Fax: 608/262-5974


  • 2001 messages navigation, sorted by:
    1. Thread
    2. Subject
    3. Author
    4. Date
    5. ↑ Table Of Contents
  • Search the visad archives: