Source codeDownload: codename. distortedimage. v0.90
A Silverlight control that I made can achieve arbitrary image deformation.CodeI will not post it. If you want to see it, you can download the source code and then browse it. I still add some comments to it. I did not perform too many tests on controls, but there are still many problems, but I have not detected them. I hope you can help me to test it so that I can improve this control. Thank you for choosing here.
The test example is as follows:
The specific usage is as follows:
It is best to implement the imageloaded event when using the control, so that you can obtain the accurate values of each attribute in the Event Callback Function.
// Test the gridline painting. Generally, this parameter is not used.
Public System. Windows. Media. Brush gridstroke { Set ; Get ;}
// test the grid line width. Generally, this parameter is not used.
Public double gridstrokethickness { set ; Get ;}
// Transparency of the original image. The default value is 0. Generally, this parameter is not used.
Public double originalimageopacity { set ; Get ;}
// length of the original image
Public double originalimageheight { set ; Get ;}
//Width of the original image.
Public DoubleOriginalimagewidth {Set;Get;}
//The precision of image display.
PublicCodename. Controls. Precision precision {Set;Get;}
//The irregular Quadrilateral of the image.
PublicCodename. Controls. quadrilateral {Set;Get;}
//Obtains or sets the displayed image.
PublicSystem. Windows. Media. imagesource source {Set;Get;}
//This event is triggered when the image fails to be loaded.
Public EventSystem. eventhandler<Predictionroutedeventargs>Imagefailed;
//This event is triggered when the image is fully loaded.
Public EventSystem. eventhandler imageloaded;
statement: This code can be used free of charge. If this code is used for commercial purposes, it must be approved by me. Otherwise, it is deemed as infringement.