Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add "new viewport port" support [ fix for issue #1137 ] #2398

Closed
wants to merge 5 commits into from

Conversation

kabab
Copy link

@kabab kabab commented Aug 8, 2015

No description provided.

@kabab kabab changed the title Add "new viewport port" support [fix for issue #1137] Add "new viewport port" support [ fix for issue #1137 ] Aug 8, 2015
@asturur
Copy link
Member

asturur commented Aug 8, 2015

how does this lofic behaves with viewboxes that have a scaling factor?

@kabab
Copy link
Author

kabab commented Aug 8, 2015

Will it s not about the viewBox attribute, you can check issue#1137 to understand the problem.

@asturur
Copy link
Member

asturur commented Aug 8, 2015

i understand the problem of the x and y attribute of the inner svg tag.
i`m asking if you checked this logic in combination with viewboxes attribute that have a scaling factor.

Does it stack correctly?

example:

<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve" width="1000" height="1000" viewBox="-10 -50 100 950" preserveAspectRatio="none">

<svg preserveAspectRatio="none" x="12" y="12" width="300" height="400" style="fill: none;" viewBox="0 0 300 400">
    <rect x="2" y="2" width="100" height="80" fill="blue"/>
</svg>
<svg preserveAspectRatio="none" x="12" y="12" width="300" height="300" style="fill: none;" viewBox="0 0 250 300">
    <rect x="2" y="2" width="100" height="80" fill="red" opacity="0.5" />
</svg>
<svg preserveAspectRatio="none" x="-12" y="-12" width="300" height="300" style="fill: none;" viewBox="0 0 150 300">
    <rect x="2" y="2" width="100" height="80" fill="orange"/>
    <svg preserveAspectRatio="none" x="10" y="10" width="300" height="150" style="fill: none;" viewBox="0 0 200 300">
        <rect x="10" y="10" width="100" height="60" fill="red"/>
    </svg>
</svg>
<svg preserveAspectRatio="none" x="0" y="0" width="300" height="300" style="fill: none;" viewBox="0 0 250 250">
    <svg preserveAspectRatio="none" x="12" y="12" width="300" height="300" style="fill: none;" viewBox="0 0 300 300">
        <rect x="2" y="2" width="100" height="80" fill="green" opacity="0.1" />
    </svg>
</svg>
<svg preserveAspectRatio="none" x="0" y="100" width="3000" height="1500" style="fill: none;" viewBox="0 0 160 180">
    <rect x="10" y="10" width="10" height="60" fill="green"/>
</svg>
</svg>

is this svg rendering good?

@kabab
Copy link
Author

kabab commented Aug 9, 2015

@asturur for the time being this pull request solve just (x, y) attribute problem.

@asturur
Copy link
Member

asturur commented Aug 9, 2015

please check #2399 for a more complete solution.

@asturur
Copy link
Member

asturur commented Aug 10, 2015

merged 2399.
thanks for giving input.

@asturur asturur closed this Aug 10, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants