Fill Image in odd shape

  • Thread starter Thread starter SStory
  • Start date Start date
S

SStory

I am trying very hard to take an image and fill a shape with part of it.

The way I do it is get a rectangle for the basic shape,
add to a region, make some other shapes and exclude form region.
make a texture brush, then fill region with the brush.

It works on three parts of what I am doing but on the third time it seems to
be tiling the image.
I don't know waht I am doing wrong. Is there a better way to define a
region and draw what parts of the rectangle(image) are left over--into it?

Any ideas?

Looks as though it moves left a bit and starts drawing then comes back to
the left side to finish the right side... therefore the image is toast. I
do it in the same way as I did for another image that works... Don't know
the problem

thanks,

Shane
 
* "SStory said:
I am trying very hard to take an image and fill a shape with part of it.

The way I do it is get a rectangle for the basic shape,
add to a region, make some other shapes and exclude form region.
make a texture brush, then fill region with the brush.

It works on three parts of what I am doing but on the third time it seems to
be tiling the image.
I don't know waht I am doing wrong. Is there a better way to define a
region and draw what parts of the rectangle(image) are left over--into it?

"Post your code."
 
have tried that but then nothing prints.

I define the rectangle as the right side of my working rectangle-desired
width, and of course the height of the working area.

like so
rectf(outerwidthpix-w,0,w,outerheight)
where w is the desired with of the image
add the rect to a region
Then I chop of the ends to make corners and as a graphics path, exclude that
path from the region, so that I am left with a trapezoid region.

Then I load my image into memory being the height and width and rotate then
create a texture brush, then fillregion with it.

Question. The region doesn't cause coordinates to become relative to it
does it? In other words 0,0 is not the top of that region if it was defined
by a rectf with a left,top of 100,0, correct?

when I try to create a texture brush with warpmode set to clamp which I
assume means start at left boundary and don't tile, and with a rect which is
the same rectangle I used for creating the region, it paints nothing.

Any ideas on that?

Is there any other way?

Shane
 
What I basically want to do is drawimage to the original rectangle but have
it clip the corners as defined by my region.

Is there a way to do this without a texture brush?

Shane
 
Back
Top