drawshield / Drawshield-Code

PHP code to create SVG shield images from Blazons, as used on drawshield.net
https://drawshield.net
GNU General Public License v3.0
50 stars 17 forks source link

!todo inverted ordinaries don't do counterchanged well: #579

Closed karlwilcox closed 11 months ago

karlwilcox commented 1 year ago

!todo inverted ordinaries don't do counterchanged well:

karlwilcox commented 1 year ago

Additional problem when sorting this one out:

When looking for the "source" for the counterchanging the code uses xpath 'preceeding::field/tincture/(division|fur|treatment)' - this is fine for a single shield but does NOT work on rolls (or quarterings....?) as the xpath query returns the first hit, so for example if the first shield in the roll has a two colour division then this will be found and used for ALL subsequent counterchanged items.

Need to navigate back up the tree to the nearest field, then search forward for division|fur|treatment.

tinctures.inc near 555

karlwilcox commented 1 year ago

This is now all fixed, and here's my test to prove it:

counterchange(1)