Interface And Graphics :: XNA Graphic With A Graphic?Jan 14, 2010
I'm trying to make a mini map for a 2d space shooter of mine; I've for the math down (I think) for when an item should appear on the mini map, but the problem is the graphic. As it stands, the graphic spills over the edge of the mini map graphic and disappears only when it's fully outside. I need it to crop the image, or at least not show it off the mini map graphic.I thought of using the sourcerect rectangle of the spritebatch.draw, but it seems to me that would only work for the right and bottom section, as I can adjust the size of the rectangle. I haven't tried this yet, but I will soon. Can the location of the source rectangle be changed in relation to the graphic that it is a part of being drawn so that I can use that to crop the left and top sides?