bugBattle for Wesnoth - Bugs: bug #20935, A Tale of Two Brothers graphic...

Show feedback again

You are not allowed to post comments on this tracker with your current authentification level.

bug #20935: A Tale of Two Brothers graphic off-center in campaign select dialog

Submitted by:  Gregory Gauthier <rjaguar3>
Submitted on:  Sat Jun 29 21:46:22 2013  
Category: BugSeverity: 2 - Minor
Priority: 5 - NormalItem Group: Graphics
Status: FixedPrivacy: Public
Assigned to: Charles Dang <vultraz>Open/Closed: Closed
Release: 1.11.5+dev (092a0df-Clean)Operating System: Linux Mint 14

Sun Nov 17 18:25:17 2013, comment #3:

Jetrel: please submit a separate feature request for this.

Closing now.

Ignacio R. Morelle <shadowmaster>
Project Administrator
Sat Nov 16 05:42:33 2013, comment #2:

This can be fixed by cropping the oversize sprite down to 72x72 (without losing any pixels).
Fixed in commit 964973d567208c18e0d86ea5d4c5ad322ec7217a.

Matthias Schoeck <mattsc>
Project Member
Thu Aug 8 02:33:45 2013, comment #1:

Sprites can't be counted on to be 72x72 anymore; for any image widgets where they need to fit in a fixed size (such as the sidebar in-game), they need to be scaled down to fit.

This scaling needs to be the same proportion on both axes.

Our sprites also are not guaranteed to be "balanced" for visual weight - some sprites jut off in odd-angles in a way that would confuse a simple/naive centering algorithm. The horsemen are probably a good example of this, because the all carry a lance that juts out to the upper-left, leaving a great deal of empty pixels above them which are nevertheless within the "minimum bounding box containing all opaque pixels".

To counteract this, it may be advisable to ensure that as a sprite is cropped to remove fully transparent margins, that margins in the same dimension are both as small as the smallest one. i.e.
vertical_margin = std::min(top_margin, bottom_margin)

Same for horizontal. This will keep a sprite centered even if it juts off unevenly to just one side.

Richard Kettering <jetryl>
Project Member
Sat Jun 29 21:46:22 2013, original submission:

In the campaign select dialog, the horse icon for the campaign "A Tale of Two Brothers" appears off-center both with respect to the other icons and to the completion wreath surrounding it. See the screenshot.

Gregory Gauthier <rjaguar3>


Attached Files


Depends on the following items: None found

Items that depend on this one: None found


Carbon-Copy List
  • -unavailable- added by shadowmaster (Posted a comment)
  • -unavailable- added by mattsc (Posted a comment)
  • -unavailable- added by jetryl (Posted a comment)
  • -unavailable- added by vultraz (Updated the item)
  • -unavailable- added by rjaguar3 (Submitted the item)

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.


    Error: not logged in



    Follow 4 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Sun Nov 17 18:25:17 2013shadowmasterOpen/ClosedOpen=>Closed
    Sat Nov 16 05:42:33 2013mattscStatusNone=>Fixed
    Fri Jul 5 08:02:50 2013vultrazAssigned toNone=>vultraz
    Sat Jun 29 21:47:46 2013rjaguar3Attached File-=>Added wesnoth-atotb-bug-cropped.png, #18188
    Show feedback again

    Back to the top

    Powered by Savane 3.1-cleanup