⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 cf_const.h

📁 windRiver提供的的Zinc5.3完整源码,文档非常齐全
💻 H
字号:
//////////////////////////////////////
// START of File: CF_CONST.H
//////////////////////////////////////

#ifndef CF_CONST_H          // Avoid multiple #includes...
#define CF_CONST_H  TRUE    // ...holds to a terminal #endif below...

//====================================================================
//
// COPYRIGHT NOTICE:  This code is protected by Copyright!
//
// Copyright (c) 1994, 1995, 1996, 1997 by DPC Technology.
// All rights reserved. 
//
// See files "cf_copyr.h" and "cf_licen.h" for details of 
// copyright and license specifications, and contact information.
//
//====================================================================

//
// Master Header File Listing:
//
//#include  <api/include/cf_const.h>
// Chart Framework "Shared Constant" definitions:
//

// Define generic view parameters used as default input for
// view dialogs, default view angles for the kernel, etc.
#define CF_DEFAULT_X_ANGLE      20.0
#define CF_DEFAULT_Y_ANGLE      -45.0   // Yes -- this IS legit!
#define CF_DEFAULT_Z_ANGLE      0.0
#define CF_DEFAULT_P_RATIO      0.0
        // "P-Ratio" is user's "Perspective Ratio",
        // typically a double or float value

#define CF_MAX_P_RATIO_PERCENT      100 // These should be ints that
#define CF_NORMAL_P_RATIO_PERCENT   50  // can be cast to doubles if
#define CF_ZERO_P_RATIO_PERCENT     0   // neccessary...
        // "P-Ratio Percent" values are used by Chart Dialog/Control
        // objects to set up (usually negatively indexed) dialog/control
        // scrollbars that control a "P-Ratio" value, which is used
        // to generate the kernel's "real" perspective value

#define CF_DEFAULT_HW_RATIO         1.0
#define CF_DEFAULT_DH_RATIO         0.5

#define CF_DEFAULT_TOP_MARGIN       60
#define CF_DEFAULT_BOTTOM_MARGIN    60
#define CF_DEFAULT_LEFT_MARGIN      100
#define CF_DEFAULT_RIGHT_MARGIN     100
        // Units in Twips (20 twips/point, 72 points/inch)
        // to yield default margins

#define CF_DEFAULT_TOP_MARGIN_ZOOM      30
#define CF_DEFAULT_BOTTOM_MARGIN_ZOOM   30
#define CF_DEFAULT_LEFT_MARGIN_ZOOM     50
#define CF_DEFAULT_RIGHT_MARGIN_ZOOM    50

// Define constants used in geometric transformations:
#define CF_PI           3.141592653
#define CF_2_PI         6.283185307
#define CF_PI_OVER_180  0.017453292     // == ( 3.141592653 / 180.0 )
#define CF_180_OVER_PI  57.29577951     // == ( 180.0 / 3.141592653 )

// Define constants used in geometric calculations:
#define     CF_NUM_ZERO_IF_LT   0.001   // or alternatively 1.0e-3
            // Intended to be used in very specific circumstances
            // where it is appropriate to round very tiny doubles
            // to zero, as per this sample usage (from the calc3DBoxETC()
            // member method of one of the "chart-engine" objects:
            // if ( fabs( dMyValue ) < CF_NUM_ZERO_IF_LT ) dMyValue = 0.0;

// The ChartFolio framework can use assertion testing!
// To turn assertion testing on, uncomment the line below:
#define 	CF_ASSERT_DVALS	    TRUE
#ifdef	    CF_ASSERT_DVALS	    // We will use asserts() of the form:
#include    <math.h>			// assert( fabs( dVal ) > CF_NUM_ZERO_IF_LT ));
#include	<assert.h>			// throughout the framework...
#endif

#endif      // Terminates #include re-definition protection

//////////////////////////////////////
// END of File: CF_CONST.H
//////////////////////////////////////

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -