Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 5973623
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T20:49:35+00:00 2026-05-22T20:49:35+00:00

I have one or more path elements inside a g element that I am

  • 0

I have one or more path elements inside a g element that I am scaling to fit inside a grid rectangle. The transform is applied to the g element. My transform works in that all the points end up at the right places, but I discovered that I have to adjust the stroke-width of the path to get a readable line.

The problem is that if the scale involves a large shift in the aspect ratio, I end up with some segments of the path being heavier weight than others, depending on their orientation.

Here is a typical transform that my code computed:

 scale(0.1875, -0.010397820616798718) translate(-1149000, -96174)

In this case I end up changing the stroke-width from 9px to about 48px. Segments close to the horizontal end up thin, those close to the vertical are thick.

Is there any easy way to end with all the segments with the same rendered width?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-22T20:49:36+00:00Added an answer on May 22, 2026 at 8:49 pm

    Have you looked at setting the vector-effect attribute to non-scaling-stroke?

     <line vector-effect="non-scaling-stroke" stroke="black" stroke-width="5" 
            x1="32" y1="50" x2="32" y2="350"/>
    

    http://www.w3.org/TR/SVGTiny12/painting.html#NonScalingStroke

    UPDATE

    The best solution I can think of is to manually transform the coordinates of your path.

    • vector-effect="non-scaling-vector" is not consistently supported. My versions of Firefox and Safari do not support it, but my Chrome browser does.
    • In the SVG standard there is no way of specifying a transformation for the stroke independantly. (A stroke-transform attribute would be nice – like the windows GDI+ drawing system, where a Pen object has it’s own local transformation).

    Until this changes, the best solution I can think of is to manually work out the coordinates of your path – that is the svg has no transform elements; the coordinates are already transformed.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Hey guys I have one more question lol. I am using a script that
I am trying to learn more about regular expressions I have one below that
We have an application that has one or more text console windows that all
In relation to this question ( Efficient hashCode() implementation ) I have one more
How can one have more than a Wizard control on the same page without
I am learning JPA and have one question: In which situations we need more
it's possible to have one entity object (class, e.g. User) for more entity models
Hey guys, one more quick question for any experts out there. I have a
I have more than one OpenID as I have tried out numerous. As people
Where I have more than one table in my database for use with (similar,

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.