// back-end
static void
-DrawLine (int x1, int y1, int x2, int y2, int penType)
+DrawLine (int x1, int y1, int x2, int y2, enum PEN penType)
{
DrawSegment( x1, y1, NULL, NULL, PEN_NONE );
DrawSegment( x2, y2, NULL, NULL, penType );
// back-end
static void
-DrawLineEx (int x1, int y1, int x2, int y2, int penType)
+DrawLineEx (int x1, int y1, int x2, int y2, enum PEN penType)
{
int savX, savY;
DrawSegment( x1, y1, &savX, &savY, PEN_NONE );
/* Extend line up to current point */
if( currPvInfo[index].depth > 0 ) {
- DrawSegment((int) x, GetValueY( GetPvScore(index) ), NULL, NULL, PEN_BOLD + side );
+ DrawSegment((int) x, GetValueY( GetPvScore(index) ), NULL, NULL, (side==0 ? PEN_BOLDWHITE: PEN_BOLDBLACK) );
}
index += 2;
* along with this program. If not, see http://www.gnu.org/licenses/. *
*
*------------------------------------------------------------------------
- ** See the file ChangeLog for a revision history.
+ ** See the file ChangeLog for a revision history.
*/
#define MIN_HIST_WIDTH 4
#define MAX_HIST_WIDTH 10
-#define PEN_NONE 0
-#define PEN_BLACK 1
-#define PEN_DOTTED 2
-#define PEN_BLUEDOTTED 3
-#define PEN_BOLD 4 /* or 5 for black */
+enum PEN { PEN_NONE, PEN_BLACK, PEN_DOTTED, PEN_BLUEDOTTED, PEN_BOLDWHITE, PEN_BOLDBLACK };
#define FILLED 1
#define OPEN 0
extern int MarginH;
// calls from back-end part into front-end part
-void DrawSegment( int x, int y, int *lastX, int *lastY, int penType );
+void DrawSegment( int x, int y, int *lastX, int *lastY, enum PEN );
void DrawRectangle( int left, int top, int right, int bottom, int side, int style );
void DrawEvalText(char *buf, int cbBuf, int y);
/* Create or recreate paint box if needed */\r
if( hbmPB == NULL || width != nWidthPB || height != nHeightPB ) {\r
if( pens[PEN_DOTTED] == NULL ) {\r
- pens[PEN_BLACK] = GetStockObject(BLACK_PEN);\r
- pens[PEN_DOTTED] = CreatePen( PS_DOT, 0, RGB(0xA0,0xA0,0xA0) );\r
+ pens[PEN_BLACK] = GetStockObject(BLACK_PEN);\r
+ pens[PEN_DOTTED] = CreatePen( PS_DOT, 0, RGB(0xA0,0xA0,0xA0) );\r
pens[PEN_BLUEDOTTED] = CreatePen( PS_DOT, 0, RGB(0x00,0x00,0xFF) );\r
- pens[PEN_BOLD] = CreatePen( PS_SOLID, 2, crWhite );\r
- pens[PEN_BOLD+1] = CreatePen( PS_SOLID, 2, crBlack );\r
+ pens[PEN_BOLDWHITE] = CreatePen( PS_SOLID, 2, crWhite );\r
+ pens[PEN_BOLDBLACK] = CreatePen( PS_SOLID, 2, crBlack );\r
hbrHist[0] = CreateBrush( BS_SOLID, crWhite );\r
hbrHist[1] = CreateBrush( BS_SOLID, crBlack );\r
hbrHist[2] = CreateBrush( BS_SOLID, GetSysColor( COLOR_3DFACE ) ); // background\r
// [HGM] front-end, added as wrapper to avoid use of LineTo and MoveToEx in other routines (so they can be back-end)
void
-DrawSegment (int x, int y, int *lastX, int *lastY, int penType)
+DrawSegment (int x, int y, int *lastX, int *lastY, enum PEN penType)
{
static int curX, curY;
pens[PEN_BLACK] = CreateGC(1, "black", "black", LineSolid);
pens[PEN_DOTTED] = CreateGC(1, "#A0A0A0", "#A0A0A0", LineOnOffDash);
pens[PEN_BLUEDOTTED] = CreateGC(1, "#0000FF", "#0000FF", LineOnOffDash);
- pens[PEN_BOLD] = CreateGC(3, crWhite, crWhite, LineSolid);
- pens[PEN_BOLD+1] = CreateGC(3, crBlack, crBlack, LineSolid);
+ pens[PEN_BOLDWHITE] = CreateGC(3, crWhite, crWhite, LineSolid);
+ pens[PEN_BOLDBLACK] = CreateGC(3, crBlack, crBlack, LineSolid);
hbrHist[0] = CreateGC(3, crWhite, crWhite, LineSolid);
hbrHist[1] = CreateGC(3, crBlack, crBlack, LineSolid);
hbrHist[2] = CreateGC(3, "#E0E0F0", "#E0E0F0", LineSolid);; // background (a bit blueish, for contrst with yellow curve)