Visualization Library 2.0.0-b5

A lightweight C++ OpenGL middleware for 2D/3D graphics

VL     Star     Watch     Fork     Issue

[Download] [Tutorials] [All Classes] [Grouped Classes]
Macros | Typedefs | Enumerations
cf2fixed.h File Reference

Go to the source code of this file.

Macros

#define CF2_Fixed   CF2_F16Dot16
 
#define CF2_FIXED_MAX   ( (CF2_Fixed)0x7FFFFFFFL )
 
#define CF2_FIXED_MIN   ( (CF2_Fixed)0x80000000L )
 
#define CF2_FIXED_ONE   0x10000L
 
#define CF2_FIXED_EPSILON   0x0001
 
#define cf2_intToFixed(i)   ( (CF2_Fixed)( (FT_UInt32)(i) << 16 ) )
 
#define cf2_fixedToInt(x)   ( (FT_Short)( ( (FT_UInt32)(x) + 0x8000U ) >> 16 ) )
 
#define cf2_fixedRound(x)   ( (CF2_Fixed)( ( (x) + 0x8000 ) & 0xFFFF0000L ) )
 
#define cf2_floatToFixed(f)   ( (CF2_Fixed)( (f) * 65536.0 + 0.5 ) )
 
#define cf2_fixedAbs(x)   ( (x) < 0 ? -(x) : (x) )
 
#define cf2_fixedFloor(x)   ( (CF2_Fixed)( (x) & 0xFFFF0000L ) )
 
#define cf2_fixedFraction(x)   ( (x) - cf2_fixedFloor( x ) )
 
#define cf2_fracToFixed(x)
 

Typedefs

typedef FT_Int32 CF2_Frac
 
typedef enum CF2_NumberType_ CF2_NumberType
 

Enumerations

enum  CF2_NumberType_ { CF2_NumberFixed, CF2_NumberFrac, CF2_NumberInt }
 

Macro Definition Documentation

◆ CF2_Fixed

#define CF2_Fixed   CF2_F16Dot16

◆ CF2_FIXED_EPSILON

#define CF2_FIXED_EPSILON   0x0001

Definition at line 55 of file cf2fixed.h.

Referenced by cf2_blues_init().

◆ CF2_FIXED_MAX

#define CF2_FIXED_MAX   ( (CF2_Fixed)0x7FFFFFFFL )

Definition at line 52 of file cf2fixed.h.

Referenced by cf2_blues_init().

◆ CF2_FIXED_MIN

#define CF2_FIXED_MIN   ( (CF2_Fixed)0x80000000L )

Definition at line 53 of file cf2fixed.h.

◆ CF2_FIXED_ONE

#define CF2_FIXED_ONE   0x10000L

Definition at line 54 of file cf2fixed.h.

◆ cf2_fixedAbs

#define cf2_fixedAbs (   x)    ( (x) < 0 ? -(x) : (x) )

Definition at line 68 of file cf2fixed.h.

Referenced by cf2_blues_init(), and cf2_glyphpath_init().

◆ cf2_fixedFloor

#define cf2_fixedFloor (   x)    ( (CF2_Fixed)( (x) & 0xFFFF0000L ) )

Definition at line 70 of file cf2fixed.h.

◆ cf2_fixedFraction

#define cf2_fixedFraction (   x)    ( (x) - cf2_fixedFloor( x ) )

Definition at line 72 of file cf2fixed.h.

◆ cf2_fixedRound

#define cf2_fixedRound (   x)    ( (CF2_Fixed)( ( (x) + 0x8000 ) & 0xFFFF0000L ) )

Definition at line 64 of file cf2fixed.h.

Referenced by cf2_blues_capture(), and cf2_blues_init().

◆ cf2_fixedToInt

#define cf2_fixedToInt (   x)    ( (FT_Short)( ( (FT_UInt32)(x) + 0x8000U ) >> 16 ) )

Definition at line 62 of file cf2fixed.h.

◆ cf2_floatToFixed

#define cf2_floatToFixed (   f)    ( (CF2_Fixed)( (f) * 65536.0 + 0.5 ) )

Definition at line 66 of file cf2fixed.h.

Referenced by cf2_blues_init(), and cf2_glyphpath_init().

◆ cf2_fracToFixed

#define cf2_fracToFixed (   x)
Value:
( (x) < 0 ? -( ( -(x) + 0x2000 ) >> 14 ) \
: ( ( (x) + 0x2000 ) >> 14 ) )
GLint GLint GLint GLint GLint x

Definition at line 74 of file cf2fixed.h.

Referenced by cf2_stack_getReal(), and cf2_stack_popFixed().

◆ cf2_intToFixed

#define cf2_intToFixed (   i)    ( (CF2_Fixed)( (FT_UInt32)(i) << 16 ) )

Typedef Documentation

◆ CF2_Frac

typedef FT_Int32 CF2_Frac

Definition at line 49 of file cf2fixed.h.

◆ CF2_NumberType

Enumeration Type Documentation

◆ CF2_NumberType_

Enumerator
CF2_NumberFixed 
CF2_NumberFrac 
CF2_NumberInt 

Definition at line 80 of file cf2fixed.h.