Codename. distortedimage-arbitrary image deformation in Silverlight

Source: Internet
Author: User

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.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.