Images of pieces

Discussion of chess software programming and technical issues.

Moderator: Ras

tpetzke
Posts: 686
Joined: Thu Mar 03, 2011 4:57 pm
Location: Germany

Re: Images of pieces

Post by tpetzke »

In my experience handling internal color in fonts and rendering them well against a colored background is not so easy
You're right. I cheated a bit. I used the TT font to create piece-square bitmaps in photoshop, so 1 bitmap for each piece type on a light and dark square. Those are compiled into the executable as a resource and then I use a BitBlt call to actually copy the image from the resource memory to the right position on the screen.

So using the font saves you the time to draw the images of the pieces yourself but its not all.

Thomas...
Thomas...

=======
http://macechess.blogspot.com - iCE Chess Engine