We settled on the code sets
on the blelow:
Lots of code:
1. bruch_functions_all
2. initialize_parameter();
model of cad drawing
1. Circle
2. Parabora parametric
3. Scale of models
*
- |
- |
- |
- |
- |
- |
- |
- |
- |
.\jackson_animation_focus_003.cpp File modified time Wed Jan 03 23:24:52 2024
0001 #include <stdlib.h> 0002 #include <stdio.h> 0003 0004 #include <windows.h> 0005 0006 struct struct_animation_focus { 0007 int start_x; 0008 int start_y; 0009 int width; 0010 int height; 0011 }; 0012 0013 struct struct_animation_focus_frame { 0014 void* draw_number; 0015 void* draw_effects; 0016 void* draw_model_frame; 0017 void* draw_grid; 0018 void* initialize_parameters_all; 0019 int **canvas; 0020 int thread_sleep_real_animation = 33; 0021 int thread_animation_times = 60; 0022 int initialized = 0; 0023 struct_animation_focus focus; 0024 }; 0025 0026 typedef struct_animation_focus_frame ANIMATION_FOCUS_FRAME; 0027 typedef struct_animation_focus_frame ANIMATION_FOCUS; 0028 0029 ANIMATION_FOCUS_FRAME *p_jackson; 0030 ANIMATION_FOCUS_FRAME m_jackson; 0031 0032 0033 int call_draw_fucus_canvas_buffer_only () ; 0034 int call_draw_canvas_all (); 0035 DWORD WINAPI Animation_5times_thread_canvas_focus_validate ( LPVOID hdc ) ; 0036 0037 void* draw_number (); 0038 void* draw_effects (); 0039 void* draw_model_frame (); 0040 void* draw_grid (); 0041 void* initialize_parameters_all () ; 0042 0043 int bruch_functions_all (); 0044 0045 // 0046 int bruch_functions_all () { 0047 p_jackson = &m_jackson; 0048 p_jackson->draw_number = (void*)draw_number; 0049 p_jackson->draw_effects =(void*) draw_effects; 0050 p_jackson->draw_model_frame = (void*)draw_model_frame; 0051 p_jackson->draw_grid = (void*)draw_grid; 0052 0053 p_jackson->initialize_parameters_all= (void*)initialize_parameters_all; 0054 0055 return 0; 0056 } 0057 0058 // 0059 void* initialize_parameters_all () { 0060 int i, j; 0061 0062 for ( i= p_jackson->focus.start_x; i<p_jackson->focus.width; i++ ) { 0063 p_jackson->canvas[i] = (int*)malloc (sizeof(int) + p_jackson->focus.height); 0064 if ( p_jackson->canvas[i] == NULL ) { 0065 printf("p_jackson->canvas[%d]", i ); 0066 exit(-1); 0067 } 0068 } 0069 0070 0071 for ( j= p_jackson->focus.start_y; j<p_jackson->focus.height; j++ ) 0072 for ( i= p_jackson->focus.start_x; i<p_jackson->focus.width; i++ ) { 0073 p_jackson->canvas[i][j] = 0;; 0074 } 0075 0076 p_jackson->thread_sleep_real_animation = 33; 0077 p_jackson->thread_animation_times = 60; 0078 // return (void*); 0079 } 0080 0081 void* draw_number () { 0082 // return (void*); 0083 } 0084 0085 void* draw_effects () { 0086 // return (void*); 0087 } 0088 0089 void* draw_model_frame () { 0090 // return (void*); 0091 } 0092 0093 void* draw_grid () { 0094 // return (void*); 0095 } 0096 0097 0098 // 0099 // Draw to focus canvas buffer only 0100 int call_draw_fucus_canvas_buffer_only () { 0101 int a; 0102 static int model_changed = 0; 0103 0104 model_changed = 1; 0105 model_changed = model_changed % 4 + 1; 0106 0107 switch ( model_changed ) { 0108 case 0: 0109 break; 0110 case 1: 0111 p_jackson->draw_number; 0112 break; 0113 case 2: 0114 p_jackson->draw_effects; 0115 break; 0116 case 3: 0117 p_jackson->draw_model_frame; 0118 break; 0119 case 4: 0120 p_jackson->draw_grid; 0121 break; 0122 } 0123 0124 return 0; 0125 } 0126 0127 0128 // 0129 // 0130 // 0131 int call_draw_canvas_all () { 0132 int i, j; 0133 0134 for ( j= p_jackson->focus.start_y; j<p_jackson->focus.height; j++ ) 0135 for ( i= p_jackson->focus.start_x; i<p_jackson->focus.width; i++ ) { 0136 p_jackson->canvas[i][j]; 0137 } 0138 0139 return 0; 0140 } 0141 0142 // 0143 // 0144 // 0145 DWORD WINAPI Animation_5times_thread_canvas_focus_validate ( LPVOID hdc ) { 0146 int i, a; 0147 0148 if ( p_jackson->initialized != 1 ) { 0149 p_jackson->initialize_parameters_all; 0150 p_jackson->initialized = 1; 0151 } 0152 0153 // 0154 for ( i = 0; i<p_jackson->thread_animation_times; i++ ) { 0155 a = call_draw_fucus_canvas_buffer_only (); 0156 a = call_draw_canvas_all (); 0157 Sleep (p_jackson->thread_sleep_real_animation); 0158 } 0159 } 0160 0161 0162
|
- |
- |
- |
* In file jackson_animation_focus_003.cpp.txt line 0073 and double semi-colon: In file winmainthread_005a_000.cpp, there is no includion "image_layer_001.h": In file winmainthread_005a_003.cpp, there is no includion "image_layer_001.h": * But they were compiled well. And, text file changed after their compilation.
Error:
Memories Allocation: We could allocate the image buffers at the date of 20240110.
|
- |
- |
- |
- |
- |
- |