Relative Content

Tag Archive for c#imagewinformsrotationpicturebox

How to rotate an image in a picture box properly in C#

I want to create a encoder-like user input in a c# winForms application and i used a image for the input graphics (for now a temporary image). To rotate the picture, i updated a variable called ‘mouseDown’ when the mouse was pressed or released over the picture box. Now when i move the mouse up or down the image should rotate indicating a theoretical rotation of an encoder. And thats how far it works. with one problem: with every rotation step it does, the image gets more and more distorted. please note that i am fairly new to C# and so far mostly worked in java!