T
trullock
Hi,
I want to use GDI to rotate some text at an angle and output the
resultant image to the asp.net response stream.
I can do that all fine, however what I'm struggling with is trimming
the whitespace from the resultant image.
What im doing is creating a blank canvas image (of arbitrarily large
size) and doing a translate transform to the centre, then applying a
rotate transform, then writing my text.
What i want to do is trim all the whitespace from around the edges. Is
there some way i can determine the width and height of the text ive
written to the image (after the transform) ?
I know i can manually get the text dimensions before the rotate, then
use some trig to work out how high and wide it would be after rotating
it but thats a bit of a pain if theres some function that will do it
for me
Thanks for any advice
Andrew
I want to use GDI to rotate some text at an angle and output the
resultant image to the asp.net response stream.
I can do that all fine, however what I'm struggling with is trimming
the whitespace from the resultant image.
What im doing is creating a blank canvas image (of arbitrarily large
size) and doing a translate transform to the centre, then applying a
rotate transform, then writing my text.
What i want to do is trim all the whitespace from around the edges. Is
there some way i can determine the width and height of the text ive
written to the image (after the transform) ?
I know i can manually get the text dimensions before the rotate, then
use some trig to work out how high and wide it would be after rotating
it but thats a bit of a pain if theres some function that will do it
for me
Thanks for any advice
Andrew