software/MFrame/commonFunctions/commonFunctions.cpp
/*----------------------------------------------------------------------*/
/* DrawPicture(pictureID) -- draws a picture with pictureID in the front
							 most window
/*----------------------------------------------------------------------*/
- draws a picture with pictureID in the front
most window
- draws a picture with pictureID in the front most window
void DrawResPicture(int pictureID)
{
	Rect		pictureRect;
	WindowPtr	window;
	PicHandle	picture;
	char		errorBuffer[256];
	window = FrontWindow();
	GetPortBounds(GetQDGlobalsThePort(), &pictureRect);
	picture = GetPicture(pictureID);
	if (picture == nil)
	{
		sprintf(errorBuffer, "because picture ID %d not found", pictureID);
		DisplayAlert("Can't draw picture", errorBuffer);
		ExitApplication();
	}
	CenterPict(picture, &pictureRect);
	pictureRect = (**(picture)).picFrame;
	DrawPicture(picture, &pictureRect);
}
void DrawResPicture ( int pictureID ) { Rect pictureRect ; WindowPtr window ; PicHandle picture ; char errorBuffer [ 256 ] ; window = FrontWindow ( ) ; GetPortBounds ( GetQDGlobalsThePort ( ) , & pictureRect ) ; picture = GetPicture ( pictureID ) ; if ( picture == nil ) { sprintf ( errorBuffer , " " , pictureID ) ; DisplayAlert ( " " , errorBuffer ) ; ExitApplication ( ) ; } CenterPict ( picture , & pictureRect ) ; pictureRect = ( * * ( picture ) ) . picFrame ; DrawPicture ( picture , & pictureRect ) ; }
DrawPicture(pictureID) -- draws a picture with pictureID in the front
most window
DrawPicture ( pictureID ) -- draws a picture with pictureID in the front most window