How to modify the corners of an rectangle?

Asked by Hymer on 2018-09-23

An object is formed as a rectangle, and there is another layer under it, with a photo of a hanging picture on a wall. I should like to "hang" my object in the frames of that picture. I draw a path fit into the frame of the photo. I tried to use the Perspective-tool, but the object changes to a regular rectangle according to the selection around the path'selection.
Is there any other simple way to modify the corners (angles) of the object?

Question information

Language:
English Edit question
Status:
Solved
For:
Inkscape Edit question
Assignee:
No assignee Edit question
Solved by:
Hachmann
Solved:
2018-10-05
Last query:
2018-10-05
Last reply:
2018-10-05

This question was reopened

Hachmann (marenhachmann) said : #1

You could just convert it to a path (Path > Object to Path), then use the node tool to move the four nodes (select node tool - 2nd from top - then click and drag the corner nodes). This doesn't require any complex stuff like perspective (and what is the 'perspective tool'?).

Hymer (ibogardi) said : #2

Thank you, but I cannot get any nodes on the object in layer "Parrot" and "Tudta" Which I try to fit in the frames of the Background.
https://www.dropbox.com/s/hp0zfnjqisuqay4/obect-to-frame.svg?dl=0

Hachmann (marenhachmann) said : #3

Ah, I get it. You are trying to use Inkscape to modify the shape of an imported raster image.... And as Inkscape is an editor for vector graphics, this is not very successful...

However, there is an extension that can be used for this, you can find it here:
https://gitlab.com/su-v/inx-modifyimage

Hachmann (marenhachmann) said : #4

(or use gimp or any other raster graphics editor of your choice)

Hymer (ibogardi) said : #5

The result in Gimp was not so good, because it is important for me the sharp, readable text. So I suppose, it would be sharper in Inkscape. Please, tell me, how to install that inx-modifyimage in Linux.

Hymer (ibogardi) said : #6

Now I've installed the extension and it works, but the Perspective/Envelope modifies AND rotates the image. How can I extend the image to the path, but without rotating?

Hachmann (marenhachmann) said : #7

Make sure start the path you draw with the correct corner ('Origin (top-left) of destination area').

If you don't know how to do that, just play with the options "Reverse direction of quadrilateral" and "Origin (top-left) of destination area" until it looks correct.

Hymer (ibogardi) said : #8

Terrific extension! Thank You, thank Inkscape!
I have only one question about this. When I choose Envelope ("Burkológörbe" in Hungarian) I get this message: "This operation is not available with PIL". I don't know if Envelope would modify the object differently than Perspective, I am just wondering.

Another question. When I open Inkscape, I get a message first, that A(z) /home/ivan/.config/inkscape/preferences.xml is not a valid XML document, and Incscape will use the default settings. I don't care so much, but how can I repair it or just stop this message?

Hachmann (marenhachmann) said : #9

Btw. there is no difference in 'sharpness' between Inkscape and Gimp when you are editing raster images. Only vector data stays sharp, no matter what zoom level. Gimp might even be better at preserving sharpness.

Read the README for the PIL question:
https://gitlab.com/su-v/inx-modifyimage#requirements

For the preferences file:
Delete the broken one. Inkscape will create a new one.

Hymer (ibogardi) said : #10

Most important for me just the readable text, the text is the message, the picture is only the "garnish". So Inkscape is suitable for this purpuse. Even better if the photo is not so sharp. But I have to change the text to path. Is there any perspective or envelope miodiying for text?
Sorry, I don't understand the PIL. Is it an extension too I shall install?

I deleted the broken preferences file and now I can open Inkscape without the error-message.

Hachmann (marenhachmann) said : #11

You already have PIL, but you'd need Wand and Imagemagick for the envelope deformation of Raster images. Wand is a python module (installing python modules for use with Inkscape on Windows can be tricky, on Linux it's trivial, on Mac - no idea), and imagemagick is a standalone command line program.

To have readable, deformed text, you could also just type the text, do Path > Object to Path, and use the vector tools Inkscape provides. If the text doesn't need to be deformed, that's even better. Choose a picture for the background, put text on top, done.

Or is there a reason why you cannot type the text?

Hymer (ibogardi) said : #12

If I do Object to Path, the node tool provides a lot of nood. I can distort every letter in the text. This is not what I want to do. I need only 4 noods at the corners of the whole text and move them as perspective or any rectangular shape, and not distort the font. It would be nice if I could change the font even after the modifying, but it is unpossible if the text have moved to path.

Hachmann (marenhachmann) said : #13

> I need only 4 noods at the corners of the whole text and move them as perspective or any rectangular shape

You can do that for paths, with the perspective extension. I'm not sure what you mean by 'not distort the font' - as that's what perspective is meant to do, basically?

If you want the text to stay editable, use the perspective Live Path Effect:
http://wiki.inkscape.org/wiki/index.php/Release_notes/0.92#Perspective.2FEnvelope

Hachmann (marenhachmann) said : #14

Sorry, no, the Live Path effect does not work with text. But you can just make a backup copy of the original text, it's not that hard to use the LPE.

Hymer (ibogardi) said : #15

I send you a very simple file. One word, and I try to make modify it to perspective. Or use any other word or meaning. I tried everything. I suppose, Live effect is the same as "Útvonal módosítása" in Hungarian, the 2nd from below among the Extensions. I tried to ungroup, then unit the pathes, but nothing helps. The text, moved to path is not effected. Sometimes disappears the letter P.
https://www.dropbox.com/s/s88iz66rj559sd0/perspektiva.svg?dl=0

Hachmann (marenhachmann) said : #16

