471,123 Members | 857 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,123 software developers and data experts.

FillRectangle and TextBrush

Hello,

I'm trying to fill a rectangle with a tiled image, the problem is that
Grpahics.FillRectangle (TextBrush,..,..,..,..) doesn't draw the tiled image
from the origin, so the result was this:

http://www.yehiaeg.com/test.gif

as you can see the right and bottom tile are not drawn from the tile origin.

Thanks
Yehia

Oct 9 '06 #1
3 1451
hi,
Why don't you use the DrawBitmap method? There's an overload that allow you
to specify the rectangle of the image you want to use and the destination
rectangle.

I hope it helps

ThunderMusic

"Yehia A.Salam" <ye*****@hotmail.comwrote in message
news:79**********************************@microsof t.com...
Hello,

I'm trying to fill a rectangle with a tiled image, the problem is that
Grpahics.FillRectangle (TextBrush,..,..,..,..) doesn't draw the tiled
image from the origin, so the result was this:

http://www.yehiaeg.com/test.gif

as you can see the right and bottom tile are not drawn from the tile
origin.

Thanks
Yehia

Oct 10 '06 #2
sorry for the error... I meant DrawImage(...) ;)
"ThunderMusic" <No*************************@NoSpAm.comwrote in message
news:uv**************@TK2MSFTNGP02.phx.gbl...
hi,
Why don't you use the DrawBitmap method? There's an overload that allow
you to specify the rectangle of the image you want to use and the
destination rectangle.

I hope it helps

ThunderMusic

"Yehia A.Salam" <ye*****@hotmail.comwrote in message
news:79**********************************@microsof t.com...
>Hello,

I'm trying to fill a rectangle with a tiled image, the problem is that
Grpahics.FillRectangle (TextBrush,..,..,..,..) doesn't draw the tiled
image from the origin, so the result was this:

http://www.yehiaeg.com/test.gif

as you can see the right and bottom tile are not drawn from the tile
origin.

Thanks
Yehia


Oct 10 '06 #3
I can do that but it's not the problem, the problem is the tile handling

<DIV>&quot;ThunderMusic&quot; &lt;No*************************@NoSpAm.com&gt;
wrote in message news:%2****************@TK2MSFTNGP03.phx.gbl...</DIV>>
sorry for the error... I meant DrawImage(...) ;)
>

"ThunderMusic" <No*************************@NoSpAm.comwrote in message
news:uv**************@TK2MSFTNGP02.phx.gbl...
>hi,
Why don't you use the DrawBitmap method? There's an overload that allow
you to specify the rectangle of the image you want to use and the
destination rectangle.

I hope it helps

ThunderMusic

"Yehia A.Salam" <ye*****@hotmail.comwrote in message
news:79**********************************@microso ft.com...
>>Hello,

I'm trying to fill a rectangle with a tiled image, the problem is that
Grpahics.FillRectangle (TextBrush,..,..,..,..) doesn't draw the tiled
image from the origin, so the result was this:

http://www.yehiaeg.com/test.gif

as you can see the right and bottom tile are not drawn from the tile
origin.

Thanks
Yehia


Oct 10 '06 #4

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

5 posts views Thread by MFC | last post: by
8 posts views Thread by scorpion53061 | last post: by
2 posts views Thread by Richard Wilde | last post: by
3 posts views Thread by Eric Moreau | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.