Click here to Skip to main content
15,881,281 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I am using canvas with zooming functionality check here
As i am new to canvas and the code is pulled from internet i have not completely understood it
Please help me out with code to achieve following changes
1. size of canvas should change according to image size to avoid drawing out image when zoomed out
2. Image should get drawn from 0,0 position of canvas instead of middle of canvas
3. When image is zoomed in canvas also grow in size to view complete image.
Posted
Comments
[no name] 8-Oct-14 7:32am    
You need to go to a site like www.vworker.com so that you could hire a programmer to do this work for you.
[no name] 9-Oct-14 0:27am    
Start your work, face the issues, try to solve by yourself, Google for answers, If you are not still able to solve, ask here!.
Dexter11 9-Oct-14 3:53am    
Pardon me for my laziness..I worked on my requirements and met them finally...
For keeping the origin static to 0,0 i removed the translate before drawing the image however the position of my drawing(pencil tool) is not maintained after zooming the canvas.If i put translate method image is not drawn from 0,0 and if its removed the drawings position is not maintained...crap
Please check my updated code at http://turbofeedback.com/account/demo.htm

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