[Kde-games-devel] KMahjongg frameworks branch

Frederik Schwarzer schwarzer at kde.org
Sat Dec 12 14:17:46 UTC 2015


Am Samstag, 12. Dezember 2015, 13:08:45 schrieb Ian Wadham:
> On 12/12/2015, at 1:07 AM, Frederik Schwarzer wrote:
> > Am Freitag, 11. Dezember 2015, 14:10:11 schrieb Ian Wadham:

Hi Ian and Wolfgang,

@Wolfgang: please check if the classic tiles (current master of 
libkmahjongg) behave correctly in Kajongg.

> You must have read my mind…  The SVG file you attached (classic.svg)
> is very like one I developed last night…  You even used 70% opacity
> for the shadows, same as me… :-)  I found that value made the
> shadows not too dark on a background like Light Wood and juuusssttt
> visible on a very dark background like Egyptian.
> 
> So let's go with those 70% shadows… :-)

Hehe, initially I tried 50% as it looked nice in Inkscape but it did 
not look right in the game with lighter backgrounds.

> > I have an additional context menu entry sometimes (have not
> > figured out why it is not always there) names "Enter Group".
> > Version is 0.91 as well. You can work on parts of a group without
> > ungroup->...->group.
> These links might explain it.  As they say, there are "myriad" ways
> to select things…  But you need a Windows/LInux keyboard…  See:
> http://tavmjong.free.fr/INKSCAPE/MANUAL/html/Basics.html
> http://tavmjong.free.fr/INKSCAPE/MANUAL/html/Select.html
> 
> Right-click on any graphics (or other) object brings up an
> appropriate context menu for things that can be done with that
> object.  See how this applies to "Enter group" in:
> http://tavmjong.free.fr/INKSCAPE/MANUAL/html/Groups.html

Thanks for the links.
My problem with understanding what was going on in this case was that 
one tile was grouped twice. So entering the group did not give me two 
elements but just another group.
Also one of the cloned tiles was grouped to itself. So one of the 
clones had "Enter Group" and the others didn't.
Not sure. Maybe I broke the file while playing around (although I did 
reset my git repo several times) but there have been several things 
that confused me. But thanks to your explanations my confusion 
vanishes bit by bit. :)


> The following link put me onto how to get a bird's eye view of
> object structures in Inkscape, especially if you have readable IDs
> for objects, instead of a bunch of computer-generated IDs.  So try
> it on the version of "classic.svg" that you sent me… :-)
> http://tavmjong.free.fr/INKSCAPE/MANUAL/html/XML-Basic.html
> 
> In fact, that was how I found out how to select any sub-object at
> any level in a group.  You can click on an object in the drawing to
> select it and the XML automatically scrolls to where it is defined
> in SVG.  Then you can tree-view the group, by clicking on the
> little arrows, and click on a sub-item in the XML to have it
> selected back in the drawing.  A few tries show up which sub-group
> is a shadow-group in "classic.svg".  Then, when it is selected, you
> can easily change the properties.  Beats poking at graphics with
> mouse and special keys and hoping you find the right hotspot.
> 
> So there's your "DNA"… a simple matter of data-structures, Watson…
> :-)

Wow, thanks. I did not see the internal editor. I always opened the 
file in Inkscape and Vim alternately. That's why I decided to add 
useful IDs and Labels. :)
I prefer to edit files in a text editor. Not only because it is 
sometimes easier to edit specific properties but also because the diffs 
tend to be cleaner. Opening a UI file to change a property often 
changes lots of stuff by changing defaults, moving stuff around and so 
on. So Vim is still my best friend. :)


> Now that I know this, I might be able to fix something in the
> "Treasure of Egypt" theme of KGoldrunner which has been bothering
> me for years - empty strip at bottom of frame… :-)

Hehe, I was thinking about looking at other SVG files as well to maybe 
find some issues there. Once a bit into it, it's fun to do some 
graphics-related mechanics. :)


> I think TILE_1 got well and truly "un-cloned" at some stage.  See
> menu item Edit->Clone->Unlink Clone.

I edited the file once in 2009 but I remember TILE_1 being special then 
already. The initial author just created the tileset because he did 
not like the new KDE 4 sets. So maybe he was as goot ad Inkskape as me 
and when it worked, he left it as it was. As my former boss used to 
sey: "Nobody is paying us for beauty. If it works, you are done." 
(Needless to say, that I did not like that way of working.)


> Please commit and push ...

Did so just now. Please check.

Thanks for your help. I am learning a lot right now. :)

Regards,
Frederik



More information about the kde-games-devel mailing list