Re: chessboard print out

[ Follow Ups ] [ Post Followup ] [ Palview Developers Forum ]
Posted by James Garner on November 01, 19102 at 14:40:23:

In Reply to: Re: chessboard print out posted by James Garner on November 01, 19102 at 13:37:45:

Gentlemen:

(NOTE: I talk about the target HTML, or the HTML code to be generated by the program...)

The previous method I posted to achieve printing is flawed. It is not scalable to include multiple boards on the page. It merely shows that modifying the target html to have layering division can achieve the desired printing...

A better way (which I will not demonstrate at this time) Would be to make the peices floating divisions, similar to the floating division for the piece in hand.

Basically, in the HTML, where the board is normally displayed, draw an empty board with dark and light squares images in the board table. This will require a change to the baord machanism, where the board images are single squares, not a block of squares. You can maintain the flexibility of the tool by allowing them to specify both dark and light square images. The reason for individusl images for each square, is that it gives you an object to query for each square to obtain the position necessary to place the floating piece divisions. For readaility I suggest naming the images after the notation ie: a2 or g4.

Immediately after the board, define divisions to hold the piece images. Defining them after the board will place the pieces on top of the board. Set the position of the piece divisions using javascript to the position values of the appropriate square image. As the game progreesses, move the divisions in the a similar manner that you move the current images, only you pull the position data from the board table.

As you can probably tell, though the concept is fairly straight forward, it will touch much of the javascript generated by PalView The most important thing is that it is scalable in a fashio sililar to the existing piece image mechanism.

If you would like to talk further about this, or would like help developping this feature, just send a message to the webmaster of knightwatchman.netfirms.com (i did not want to post my address directly.)

James Garner

Follow Ups:
Post a Followup

Name:   
Subject:

Comments:

Optional Link URL:

Link Title:

[ Follow Ups ] [ Post Followup ] [ Palview Developers Forum ]