예제 #1
0
void ValidateParameters (GPtr globals)
{
	if (gStuff->parameters == NULL)
	{ // We haven't created these yet.

		gStuff->parameters = PINewHandle ((long) sizeof (TParameters));

		if (gStuff->parameters != NULL)
		{ // Got it.  Fill out the fields.
			gPointH = 0;
			gPointV = 0;
			gXFactor = 4;
			gGaussianBlurData = FALSE;
		}
		else
		{ // Oops.  Couldn't allocate memory.
				
			gResult = memFullErr;
			return;
		}
	} // parameters
	
} // end ValidateParameters
예제 #2
0
void ValidateParameters (GPtr globals)
{
	if (gStuff->parameters == NULL)
	{ // We haven't created these yet.

		gStuff->parameters = PINewHandle ((long) sizeof (TParameters));

		if (gStuff->parameters != NULL)
		{ // Got it.  Fill out the fields.
			CSSetColor (gSourceColor, 0, 0, 0, 255);
			CSCopyColor (gTargetColor, gSourceColor);

			gColor = gColorize = 0;

		}
		else
		{ // Oops.  Couldn't allocate memory.
				
			gResult = memFullErr;
			return;
		}
	} // parameters
	
} // end ValidateParameters