I have converted a bitmap into a pattern and applied it to a vector object.
First problem: its sometimes hard to find the X needed to move the pattern with the Node Tool.
Any tricks ?
Second problem: how can i apply the exact position an scale of a pattern to another object (with the same pattern) ?
Is there a way to do it with the XML editor ?
Pattern Fill
Re: Pattern Fill
For the second problem try pasting the style.
Press Ctrl+C while original object is selected, then
press Ctrl+Shift+V after you select the target object.
Press Ctrl+C while original object is selected, then
press Ctrl+Shift+V after you select the target object.
Re: Pattern Fill
Lazur wrote:Press Ctrl+C while original object is selected, then
press Ctrl+Shift+V after you select the target object.
That does not result in the same position and scaling of the pattern for me.
Re: Pattern Fill
Then probably you had added transformations in between -like, original pattern is inside a transformed group/you had resized page to content, and the target object is inside another group with another transformation/on a new layer.
You may try that recent extension suggested here somewhere to remove all transformations.
You may try that recent extension suggested here somewhere to remove all transformations.
Re: Pattern Fill
I tried it on a new page, no transformations or anything.
Imported the bitmap, convert to pattern, apply to a rectangle, adjust with Node Tool.
Then on a duplicate of the same rectangle, pasted Style as you suggested, pattern is not applied in the same way.
The pattern is a seamless texture, and it seems it is tiled along space and applied that way to the second retangle.
So apparently, pasting the style only works properly if both objects are on the same X-axis.
Imported the bitmap, convert to pattern, apply to a rectangle, adjust with Node Tool.
Then on a duplicate of the same rectangle, pasted Style as you suggested, pattern is not applied in the same way.
The pattern is a seamless texture, and it seems it is tiled along space and applied that way to the second retangle.
So apparently, pasting the style only works properly if both objects are on the same X-axis.
Re: Pattern Fill
> it seems it is tiled along space
The pattern origin (the X) stays the same for both, yes, why you copy-paste the style. It is not moved by the distance between the two objects.
Problem with the pattern origin being hard to find:
It's a known bug that has to do with transformations... Often, I find it in the page's top left corner. Their color / size doesn't exactly make it easier to find the pattern handles... If you want to have a good result when exporting, make sure to move the handles as close to the object as possible. Otherwise, the pattern may be lost on export, or on certain zoom levels.
The pattern origin (the X) stays the same for both, yes, why you copy-paste the style. It is not moved by the distance between the two objects.
Problem with the pattern origin being hard to find:
It's a known bug that has to do with transformations... Often, I find it in the page's top left corner. Their color / size doesn't exactly make it easier to find the pattern handles... If you want to have a good result when exporting, make sure to move the handles as close to the object as possible. Otherwise, the pattern may be lost on export, or on certain zoom levels.
Something doesn't work? - Keeping an eye on the status bar can save you a lot of time!
Inkscape FAQ - Learning Resources - Website with tutorials (German and English)
Inkscape FAQ - Learning Resources - Website with tutorials (German and English)