FillRectangle Image Tiling issue

Apr 29 2010 9:17 AM
I am tiling an image on the far right hand side of my windows form. I am tiling on the Y axis and it all works fine except for the fact that the image seems to have been shifted to the left. I will use an illustration below.

The image should look like this:

------|

but when drawn it looks like this
--|----

it has shifted the image along the x axis and tiled it on that one as well? I am filling the rectangle as such:

t = new TextureBrush(rightImage);
g.FillRectangle(t, new Rectangle(this.Width - right.Width, topRight.Height, right.Width, this.Height - botRight.Height));

i simply want the image to only tile on the y axis?

I have attached a screenshot in the zip file.

Cheers


Attachment: PROBLEMS.zip

Answers (1)