00001 #ifndef __PAINT_H__
00002 #define __PAINT_H__
00003
00004
00005
00006
00007
00008
00009
00010 #include "viasgui.h"
00011 #include "imagerw.h"
00012 #include "vectori.h"
00013
00014
00015 void ClearFrameCount( void );
00016
00017 unsigned GetFrameCount( void );
00018
00019
00020 typedef enum
00021 {
00022 vZOOM_0p078,
00023 vZOOM_0p1,
00024 vZOOM_0p2,
00025 vZOOM_0p3,
00026 vZOOM_0p4,
00027 vZOOM_0p5,
00028 vZOOM_0p7,
00029 vZOOM_1p0,
00030 vZOOM_1p5,
00031 vZOOM_2p0,
00032 vZOOM_3p0,
00033 vZOOM_4p0,
00034 vZOOM_5p0,
00035 vZOOM_6p25,
00036 vZOOM_8p33,
00037 vZOOM_12p5,
00038 vZOOM_16p7,
00039 vZOOM_25p0,
00040 vZOOM_33p3,
00041 vZOOM_50p0,
00042 vZOOM_66p7,
00043 vZOOM_100p0,
00044 vZOOM_200p0,
00045 vZOOM_300p0,
00046 vZOOM_400p0,
00047 vZOOM_500p0,
00048 vZOOM_600p0,
00049 vZOOM_700p0,
00050 vZOOM_800p0,
00051 vZOOM_1200p0,
00052 vZOOM_1600p0
00053 }
00054 vZOOM_FACTOR;
00055
00056 #define vZOOM_MIN vZOOM_0p078
00057 #define vZOOM_MAX vZOOM_1600p0
00058
00059 #define vZOOM_NUM_FACTORS ( ( vINT )vZOOM_1600p0 + 1 )
00060
00061
00062
00063
00064
00065 vVWS_VIEW_TYPE GetPaintingView( vVOID );
00066 vVOID SetPaintingView( vVWS_VIEW_TYPE viewType );
00067
00068
00069
00070
00071
00072
00073
00074
00075
00076
00077
00078
00079
00080
00081
00082
00083 vVOID SetPaintingUpperLeft( vCOORD left, vCOORD top );
00084
00085 Vector2i GetPaintingUpperLeft( vVWS_VIEW_TYPE viewType );
00086
00087
00088
00089 vBOOL IsPaintingGridVisible( vVOID );
00090
00091 vVOID SetPaintingGridVisible( vBOOL visible );
00092
00093
00094 int GetPaintingGridStep( void );
00095
00096 void SetPaintingGridStep( int step );
00097
00098
00099 #define GRID_SHOW_LINES 0x001
00100 #define GRID_SHOW_POINTS 0x002
00101
00102
00103 unsigned GetAllPaintingGridFlags( void );
00104
00105 void SetAllPaintingGridFlags( unsigned flags );
00106
00107
00108 void SetPaintingGridFlag( unsigned flag );
00109
00110 void ClearPaintingGridFlag( unsigned flag );
00111
00112 void ClearAllPaintingGridFlags( void );
00113
00114 void TogglePaintingGridFlag( unsigned flag );
00115
00116
00117 typedef enum
00118 {
00119 GRID_LINE_DOT,
00120 GRID_LINE_SOLID
00121 }
00122 GRID_LINE_STYLE;
00123
00124 GRID_LINE_STYLE GetPaintingGridLineStyle( void );
00125
00126 void SetPaintingGridLineStyle( const GRID_LINE_STYLE style );
00127
00128
00129 typedef enum
00130 {
00131 GRID_POINT_SMALL = 1,
00132 GRID_POINT_MEDIUM = 3,
00133 GRID_POINT_LARGE = 5,
00134 GRID_POINT_EXTRA_LARGE = 7
00135 }
00136 GRID_POINT_SIZE;
00137
00138 GRID_POINT_SIZE GetPaintingGridPointSize( void );
00139
00140 void SetPaintingGridPointSize( const GRID_POINT_SIZE size );
00141
00142
00143 COLORREF GetPaintingGridLineColor( void );
00144
00145 void SetPaintingGridLineColor( const COLORREF color );
00146
00147
00148 COLORREF GetPaintingGridPointColor( void );
00149
00150 void SetPaintingGridPointColor( const COLORREF color );
00151
00152
00153
00154
00155
00156 vVOID TranslatePaintingUpperLeft( Vector2i offset );
00157
00158
00159
00160
00161 vZOOM_FACTOR GetPaintingZoomFactor( vVOID );
00162 vVOID SetPaintingZoomFactor( vZOOM_FACTOR zoomFactor );
00163
00164
00165
00166
00167
00168 vBOOL ZoomInPainting( vVOID );
00169 vBOOL ZoomOutPainting( vVOID );
00170
00171
00172
00173
00174
00175 COLORREF ConvertPaintingColor( COLORREF color, vPIXEL_CODE_TYPE type );
00176
00177
00178
00179
00180
00181 COLORREF GetPaintingBkgrndColor( vVOID );
00182
00183
00184
00185
00186 vVOID SetPaintingBkgrndColor( COLORREF bkgrndColor, vPIXEL_CODE_TYPE type );
00187
00188
00189
00190
00191
00192 vVOID SetPaintingBkgrndColorEx( COLORREF bkgrndColor );
00193
00194
00195 COLORREF GetPaintingBorderColor( vVOID );
00196 vVOID SetPaintingBorderColor( COLORREF borderColor );
00197
00198
00199
00200
00201
00202
00203
00204
00205
00206
00207
00208
00209
00210
00211
00212
00213
00214
00215 Vector2i ClientToWorkspaceCoord( vCOORD x, vCOORD y );
00216 Vector2i WorkspaceToClientCoord( vCOORD x, vCOORD y );
00217
00218
00219
00220 vVOID ClientToWorkspaceRect( RECT *rect );
00221 vVOID WorkspaceToClientRect( RECT *rect );
00222
00223
00224
00225
00226 vVOID BeginPainting( vVOID );
00227 vVOID EndPainting( vVOID );
00228
00229
00230
00231
00232
00233 typedef vVOID ( *PaintingHookProc )( vVOID );
00234
00235 vVOID SetPaintingHookProc( PaintingHookProc proc );
00236 vVOID ClearPaintingHookProc( vVOID );
00237
00238
00239 vVOID ResizePainting( WPARAM wParam );
00240
00241
00242
00243 vVOID PaintWorkspace( vVOID );
00244
00245
00246
00247 vVOID SwapPaintWorkspace( vVOID );
00248
00249
00250
00251 vVOID PaintMainWindowTitle( vVOID );
00252
00253
00254
00255
00256
00257
00258 vVOID FitWorkspaceToScreen( vVOID );
00259
00260
00261 vVOID FitStackToScreen( vHIMAGESTACK hStack );
00262
00263
00264 #endif
00265