How to fill vector polygon with raster image?

I’m relatively new to Krita with no prior experience in other drawing programs. I’m using Krita 5.1.5 on a very large, very fast Windows 10 64-bit system. Capacity is not a problem.

I’m trying to create a vector polygon shape with its interior filled with a jpeg pixel/raster image. I want the final result to be a vector image which can be transformed.

For example, make a vector layer, create a 2D polygon shape (e.g. a square) in that layer, and then have the interior of that shape be a color wood grain jpeg image copied off the internet.

I can fill the polygon with a color, but I can’t seem to fill it with a raster image. Nor can I figure out how to use the polygon outline to make some kind of mask used to select that same shape from the raster image.

I can create the vector layer with a polygon shape, and then I add a paint layer above that with the texture image pasted in, and then turn on inherit alpha for that paint layer, but the interior of the polygon is not filled and instead just the lines forming the border of the polygon are filled.

This video comes close https://www.youtube.com/watch?v=w-DQDOvOymE but that creator is working with a paint layer object, not a vector polygon.

Could someone kindly describe what steps should work to fill the interior of a vector polygon with a raster image?

What type of layer do I copy/paste the wood grain image into? I’ve been using paint layers, as vector layers won’t accept the jpeg image.

How do I select the interior of the polygon to be filled and not the lines or exterior?

The principle is exactly the same. All you need to do is edit the polygon’s properties and set it to a solid fill colour. There are also other ways to achieve what you want, I’ll elaborate on that if you want.

So if I set the polygon’s properties to a solid fill colour, when I turn on inherit alpha for paint layer above with the raster image, the polygon will be filled with the raster image and not the solid fill color?

Yes, provided that your paint layer doesn’t have transparent regions. However, in case it does, you can reverse the order of the 2 layers and set the vector layer’s blend mode to ‘Destination In’, which can be found under the ‘Mix’ category - without using ‘Inherit Alpha’.

1 Like

Where do I set polygon properties for solid fill color???

None of the “right click” menus show “solid fill”, not when the vector layer is selected nor for the polygon when selected.

The 5.2.0 doc mentions a “Stroke and Fill Dock” but I can’t find that either. :-/

I appreciate your patience.

‘Tool Options’ docker - if it’s not open, go to menu Settings > Dockers > Tool Properties*. Select the polygon with the ‘Select Shape’ tool, then you can edit its properties.

*EDIT: I meant ‘Tool Options’ of course…

Ah. Found it. Yes on the tool options, “fill” tab, but it wasn’t labled “stroke and fill” dock nor did a tool tip pop up to tell me.

Regardless you are correct, after I set the polygon fill property (the dripping paint bucket icon) to “solid” and then inherit alpha on the above paint layer, the raster image filled out the polygon shape just as desired.

Thank You very much. :slight_smile:

This topic was automatically closed 4 days after the last reply. New replies are no longer allowed.