MASON-INTEREST-L Archives

September 2006

MASON-INTEREST-L@LISTSERV.GMU.EDU

Options: Use Proportional Font
Show Text Part by Default
Condense Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Sender:
MASON Multiagent Simulation Toolkit <[log in to unmask]>
Date:
Fri, 22 Sep 2006 15:22:25 -1000
Reply-To:
MASON Multiagent Simulation Toolkit <[log in to unmask]>
Content-Transfer-Encoding:
7bit
Subject:
From:
Ryan Kadomoto <[log in to unmask]>
Content-Type:
text/plain; charset="us-ascii"
In-Reply-To:
MIME-Version:
1.0
Comments:
To: MASON Multiagent Simulation Toolkit <[log in to unmask]>
Parts/Attachments:
text/plain (49 lines)
Ok, I got the setBackdrop() to work

The problem apparently was the way I was retrieving the image file.

This works
============================================================
        ImageIcon icon = new ImageIcon("background.png");
        Image backgroundImage = icon.getImage(); 
        display.setBackdrop(backgroundImage, false);

This did not work
============================================================
        Image backgroundImage = 
	
Toolkit.getDefaultToolkit().getImage("background.png");
        display.setBackdrop(backgroundImage, false);


But this doesn't really help me completely.  Ideally, I want the image to be
on a single rectangular plane that I can rotate.

Thanks,
Ryan



-----Original Message-----
From: MASON Multiagent Simulation Toolkit
[mailto:[log in to unmask]] On Behalf Of Sean Luke
Sent: Friday, September 22, 2006 2:26 PM
To: [log in to unmask]
Subject: Re: MASON-INTEREST-L Digest - 17 Sep 2006 to 21 Sep 2006 (#2006-56)

On Sep 22, 2006, at 5:14 PM, Ryan Kadomoto wrote:

> I tried the setBackdrop on the Display3D, but it didn't work quite  
> right.
> If I use setBackdrop(image, true), it renders the graphic as a sphere.
> If I use setBackdrop(image, false), it gives me an error.
> (java.lang.IllegalArgumentException: Width (-1) and height (200)  
> cannot be
> <= 0)

Ryan, this last statement is the one of particular concern to me.   
I've just tested again and have no problems with setBackdrop.  Can  
you provide the full backtrace that came with this exception?

Sean

ATOM RSS1 RSS2