You could do it like this:
https://framadrive.org/s/Pi9fgyLXoZqPZTa (gif animation)

Hymer (ibogardi) said : #17

Sorry, this gif animation doesn't move for me, I see only the first picture.

Hachmann (marenhachmann) said : #18

Download it.

Hymer (ibogardi) said : #19

I converted your very fast gif to video MP4 to make it possible to play it slower.
I have Inkscape in Hungarian and I cannot find any perspective/Envelope among my Path effects. I tried everyone. None of them is similar. https://www.dropbox.com/s/43w8omng2pv1zt9/Myeffects.png?dl=0

Hachmann (marenhachmann) said : #20

Check your Inkscape version. It should be at least 0.92.2 or 0.92.3 (you can see that in the menu (last entry at the right - About > Inkscape).

Hymer (ibogardi) said : #21

Yes! The Inkscape in Softwaremanager is the old one. Now I've installed with Flatpak, and it is 0.92. Now I could find Envelope/Perspective and it works fine. Thank you, Hachmann. Inkscape is great.

Hymer (ibogardi) said : #22

Sorry, I have problem again with perspective. The Extension Envelope/perspective worked with imported png-images very well in the earlier Inkscape. Now I've installed the same inx and modify images in the Inkscape extensions map, but I get no any Envelope/Perspective in the Extensions menu.

Hachmann (marenhachmann) said : #23

I'm sorry, what did you do?

Can you be more clear?

Are you maybe saying that:

- the Live Path Effect works (comment #21)
- but the extension isn't found/used by the flatpak-ked Inskcape version? (comment #22)

This could have multiple reasons. Check your extension-errors.log file in your user config directory, please. Copy anything in it about the extension you're referring to into your next comment.

Are you on Ubuntu/Linux Mint/elementaryOS?

Hymer (ibogardi) said : #24

Yes, exactly as you made my question.
Meanwhile I recognized that the the Modify object to path (Shift-Ctrl-C) doesn't work. I tried to modify this very simple object: https://www.dropbox.com/s/0nc0nug3bvrkten/leaf.svg?dl=0
Here is the content of Extensions map:
https://www.dropbox.com/s/9nrfaq6wzj0nlon/Extension-map.png?dl=0

Hachmann (marenhachmann) said : #25

Thank you for the screenshot. So you are using Linux Mint. Which version?

Please copy the contents of your extension-errors.log file here (one folder up from your screenshot).

It's not possible to use 'Object to path' for bitmap images. Object to path converts rectangles, circles, text, stars, polygons and other objects to a path.

To make a bitmap image into path(s), you need to vectorize (other word: trace) it. See Help > Tutorials > Tracing.

Hymer (ibogardi) said : #26

I use Linux Mint 18.03 Cinnamon 64 bit.
My extension-error.log is in Hungarian. Do you need it in English, maybe I have to install the English Inkscape. But maybe you see the error here anyway:

A(z) "DXF Output" kiterjesztést nem sikerült betölteni, mivel egy függőség nem teljesül.
Függőség:
  típus: executable
  hely: útvonal
  szöveg: pstoedit
  leírás: A Pstoedit programnak telepítve kell lennie a használathoz. Információ a következő webcímen: http://www.pstoedit.net/pstoedit

A(z) "Win32 Vector Print" kiterjesztést nem sikerült betölteni, mivel the extension is designed for Windows only. Ennek oka: helytelen ".inx"-fájl tartozik a kiterjesztéshez. Helytelen ".inx"-fájl például egy hibás Inkscape-telepítésből származhat.
A(z) "Dia Input" kiterjesztést nem sikerült betölteni, mivel egy függőség nem teljesül.
Függőség:
  típus: executable
  hely: útvonal
  szöveg: dia
  leírás: Dia-fájlok importálásához telepítve kell lennie a Dia programnak. Beszerezhető a következő webcímen: http://live.gnome.org/Dia

A(z) "XFIG Input" kiterjesztést nem sikerült betölteni, mivel egy függőség nem teljesül.
Függőség:
  típus: executable
  hely: útvonal
  szöveg: fig2dev

A(z) "LaTeX" kiterjesztést nem sikerült betölteni, mivel egy függőség nem teljesül.
Függőség:
  típus: executable
  hely: útvonal
  szöveg: latex

A(z) "LaTeX" kiterjesztést nem sikerült betölteni, mivel egy függőség nem teljesül.
Függőség:
  típus: executable
  hely: útvonal
  szöveg: dvips

A(z) "LaTeX" kiterjesztést nem sikerült betölteni, mivel egy függőség nem teljesül.
Függőség:
  típus: executable
  hely: útvonal
  szöveg: pstoedit

A(z) "Sketch Input" kiterjesztést nem sikerült betölteni, mivel egy függőség nem teljesül.
Függőség:
  típus: executable
  hely: útvonal
  szöveg: skconvert

Best Hachmann (marenhachmann) said : #27

Thank you. There's nothing in the log about the extension we're interested in.

So if it really is not in the extensions menu, then this is a problem with the flatpak package, and maybe you want to report it there:
https://github.com/flathub/org.inkscape.Inkscape/issues

Additionally, you can uninstall the flatpak:

$ flatpak list

<prints a list of installed programs and their options>

$ flatpak remove <whatever there is in the list about inkscape, before the first slash, e.g. org.gnome.inkscape>

And then install the official version from the ppa:

$ sudo add-apt-repository ppa:inkscape.dev/stable
$ sudo apt-get update
$ sudo apt-get install inkscape

Hymer (ibogardi) said : #28

Thanks Hachmann, that solved my question.