0

Hi is there a preferred methodology for zoom and panning in a C/C++ program. Do you use vectors and matrices? If so how do I get started?

thanks

  • 1
    What graphics API are you planning to use? C++ doesn't have any standard graphics libraries built in to the language, and different APIs work differently, so without knowing which 3rd-party API you will be using, this question will be impossible to answer. – Jeremy Friesner Feb 17 '15 at 04:27
  • Also what kind of App you writing? it is quite different for 2D/3D ... type of views etc... For 2D I mostly use mouse wheel and center zooming around mouse cursor so you can also pan with zooming. right button is for pan (on mouse move/up/down event) left for selection (selection from left to right selects all inside, from right to left all inside and intersecting) look here http://stackoverflow.com/a/20924609/2521214 – Spektre Feb 17 '15 at 07:28
  • to implement zoom/pan you need add it to draw of all objects or to view transform matrix or to what ever you use so without more specifications is hard to answer ... – Spektre Feb 17 '15 at 07:41
  • thanks.... I will be using Win API and it will be both 2d and 3d vector drawing app. I am familiar with WINapi and MFC mapping modes to implement zooming but I sort of wanted to make that part of the program platform independent in case I ever have to port it to Linux or something. – James Rockford Feb 17 '15 at 15:46

0 Answers0