Allow -flipBlack to work with font-based piece rendering
authorH.G. Muller <h.g.muller@hccnet.nl>
Wed, 30 Jun 2010 08:49:12 +0000 (10:49 +0200)
committerArun Persaud <arun@nubati.net>
Thu, 1 Jul 2010 05:34:52 +0000 (22:34 -0700)
In addition the font-based pieces will also be flipped vertically in
flipView for variant shogi when -flipBlack is off.

winboard/winboard.c

index cbf38fa..bb78522 100644 (file)
@@ -2531,6 +2531,9 @@ DrawPieceOnDC(HDC hdc, ChessSquare piece, int color, int sqcolor, int x, int y,
 \r
         SelectObject( tmphdc, hPieceMask[ index ] );\r
 \r
+      if(appData.upsideDown ? color==flipView : (flipView && gameInfo.variant == VariantShogi))\r
+        StretchBlt(hdc, x+squareSize, y+squareSize, -squareSize, -squareSize, tmphdc, 0, 0, squareSize, squareSize, SRCAND);\r
+      else\r
         BitBlt( hdc,\r
             x, y,\r
             squareSize, squareSize,\r
@@ -2540,6 +2543,9 @@ DrawPieceOnDC(HDC hdc, ChessSquare piece, int color, int sqcolor, int x, int y,
 \r
         SelectObject( tmphdc, hPieceFace[ index ] );\r
 \r
+      if(appData.upsideDown ? color==flipView : (flipView && gameInfo.variant == VariantShogi))\r
+        StretchBlt(hdc, x+squareSize, y+squareSize, -squareSize, -squareSize, tmphdc, 0, 0, squareSize, squareSize, SRCPAINT);\r
+      else\r
         BitBlt( hdc,\r
             x, y,\r
             squareSize, squareSize,\r