#include "camtypes.h"
#include "bmpexprw.h"
#include "prvwmenu.h"
#include "ccdc.h"
#include "dlgcol.h"
#include "grnddib.h"
#include "nodebmp.h"
#include "dlgview.h"
#include "keypress.h"
#include "csrstack.h"
#include "fileutil.h"
#include "bitfilt.h"
#include "statline.h"
#include "giffiltr.h"
#include "exjpeg.h"
#include "imgmgkft.h"
#include "progress.h"
#include "sgliboil.h"
#include "backgrnd.h"
#include "bmpexdoc.h"
#include "prvwflt.h"
#include "bmapprev.h"
#include "bitmpinf.h"
Go to the source code of this file.
Defines | |
#define | new CAM_DEBUG_NEW |
#define | BUBBLE_TIME 800 |
Functions | |
DECLARE_SOURCE ("$Revision: 1635 $") | |
void | FixZoomFactor (UINT32 *pZoomFactor) |
Searches the list of the pre-defined zoom factors for the one nearest to the current one. If the difference between them is less then 2% the current zoom factor is replaced by the pre-defined one. This is done to avoid things like zooming in from 99% to 100%, and also fixes problems with rounding errors in the greater zoom factors. | |
Variables | |
const UINT32 | MIN_ZOOM = 1 |
const UINT32 | MAX_ZOOM = 25601 |
const UINT32 | ZOOMS [] = {MIN_ZOOM,10,25,50,75,100,200,500,1000,2000,4000,8000,16000,MAX_ZOOM} |
const INT32 | NUM_ZOOMS = 14 |
|
Definition at line 148 of file bmpexprw.cpp. |
|
Definition at line 136 of file bmpexprw.cpp. |
|
|
|
Searches the list of the pre-defined zoom factors for the one nearest to the current one. If the difference between them is less then 2% the current zoom factor is replaced by the pre-defined one. This is done to avoid things like zooming in from 99% to 100%, and also fixes problems with rounding errors in the greater zoom factors.
Definition at line 308 of file bmpexprw.cpp. 00309 { 00310 UINT32 ZoomFactor = *pZoomFactor; 00311 00312 if (ZoomFactor < MIN_ZOOM) 00313 *pZoomFactor = MIN_ZOOM; 00314 else 00315 if (ZoomFactor > ZOOMS[NUM_ZOOMS - 1]) 00316 *pZoomFactor = ZOOMS[NUM_ZOOMS - 1]; 00317 else 00318 for (INT32 i=0; i<NUM_ZOOMS; i++) 00319 { 00320 // the calculation is done times 1000 decause of the integer arithmetic 00321 INT32 Error = 50 * ZoomFactor; 00322 if ((1000 * ZoomFactor - Error < 1000 * ZOOMS[i]) && 00323 (1000 * ZoomFactor + Error > 1000 * ZOOMS[i])) 00324 { 00325 *pZoomFactor = ZOOMS[i]; 00326 return; 00327 } 00328 } 00329 }
|
|
Definition at line 140 of file bmpexprw.cpp. |
|
Definition at line 139 of file bmpexprw.cpp. |
|
Definition at line 142 of file bmpexprw.cpp. |
|
Definition at line 141 of file bmpexprw.cpp. |