Brad,
This article is very useful to me how Zoom or scale the contents of the view. In this article it is assumed that positive Y goes down. But in my case positive y is towards up. I have tried changing viewport extent to {1,-1} and window extent to {1,1} and viewport origing to {0, 600}. I drawn a rectangle with {100,100, 500,500} units. When scroll position is chnaged rectangle is flickering(portion is drawing). Is there any way to overcome this?
Reply
Originally posted by: arasakumaran
I have a problem with setting font sizes & zooming views. I have different text boxes in my view - each with possible different font settings (I store LOGFONT data for each box). My Draw program draws the boxes and prints the text - all using logical coordinates. When I zoom out, the box paints correctly (becoming smaller as I zoom out), but the text inside does not. The fonts do not get correspondingly smaller. Do I need to change the height (lfHeight of the LOGFONT structure) of the font? - I thought it was in logical units.
Originally posted by: Paulo Gomes
Hi,
I need an opinion/suggestion about a problem.
I've got an aplication with zooming capabilities (using MM_ANISOTROPIC map mode). The problem is, if i draw an horizontal line, when zooming it, the line's width is not consistent, for example:
Zoom In : line width = 2 pix
Zoom In : line width = 2 pix
Zoom In : line width = 3 pix // The problem is here
Zoom In : line width = 2 pix // the width should be always growing
Zoom In : line width = 3 pix
Zoom In : line width = 3 pix
Zoom In : line width = 3 pix
Zoom In : line width = 4 pix
Zoom In : line width = 4 pix
I've read that the Anisotropic map mode has some rouding problems. Can someone help me?
ReplyOriginally posted by: Allie
well, i am new to VC, the problem i am having is how to change the property of CDialogBar. i have already developed CDialogBarin my application using as a tool bar which have a CListBox.And now i want to add new elements to it,such as a line,or changing the background......But i did not know how to solve it. i would be greatful if any of you tell me in few steps what to do and how to include the funtinality
you may mail me at iamahorse2003@yahoo.com.cn
Originally posted by: Shahzad
well, i am new to VC, the problem i am having is how to add zooming functionality even after using your class. i have already developed my application using CScrollView and now i am unable to add zooming functinoality to my class even after reading the artical n using cZoomView. i would be greatful if any of you tell me in few steps what to do and how to include the funtinality
you may mail me at sam19_@hotmail.com or iamshahzad@msn.com
regards
sam
Originally posted by: Sabotto Massimo
Great work!
Just a little problem: it seems that print preview and print (of course) does not work!
Preview is displayed as a very little stretched image if made on a A4 landscape sheet, otherwise scaled to fit (and stretched) if on a A4 portrait sheet.:(
Does anyone know why? Any suggestion on correcting this bug?(isn't it?).
Thank you in advance.
ReplyOriginally posted by: Marcel
Hi,
I want to add zoom capabilities to a webbrowser control. Any ideas on how to do this ? I know how to zoom pictures, but I want to keep the focus on the browser and continue working with another scale.
Any ideas how to do this ??
Regards,
Marcel
Originally posted by: Michele
void CScrollView::ScrollToDevicePosition(POINT ptDev)
// Note: ScrollToDevicePosition can and is used to scroll out-of-range
int xOrig = GetScrollPos(SB_HORZ);
What can I do to avoid this behavior?
Thanks a lot!
Sometimes I have this assertion when I change the size:
{
ASSERT(ptDev.x >= 0);
ASSERT(ptDev.y >= 0);
// areas as far as CScrollView is concerned -- specifically in
// the print-preview code. Since OnScrollBy makes sure the range is
// valid, ScrollToDevicePosition does not vector through OnScrollBy.
SetScrollPos(SB_HORZ, ptDev.x);
int yOrig = GetScrollPos(SB_VERT);
SetScrollPos(SB_VERT, ptDev.y);
ScrollWindow(xOrig - ptDev.x, yOrig - ptDev.y);
}
Bye
Originally posted by: fernando
Anyone had implemented a sort of offscreen drawing in CZoomView?
ReplyOriginally posted by: megadeth
hi there,
My program generates a graph from up to 10000 by 10000 data.
To draw it again and again while do the zooming is going to take long time since it takes a while to do the calculation.
Is it possible to use this CZoomView class for me to be able to use its capabilities?
How to draw it logically?
If you have similar project, I would appreciate it if you can share the thought.
thanks in advance,
M