what should be code for resizing the drawn image in pixels
-
what should be code for resizing the image drawn(zoom in and zoom out)drawing in pixels
Problems are to be solve
kindd wrote:
code for resizing the image drawn(zoom in and zoom out)
Redraw the image with desired size. Say you have drawn the image 50,50 - 100,100 -- then to zoom in, draw the same image from 40,40 - 110,100 -- to zoom out, draw the same image from 60,60 - 90,90 You can use, BitBlt or StretchBlt from CDC class or DrawImage from GDI+ Image Class Hope i understood your question...
Do your Duty and Don't expect the Result
-
kindd wrote:
code for resizing the image drawn(zoom in and zoom out)
Redraw the image with desired size. Say you have drawn the image 50,50 - 100,100 -- then to zoom in, draw the same image from 40,40 - 110,100 -- to zoom out, draw the same image from 60,60 - 90,90 You can use, BitBlt or StretchBlt from CDC class or DrawImage from GDI+ Image Class Hope i understood your question...
Do your Duty and Don't expect the Result
-
for a map to view clear by zoom in and zoom out, any thing further that helps in coding?
nill
kindd wrote:
map to view clear by zoom in and zoom out
Use CDC::StretchBlt Say pBitmap is your map and dc is your DC then,
CDC cdc; cdc.CreateCompatibleDC(&dc);
CBitmap* pOldBitmap = cdc.SelectObject(pBitmap);
dc.StretchBlt(x, y, width, height, &cdc, sx, sy, swidth, sheight, SRCCOPY);
cdc.SelectObject(pOldBirmap);
cdc.DeletcDC();Here x,y,width,height are your destination rect, it will remain same for both zoom in and zoom out.But sx,sy,swidth,sheight are your source and it will vary for zoom in and zoom out and the specified source rect is what you have to zoom in/out...
Do your Duty and Don't expect the Result