Changed stopat to stopafter in CountColours

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@4984 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Guillermo Rodriguez Garcia
1999-12-16 12:19:02 +00:00
parent 8f9846be80
commit cc9f7d7939
2 changed files with 7 additions and 7 deletions

View File

@@ -185,7 +185,7 @@ public:
static void InitStandardHandlers(); static void InitStandardHandlers();
// GRG: Dic/99 // GRG: Dic/99
unsigned long CountColours( unsigned long stopat = -1 ); unsigned long CountColours( unsigned long stopafter = -1 );
unsigned long ComputeHistogram( wxHashTable &h ); unsigned long ComputeHistogram( wxHashTable &h );

View File

@@ -2303,12 +2303,12 @@ IMPLEMENT_DYNAMIC_CLASS(wxImageModule, wxModule)
// GRG, Dic/99 // GRG, Dic/99
// Counts and returns the number of different colours. Optionally stops // Counts and returns the number of different colours. Optionally stops
// when it reaches 'stopat' different colours. This is useful, for example, // when it exceeds 'stopafter' different colours. This is useful, for
// to see if the image can be saved as 8-bit (256 colour or less, in this // example, to see if the image can be saved as 8-bit (256 colour or
// case it would be invoked as CountColours(257)). Default value for stopat // less, in this case it would be invoked as CountColours(256)). Default
// is -1 (don't care). // value for stopafter is -1 (don't care).
// //
unsigned long wxImage::CountColours( unsigned long stopat ) unsigned long wxImage::CountColours( unsigned long stopafter )
{ {
wxHashTable h; wxHashTable h;
wxNode *node; wxNode *node;
@@ -2320,7 +2320,7 @@ unsigned long wxImage::CountColours( unsigned long stopat )
size = GetWidth() * GetHeight(); size = GetWidth() * GetHeight();
nentries = 0; nentries = 0;
for (unsigned long j = 0; (j < size) && (nentries < stopat) ; j++) for (unsigned long j = 0; (j < size) && (nentries <= stopafter) ; j++)
{ {
r = *(p++); r = *(p++);
g = *(p++); g = *(p++);