X-Git-Url: http://winboard.nl/cgi-bin?a=blobdiff_plain;f=draw.c;h=0f34e2481eb7209aeb0b657212c71263ca89a3ea;hb=1c03d229073e56dda9e5856db5adaae51576a3bb;hp=02c280534b1f58fa6b4c43e8f6c4cdf195c472a9;hpb=aa694af0138b799c4de3e031d15c2a9be3112b6c;p=xboard.git diff --git a/draw.c b/draw.c index 02c2805..0f34e24 100644 --- a/draw.c +++ b/draw.c @@ -5,7 +5,7 @@ * Massachusetts. * * Enhancements Copyright 1992-2001, 2002, 2003, 2004, 2005, 2006, - * 2007, 2008, 2009, 2010, 2011, 2012 Free Software Foundation, Inc. + * 2007, 2008, 2009, 2010, 2011, 2012, 2013 Free Software Foundation, Inc. * * The following terms apply to Digital Equipment Corporation's copyright * interest in XBoard: @@ -232,8 +232,8 @@ CreatePNGBoard (char *s, int kind) } char *pngPieceNames[] = // must be in same order as internal piece encoding -{ "Pawn", "Knight", "Bishop", "Rook", "Queen", "Advisor", "Elephant", "Archbishop", "Marshall", "Gold", "Commoner", - "Canon", "Nightrider", "CrownedBishop", "CrownedRook", "Princess", "Chancellor", "Hawk", "Lance", "Cobra", "Unicorn", "King", +{ "Pawn", "Knight", "Bishop", "Rook", "Queen", "Advisor", "Elephant", "Archbishop", "Marshall", "Gold", "Commoner", + "Canon", "Nightrider", "CrownedBishop", "CrownedRook", "Princess", "Chancellor", "Hawk", "Lance", "Cobra", "Unicorn", "King", "GoldKnight", "GoldLance", "GoldPawn", "GoldSilver", NULL }; @@ -586,7 +586,8 @@ DrawLogo (Option *opt, void *logo) w = cairo_image_surface_get_width (img); h = cairo_image_surface_get_height (img); cr = cairo_create(DRAWABLE(opt)); - cairo_scale(cr, (float)appData.logoSize/w, appData.logoSize/(2.*h)); +// cairo_scale(cr, (float)appData.logoSize/w, appData.logoSize/(2.*h)); + cairo_scale(cr, (float)opt->max/w, (float)opt->value/h); cairo_set_source_surface (cr, img, 0, 0); cairo_paint (cr); cairo_destroy (cr); @@ -778,8 +779,8 @@ void CopyRectangle (AnimNr anr, int srcBuf, int destBuf, cairo_rectangle (cr, destX, destY, width, height); cairo_fill (cr); cairo_destroy (cr); - if(c_animBufs[anr+destBuf] == csBoardWindow) - GraphExpose(currBoard, destX, destY, squareSize, squareSize); + if(c_animBufs[anr+destBuf] == csBoardWindow) // suspect that GTK needs this! + GraphExpose(currBoard, destX, destY, width, height); } void @@ -920,5 +921,3 @@ DrawEvalText (char *buf, int cbBuf, int y) /* free memory */ cairo_destroy (cr); } - -