1

I've been trying to edit a SVG diagram (here in my Google Drive you can find it if having the original SVG helps you in assisting me), below is a PNG bitmap of the original labelling what I want changed.

How do I make the sides of my drawing nice, homogenous (in shape, not colour) and rectangular so that there are no gaps or curves sticking out of the sides of it. The label 2 in the below bitmap shows some examples of what I mean, like where the brown dashed line extends past its intended bounds or where the brown cell bed below does not line up with the edges of the pink bucket-filled area.

enter image description here

  • Done: I split the Q into two separate Qs on this SE. Is there anything else I can do to increase my odds of a useful answer? – BH2017 Jan 10 '15 at 14:54
  • this question is not very clear. What do you mean? is it the alignments you mean? can you give an example of what you want the final result to be? – Benteh Jan 10 '15 at 18:39
2

You essentially have three options:

  • Use a mask:

    1. Group everything that you want to mask.
    2. Create a rectangle that covers exactly what you want to see (make it transparent to ease adjusting it).
    3. Select your rectangle and the group and object → mask → set.

    This is quickest, easiest and arguably best practice, but may break when you export to a different format.

  • Create a white (background-coloured) frame masking everything that sticks out. To do so:

    1. Create a rectangle that covers exactly what you want to see (make it transparent to ease adjusting it).
    2. Create a rectangle that covers everything that you want to mask.
    3. Select both rectangles and use path → exclusion.
    4. Make the frame you just created white and raise or lower it such that it is between the text and the graphics.

    This is still very quick, but robust for any reasonable export. However, it does not work if you want the background to be transparent.

  • Crop everything manually:

    1. Create a rectangle that covers exactly what you want to see (make it transparent to ease adjusting it).
    2. For every object that sticks out:
      1. Convert selected object to path or convert selected object’s stroke to path, if necessary.
      2. Create a duplicate of the rectangle.
      3. Select both and use path → intersection.

    This is obviously very tedious, but works under exports as well as if you want the background to be transparent. There may be slight imperfections to the borders on the pixel level when rendered.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.