c# - trim empty space on metafile side -
i creating in-memory metafile programmatically - example line charts. use graphics.setclip(..) , graphics.resetclip(..) set max/min of x/y axis = limit scope of drawn datapoints.
the result fine, except of 1 thing: resulting image contains empty space on side(s). empty space belongs entities trimmed (hidden) clippingregion.
in other words: clippingregion hides entities outside region, not affect size of resulting metafile. metafile.getbounds() returns same result regardless set clippingregion or not.
i need export resulting metafile ms word, disc, sw. useless these empty spaces on sides... :-(
how can solved? in advance
i found solution in method
graphics.drawimage(image, sourcerectangle, destrectangle, graphicsunit)
https://msdn.microsoft.com/en-us/library/ms142040(v=vs.110).aspx
Comments
Post a Comment