How to apply a magnifier with this QGlwidget?
I have read the code of Vector Deformation:
http://www.qtcentre.org/attachment.p...4&d=1308864257
This example magnifies the words in the widget using
Code:
path.setElementPositionAt(i,
x + flip * dx * len / m_radius,
y + flip * dy * len / m_radius);
Right now, what I want to do is: magnify the whole content under the magnifer but not just the words:
I have drawn the linkages and nodes using OpenGL in the QGLWidget:
http://www.qtcentre.org/attachment.p...5&d=1308864651
What I want to do is: magnify the linkages and nodes under the magnifier. However, this seems not as easy as the example Vector Deformation.
So, I want to get some suggestions from you.
Thanks a lot.
Re: How to apply a magnifier with this QGlwidget?
Quote:
Originally Posted by
superwave
I have read the code of Vector Deformation:
http://www.qtcentre.org/attachment.p...4&d=1308864257
This example magnifies the words in the widget using
Code:
path.setElementPositionAt(i,
x + flip * dx * len / m_radius,
y + flip * dy * len / m_radius);
Right now, what I want to do is: magnify the whole content under the magnifer but not just the words:
I have drawn the linkages and nodes using OpenGL in the QGLWidget:
http://www.qtcentre.org/attachment.p...5&d=1308864651
What I want to do is: magnify the linkages and nodes under the magnifier. However, this seems not as easy as the example Vector Deformation.
So, I want to get some suggestions from you.
Thanks a lot.
This is really a OpenGL question so my answer is also using OpenGL =) You need to move your eye position around in order to magnify the scene. It means YOU are moving towards to the nodes then it will creates "magnifier" effect.
Since you've drawn those nodes in OpenGL, I guess you know what I am talking about ;)
Regards,
Dong Back Kim