Sean,
This code has been hacked about but you can see what is happening.
This provides picture 1 above; picture 2 portrayal.setGridLines(true) at line 70 GridLines1WithUI;
picture 3 with grid lines but the agents are now located all in the top LHCorner rather than in each cell.
The red border is missing from two edges.

Thanks
Stewart.

On 25 January 2017 at 17:22, Sean Luke <[log in to unmask]> wrote:
Stewart, could you send me [directly] a small example application demonstrating the issue?

Sean

On Jan 25, 2017, at 5:04 PM, Stewart Aitken <[log in to unmask]> wrote:

Here are three small images that show what is happening.
Hopefully, this will help my explanation.

Kind regards,

Stewart.


On 25 January 2017 at 16:01, Stewart Aitken <[log in to unmask]wrote:
I am having difficulties with getting the grid lines and border to function as I would like.

                portrayal.setField(((SimEnviro) state).getAgentSpace());
                portrayal.setGridLines(false);
                portrayal.setBorder(true);

                agentSpace = new ObjectGrid2D(14,10);

I am using these settings on Windows 10 with MASON 19 with the updated setBorder gives the correct agent scale and a complete on all four sides red border.
When I activate the setGridlines it only gives a single blue line about a quarter of the way from the right-hand side. The red border remains the same as above. Subsequently, changing agentspace to:

                agentSpace = new ObjectGrid2D(140,100);

Gives the correct number of cells within the borders but the agents are substantially smaller than they are without the gridlines. In addition, the red border fails to show on the right-hand edge and the bottom edge.
How can I arrange for the agents to have a single agent in each grid cell and ensure they fill the cell?
Any help gratefully received.
Stewart Aitken







-- 



EMAIL DISCLAIMER http://www.york.ac.uk/docs/disclaimer/email.htm





--



EMAIL DISCLAIMER http://www.york.ac.uk/docs/disclaimer/email.htm