Many thanks Sean!
And many,many thanks to you and the group for this great package - it's
a joy to use.
From: MASON Multiagent Simulation Toolkit
[mailto:[log in to unmask]] On Behalf Of Sean Luke
Sent: Wednesday, 7 May 2008 10:25 PM
To: [log in to unmask]
Subject: Re: Setting a background image in a Display2D
The "Fast" portrayals ignore their underlying simple portrayals entirely
(such as your ImagePortrayal2D) and only draw rectangles of solid
colors. It's not what you want, but you're on the right track.
Here are instructions you might find useful:
On May 7, 2008, at 3:25 AM, Magrath, Shane wrote:
> I'm running a 2D display where I want to use an image as a background
> for the simulation. The image is a landsat PNG file that I want to use
> as to give some "terrain effects" to the simulation.
> My idea is to use an IntGrid2D object to represent the terrain field.
> The IntGrid2D object would be simply a grid with exactly one cell in
> - set to 1 incidently.
> Then, my cunning plan such as it, is to use a FastValueGridPortrayal2D
> object configured to use an ImagePortrayal2D object for all values
> stored in the IntGrid2D object.
> Except it's not doing what I expect - just a simple white background
> is being shown. Debugging shows that the objects configure as I
> expect, the image loads correctly into the ImageIcon object, etc...
> So, is this the best way to go about this and perhaps someone has an
> idea about what might be happening to my nice landsat terrain...?
> Many thanks in advance.
> Shane Magrath
> IMPORTANT: This email remains the property of the Australian Defence
> Organisation and is subject to the jurisdiction of section 70 of the
> CRIMES ACT 1914. If you have received this email in error, you are
> requested to contact the sender and delete the email.