How to fill rectangle with an image

Post questions on how to use or achieve an effect in Inkscape.
rjh18
Posts: 6
Joined: Fri Dec 24, 2010 4:16 pm

How to fill rectangle with an image

Postby rjh18 » Fri Dec 24, 2010 11:27 pm

Hi,
I want to fill a rounded rectangle with an image, however when I overlay the rectangle over the image, the corners are stay square. What is the best way to do this?

RJ

User avatar
prkos
Posts: 1625
Joined: Tue Nov 06, 2007 8:45 am
Location: Croatia

Re: How to fill rectangle with an image

Postby prkos » Sat Dec 25, 2010 5:33 am

You can clip the image with the rectangle, or convert the image to a pattern and set the rectangle fill to it.

Don't forget to use the PixelSnap on the image before doing anything to keep it sharp on export ;)
just hand over the chocolate and nobody gets hurt

Inkscape Manual on Floss
Inkscape FAQ
very comprehensive Inkscape guide
Inkscape 0.48 Illustrator's Cookbook - 109 recipes to learn and explore Inkscape - with SVG examples to download

rjh18
Posts: 6
Joined: Fri Dec 24, 2010 4:16 pm

Re: How to fill rectangle with an image

Postby rjh18 » Sun Dec 26, 2010 10:55 am

How do u convert it to a pattern and then fill?

rjh18
Posts: 6
Joined: Fri Dec 24, 2010 4:16 pm

Re: How to fill rectangle with an image

Postby rjh18 » Sun Dec 26, 2010 11:06 am

Okay I figured out how to create a pattern and fill. However an image pattern isnt what I really want to do. How do I clip the image with rectangle? Also what is pixelsnap?

User avatar
brynn
Posts: 10309
Joined: Wed Sep 26, 2007 4:34 pm
Location: western USA
Contact:

Re: How to fill rectangle with an image

Postby brynn » Sun Dec 26, 2010 2:12 pm

....however when I overlay the rectangle over the image, the corners are stay square.

Are you sure you're looking at the rectangle, and not the selection box? Because the selection box will always be a square or rectangle. If you're sure it's not the selection box, would you please post a screenshot showing the rounded rectangle alone, and over the image.

Here's where you can find instructions for clipping: http://tavmjong.free.fr/INKSCAPE/MANUAL ... pping.html

Sorry, I don't know about Pixelsnap either :(

User avatar
flamingolady
Posts: 687
Joined: Wed Jun 10, 2009 1:40 pm

Re: How to fill rectangle with an image

Postby flamingolady » Wed Dec 29, 2010 1:41 pm

Have you tried to select both objects and choose one of the Path options like Intersection, Division, Cut Path, etc? I'm not sure exactly what you are attempting to end up with, so you might have to play with a few of the options and try each with the rectangle on top, if that doesn't work, try it with the rectangle on the bottom. If none of the suggestions on this thread works, maybe we could help better if you attach the files. good luck.
dee

User avatar
brynn
Posts: 10309
Joined: Wed Sep 26, 2007 4:34 pm
Location: western USA
Contact:

Re: How to fill rectangle with an image

Postby brynn » Wed Dec 29, 2010 9:22 pm

Have you tried to select both objects and choose one of the Path options like Intersection, Division, Cut Path, etc? I'm not sure exactly what you are attempting to end up with, so you might have to play with a few of the options and try each with the rectangle on top, if that doesn't work, try it with the rectangle on the bottom. If none of the suggestions on this thread works, maybe we could help better if you attach the files. good luck.

"How to fill rectangle with an image" sounds like the image is a photo, or some other raster type format. In that case, the path operations won't work, because both items must be paths, for the path operations. As long as the "image" is a raster format (bmp, png, jpg, etc.) Clip is the only option.

However, if the "image" is a vector format, path operation Intersection would definitely work ;)

rjh18
Posts: 6
Joined: Fri Dec 24, 2010 4:16 pm

Re: How to fill rectangle with an image

Postby rjh18 » Thu Dec 30, 2010 4:24 am

The image is a photo. I want to place the image inside the rounded rectangle so it fills the entire rectangle (i.e. it stretches to the shape of the rectangle).

User avatar
brynn
Posts: 10309
Joined: Wed Sep 26, 2007 4:34 pm
Location: western USA
Contact:

Re: How to fill rectangle with an image

Postby brynn » Thu Dec 30, 2010 11:23 am

Clipping is definitely what you need to do. Are you still having trouble with the round corners disappearing? If you could post a screenshot, showing the problem, it would help in solving it.


Return to “Help with using Inkscape”