#include <pngprgrs.h>
Public Member Functions | |
CC_DECLARE_MEMDUMP (PNGProgressBar) | |
PNGProgressBar (String_64 *ProgressString, bool new_interlaced, UINT32 new_height) | |
Constructor. Sets show_progress_bar. If ProgressString != NULL, starts prorgress bar. Scope: Public. | |
~PNGProgressBar () | |
Constructor. Sets show_progress_bar. If ProgressString != NULL, starts prorgress bar. Scope: Public. | |
void | UpdateCallback (png_structp png_ptr, png_uint_32 row_number, INT32 pass) |
Protected Member Functions | |
PNGProgressBar () | |
Private Attributes | |
bool | show_progress_bar |
bool | interlaced |
UINT32 | height |
INT32 | next_update |
Definition at line 116 of file pngprgrs.h.
|
Constructor. Sets show_progress_bar. If ProgressString != NULL, starts prorgress bar. Scope: Public.
Definition at line 125 of file pngprgrs.cpp. 00126 { 00127 interlaced = new_interlaced; 00128 height = new_height; 00129 00130 if (ProgressString != NULL) 00131 { 00132 show_progress_bar = true; 00133 if (interlaced) 00134 // An interlaced image 00135 { 00136 // PNG interlaced files always have 7 passes so use 7 as 00137 // final value for status bar 00138 BeginSlowJob(8, FALSE, ProgressString); 00139 00140 // Next update the status bar at pass 0 00141 next_update = 0; 00142 } 00143 else 00144 // A non-interlaced image 00145 { 00146 BeginSlowJob(height, FALSE, ProgressString); 00147 00148 // Update the status bar on row 0 00149 next_update = 0; 00150 } 00151 } 00152 else 00153 { 00154 show_progress_bar = false; 00155 } 00156 }
|
|
Constructor. Sets show_progress_bar. If ProgressString != NULL, starts prorgress bar. Scope: Public.
Definition at line 172 of file pngprgrs.cpp. 00173 { 00174 // If started, then stop then progress bar 00175 if (show_progress_bar) 00176 EndSlowJob(); 00177 }
|
|
|
|
|
|
Definition at line 179 of file pngprgrs.cpp. 00180 { 00181 if (show_progress_bar) 00182 { 00183 if (interlaced) 00184 // Interlaced image 00185 { 00186 if (pass + 1 >= next_update) 00187 ContinueSlowJob(pass + 1); 00188 } 00189 else 00190 // Non-interlaced image 00191 { 00192 if ((INT32)row_number >= next_update) 00193 ContinueSlowJob(row_number); 00194 } 00195 } 00196 }
|
|
Definition at line 137 of file pngprgrs.h. |
|
Definition at line 136 of file pngprgrs.h. |
|
Definition at line 138 of file pngprgrs.h. |
|
Definition at line 135 of file pngprgrs.h. |