Changeset 14333 in josm for trunk/src


Ignore:
Timestamp:
2018-10-14T18:42:07+02:00 (6 years ago)
Author:
Don-vip
Message:

fix #16838 - render nested svg elements properly

see https://github.com/blackears/svgSalamander/issues/31

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/com/kitfox/svg/SVGRoot.java

    r11525 r14333  
    201201        else if (viewBox != null)
    202202        {
    203             xx = (float)viewBox.x;
    204             ww = (float)viewBox.width;
     203            xx = viewBox.x;
     204            ww = viewBox.width;
    205205            width = new NumberWithUnits(ww, NumberWithUnits.UT_PX);
    206206            x = new NumberWithUnits(xx, NumberWithUnits.UT_PX);
     
    229229        else if (viewBox != null)
    230230        {
    231             yy = (float)viewBox.y;
    232             hh = (float)viewBox.height;
     231            yy = viewBox.y;
     232            hh = viewBox.height;
    233233            height = new NumberWithUnits(hh, NumberWithUnits.UT_PX);
    234234            y = new NumberWithUnits(yy, NumberWithUnits.UT_PX);
     
    264264    public void renderToViewport(Graphics2D g) throws SVGException
    265265    {
     266        render(g);
     267    }
     268
     269    @Override
     270    public void render(Graphics2D g) throws SVGException
     271    {
    266272        prepareViewport();
    267273       
Note: See TracChangeset for help on using the changeset viewer.