[Kde-games-devel] KMahjongg frameworks branch
Ian Wadham
iandw.au at gmail.com
Fri Dec 11 03:10:11 UTC 2015
Hi Frederik,
On 10/12/2015, at 8:02 PM, Frederik Schwarzer wrote:
> today I had a short look at the Classic tileset in Inkscape. I wanted
> to decrease the intensity of the shadow a little bit. When I changed
> the opacity property of the tile in the upper left by "enter group",
> tree of the tile's shadows below was changed accordingly. One of the
> four tile's shadows remained the same.
Not sure what you mean by "enter group". Is it a menu item? Is it a
keyboard shortcut? Is it a Select option? I have Inkscape 0.91 and all
it seems to have is menu items Object->Group and Object->Ungroup
regarding groups.
> Do you know how this linkage is achieved?
Nope. Other than inspecting the XML file (rather unreadable) I do not
know how to work out the artist's usage of clones, groups and transforms.
> The IDs of the "correct" ones are "use1234" with different numbers for
> "1234". I cannot find those numbers anywhere else, so I cannot guess
> what the right number for the forth tile would be. Any idea?
Looking at the XML of the Classic theme, it looks as though all 8 blank tiles
in the group just above the tile-face pictures are supposed to be derived from
the two blank tiles at the top of the SVG layout. It also looks as though some
of the links have been broken, especially in TILE_1 (which has its shadow at
the south-west corner).
I also tried menu item Edit->Clone->Show Original (shortcut Shift D) on the
group of 8. Some of them are clones of the top 2. but most are not. I think
they are all supposed to be, but have been broken at some stage. There
is an unfinished theme in libkmahjongg called Bamboo. It is inspired by
the Classic theme and seems to work roughly that way with its blank tiles
and clones. Using Shift D on Bamboo's group of 8 shows that they are in
2 groups of 4. Each group of 4 has 3 tiles that are clones of the 4th tile.
A clone can be transformed from the original but retain its colour and shape,
so my theory is that, in the Classic theme's SVG layout, the unshadowed tile
all by itself at the left is originally the "grandfather" of the 8 tiles and the "father"
of the 2 tiles at the top, which have had shadows and highlighting added.
Then the 8 tiles are supposed to be 4 clones of the highlighted prototype and
4 clones of the unhighlighted one, but they are broken.
To create a clone, use Edit->Clone->Create Clone, move it to where you want
it (it starts on top of the original), then use Object->Flip Horizontal (key H) and/or
Object->Flip Vertical (key V) to get the shadows where you want them.
I tried renaming TILE_1 to WAS_TILE_1, then creating a clone and calling it
TILE_1 and flipping the shadows to the south-west. Guess what? The new
TILE_1 stayed in good alignment with the tile-faces and with its highlighted
counterpart.
Also, I found that the opacity of the new TILE_1 varied in synch with its "parent"
tile, but WAS_TILE_1 did not.
Mind you, I do not think that changing the opacity of the whole tile is the way
to go. It lets the background and the tiles underneath show through. There
must be some way to change just the shadows… ;-)
> I also saw the shift between the rotated tile representations but it
> behaves strangly when I try to move the tile. I moved one tile inside
> its group by 10 px down and left and in the game it was moved by 2 or
> 3 px. So no luck yet. :)
I don't think px in Inkscape has anything to do with pixels: it is just an arbitrary
scalable unit. In KMahjongg/qgraphic the pixels per tile depend on the window
size and they do in KMahjongg/master too.
Cheers, Ian W.
> Am Sonntag, 6. Dezember 2015, 22:00:25 schrieb Ian Wadham:
>> On 04/12/2015, at 10:22 PM, Ian Wadham wrote:
>>> Well, if you agree that the bug is likely to be in the Classic
>>> theme's tile alignments, I might have a look to see if there is a
>>> quick fix in Inkscape.
>> Well, I had a look at the Classic theme in Inkscape. I could
>> definitely see a few glitches where objects were out of alignment
>> by a few pix points, but I did not get far in fixing them. My
>> Inkscape skills are rusty, I could not find how to configure the
>> special keys you need for smart Inkscape selects (using an Apple
>> Mac keyboard and the X11 emulator used by Inkscape) and I could not
>> work out how the artist had constructed the grouped objects. I was
>> afraid of breaking something. So I have given up on that for now.
More information about the kde-games-devel
mailing list