Problem in tiling image starting at different height using TextureBrush in C#

前端 未结 3 1991
野的像风
野的像风 2021-01-20 21:28

I am trying to tile an image(16x16) over a Rectangle area of dimensions width=1000, height=16 using TextureBrush to get a strip like UI.

 Rectangle myIconD         


        
3条回答
  •  小蘑菇
    小蘑菇 (楼主)
    2021-01-20 22:07

    using TransalteTransform() to set up start point,if u do not do this, tiling would have some offset, to corect this, like below:

    brush.TranslateTransform(0,50);
    

提交回复
热议问题