المساعد الشخصي الرقمي

مشاهدة النسخة كاملة : SQLGeometry as clip path?



C# Programming
10-29-2013, 02:40 PM
Anybody have any sample code to take a SQLGeometry and use it to clip an image?

I have a SQLGeometry cell in the database that tells me the outline of a shape. I have a rectangular image that I want to clip to that shape.

I.e. I have an Image object A thats 100 x 100 and an Image object B thats 90 x 90. I have a SQLGeometry object that tells me the real shape of Image object B. I want to draw Image object B on Image object A, but clipped to the SQLGeometry object and have the ability to save it out as a b&w TIFF.

I don't care if its done with standard C# graphics or WPF graphics. Performance is most important, so if I can utilize the hardware acceleration of WPF to do it, that'll be great. The only requirements are:

1) Image object B comes from an HTTP stream
2) Need to be able to draw Image object B on Image object A
3) Need to be able to draw additional text on Image object A