Click here to Skip to main content
15,891,253 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
how to give skew effect to picture box picture ?
Posted
Comments
Ralf Meier 15-Dec-15 3:44am    
Basicly all necessary is told with the solution from SA. Perhaps you have to create a customized Picturebox.
But only for my interest : what Kind of skewing / transformation do you want to realize ?

1 solution

You can easily do it, but it's very unlikely that you have to do it with PictureBox. This control is very redundant and is not helpful if you do anything non-static, interactive, animated, something with transform, and so on.

You may need to skew the bitmap image itself, not a control, or you need to produce skew directly on screen. Then all you need is this:
https://msdn.microsoft.com/en-us/library/system.drawing.graphics.transform%28v=vs.110%29.aspx[^],
https://msdn.microsoft.com/en-us/library/system.drawing.drawing2d.matrix(v=vs.110).aspx[^].

If you don't get if right away, it means that, most likely, the same misconception which caused you to ask about PictureBox prevents it. Then you need to take a longer learning route and understand the whole topic of graphics rendering. I explained it all in detain in my past answers:
Append a picture within picturebox[^],
How do I clear a panel from old drawing[^],
draw a rectangle in C#[^],
What kind of playful method is Paint? (DataGridViewImageCell.Paint(...))[^],
capture the drawing on a panel[^],
Drawing Lines between mdi child forms[^].

—SA
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900