Hi.
Before I started using GDI+ I normally would code traditional GDI and I had the same problem in both GDI as well as GDI+. I am trying to fill a rectangle at the very bottom of the window, all the way at the bottom, a section there. The problem is that the rectangle gets wrapped and messed up, it almost seems like it have been drawed just a little bit outside boundaries. 60 percent of the filling gets wrapped down below the remaining 40%. I don't recall how I solved it using GDI, I think I used a function called SetBrushOrgEx to align the drawing first, then it worked (If I recall correctly, I may not recall correctly)
It happens when I fill rectangles, it happens when I draw bitmaps and it also happens when I fill gradient rectangles. Do I need to align something anywhere before drawing?
How can I solve this in GDI+ ?
To show you what I mean, look at this rather funny painting I made:
Before I started using GDI+ I normally would code traditional GDI and I had the same problem in both GDI as well as GDI+. I am trying to fill a rectangle at the very bottom of the window, all the way at the bottom, a section there. The problem is that the rectangle gets wrapped and messed up, it almost seems like it have been drawed just a little bit outside boundaries. 60 percent of the filling gets wrapped down below the remaining 40%. I don't recall how I solved it using GDI, I think I used a function called SetBrushOrgEx to align the drawing first, then it worked (If I recall correctly, I may not recall correctly)
It happens when I fill rectangles, it happens when I draw bitmaps and it also happens when I fill gradient rectangles. Do I need to align something anywhere before drawing?
How can I solve this in GDI+ ?
To show you what I mean, look at this rather funny painting I made: