Re: XBoard 4.7.3: Full board textures + maximize window

Sebastian Pipping <[email protected]>
Newsgroups gmane.comp.gnu.xboard.devel
Message-ID <[email protected]>
Hello,


On 17.09.2014 10:02, H.G. Muller wrote:
> The problem seems to be that you want
> one and the same texture bitmap to work over a very wide range of board
> sizes.

well, yes, of course.


> Well, that could work, but only if the width of the grid lines is
> 1 pixel. Which would make them look a bit thin at monster board sizes.

Say hello to non-integer factor image scaling, please.


>> Okay, cool.
> I just pushed a patch to hgm.nubati.net to do integer scaling up on
> demand of the PNG. Perhaps you can test it with the original XQ board
> bitmap.

With the shipped xqboard.png, it looks better now, but that does have to
do with the specific image.  In particular:

 * It can be crashed by resizing (small, big, crash), e.g. by running

     # wmctrl -r "xboard:" -e 0,0,0,100,100
     # wmctrl -r "xboard:" -e 0,0,0,1000,1000

   which makes XBoard crash with a Cairo assertion

     xboard: [..]/cairo-surface.c:930: cairo_surface_destroy:
     Assertion `((*&(&surface->ref_count)->ref_count) > 0)' failed.

   (Running cairo 1.12.16 over here).

 * The lines

     if(w > 256 & h > 256) { // full-board image?
       while(squareSize*9 > n*w || squareSize*10 > n*h) n++;
     } else {
       while(squareSize > n*w || squareSize > n*h) n++;
     }

   are the exact guessing that I asked /not/ to do.
   Furthermore, "&" probably should be "&&" and those
   loops could be resolved by using a non-loop formula.

 * It's still as broken for other_1800x2000.png .


To get it compiling, I needed to apply the gettext 0.18 patch from
https://savannah.gnu.org/bugs/index.php?39970 . It would be cool to have
that applied upstream: even Debian stable has gettext 0.18 by now.
Which distro and version of gettext are you running?


> (I cannot, as my monitor resolution does not allow me to make
> the window larger than the bitmap.) Currently it still uses a fixed size
> limit to decide if it should treat it as a full-board bitmap or a single
> square.

You can use wmctrl to blow up the window size even beyond screen size, e.g.

  wmctrl -r "xboard:" -e 0,0,0,2000,2000 ; echo $?

With wmctrl 1.07 and XFCE that works as expected over here.

Best,



Sebastian
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.