After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 612849 - SVG images for 2D pieces
SVG images for 2D pieces
Status: RESOLVED FIXED
Product: gnome-games-superseded
Classification: Deprecated
Component: glchess
trunk
Other All
: Normal enhancement
: ---
Assigned To: GNOME Games maintainers
GNOME Games maintainers
Depends on:
Blocks:
 
 
Reported: 2010-03-14 08:04 UTC by Alexey Kryukov
Modified: 2010-03-31 03:36 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Patch to enable switching between different chess sets (16.27 KB, patch)
2010-03-14 08:04 UTC, Alexey Kryukov
accepted-commit_after_freeze Details | Review
SVG drawings for new piece sets (38.55 KB, application/zip)
2010-03-14 08:05 UTC, Alexey Kryukov
  Details

Description Alexey Kryukov 2010-03-14 08:04:17 UTC
Created attachment 156097 [details] [review]
Patch to enable switching between different chess sets

Hi,

I would like to contribute a patch which allows switching between different sets of pieces in 2D mode. The pieces themselves are stored as SVG drawings. There are two sets currently available: "simple" (essentially the same ChessSophia font, but with contours slightly cleaned up) and "fancy" (this is my original work based on chess diagrams from old books).

To install the patch, do the following:

1. Apply the attached patch, placing it into your gnome-games directory.

2. Unpack the pieces.zip archive into gnome-games/glchess/ . This will create a subdir called pieces/ .

3. In glchess/src/lib/scene/cairo delete the files pieces.py and COPYING.2D (no longer needed).

The patch probably needs some polishing (in particular error handling may be improved), but at least it works and I hope the board with new 'fancy' pieces looks much better than the current design. Note that the new drawings have a white background, so it is now possible to use darker colors for black cells.
Comment 1 Alexey Kryukov 2010-03-14 08:05:18 UTC
Created attachment 156098 [details]
SVG drawings for new piece sets
Comment 2 Robert Ancell 2010-03-14 23:03:31 UTC
Thanks Alexey!  I've pushed your changes to a branch:
http://git.gnome.org/browse/gnome-games/commit/?h=glchess-svgchess

I will commit them when gnome-games is branched for 2.31.

I made a few small changes:
- Change from "Pieces Style" to "Piece Style"
- Added a gconf schema
- Fixed spacing in the preferences dialog
- Moved piece models from glchess/pieces to glchess/data/pieces

The one feature that would be really good is to scan the theme directory and automatically add new themes to the combo box.
Comment 3 Robert Ancell 2010-03-15 02:25:19 UTC
Review of attachment 156097 [details] [review]:

Looks good.
Comment 4 Alexey Kryukov 2010-03-15 05:01:35 UTC
Thank you, good news!

> Moved piece models from glchess/pieces to glchess/data/pieces

That's not very important, of course, but the only reason for placing them into a separate directory in the source tree was that textures for the 3d mode are currently stored in glchess/textures rather than glchess/data/textures. Shouldn't the textures also be moved to data/ then?
Comment 5 Robert Ancell 2010-03-15 05:37:13 UTC
Yes, you're right, the textures/ should move into data.  I will do that when the freeze ends too.
Comment 6 Robert Ancell 2010-03-31 03:36:35 UTC
Committed for 3.0:
http://git.gnome.org/browse/gnome-games/commit/?id=898261befd0385ae8cb86439643595a0eb0323da

Please continue to make improvements!