当前位置: 首页>>代码示例>>C++>>正文


C++ DisposeGWorld函数代码示例

本文整理汇总了C++中DisposeGWorld函数的典型用法代码示例。如果您正苦于以下问题:C++ DisposeGWorld函数的具体用法?C++ DisposeGWorld怎么用?C++ DisposeGWorld使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了DisposeGWorld函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1:

 ~impl() {
     if (image_desc) DisposeHandle((Handle)image_desc);
     if (handle) DisposeHandle(handle);
     if (gworld) DisposeGWorld(gworld);
     if (buffer) delete[] buffer;
     if (movie) DisposeMovie( movie );
 }
开发者ID:Lerbytech,项目名称:gpuakf,代码行数:7,代码来源:quicktime.cpp

示例2: DisposeGWorld

void _HYPlatformGraphicPane::_SetPaneSize  (int h,int w, int d)
{
	DisposeGWorld (thePane);
	Rect  bRect;
	bRect.left = bRect.top = 0;
	bRect.right = w;
	bRect.bottom = h;
	short errCode;
	if (d>1)
	{
	  	errCode = NewGWorld (&thePane,d,&bRect,0,GetMainDevice(),noNewDevice);
	
		if (errCode == -108) // no memory
			errCode = NewGWorld (&thePane,d,&bRect,0,GetMainDevice(),noNewDevice|useTempMem);
	}
	else
	{
	  	errCode = NewGWorld (&thePane,d,&bRect,0,nil,0);
	
		if (errCode == -108) // no memory
			errCode = NewGWorld (&thePane,d,&bRect,0,nil,useTempMem);
	}

	if (errCode)
	{
		_String errMsg ("MacOS Error ");
		errMsg = errMsg & (long)errCode &" while trying to allocate memory for GraphicPane";
		FlagError (errMsg);
	}
}
开发者ID:mdsmith,项目名称:OCLHYPHY,代码行数:30,代码来源:HYPlatformGraphicPane.cpp

示例3: gst_osx_video_src_stop

static gboolean
gst_osx_video_src_stop (GstBaseSrc * src)
{
  GstOSXVideoSrc *self;
  ComponentResult err;

  self = GST_OSX_VIDEO_SRC (src);

  GST_DEBUG_OBJECT (src, "stopping");

  self->video_chan = NULL;

  err = CloseComponent (self->seq_grab);
  if (err != noErr)
    GST_WARNING_OBJECT (self, "CloseComponent returned %d", (int) err);
  self->seq_grab = NULL;

  DisposeGWorld (self->world);
  self->world = NULL;

  if (self->buffer != NULL) {
    gst_buffer_unref (self->buffer);
    self->buffer = NULL;
  }

  return TRUE;
}
开发者ID:ChinnaSuhas,项目名称:ossbuild,代码行数:27,代码来源:osxvideosrc.c

示例4: LoadBlastText

OSErr LoadBlastText(BTIPtr theInfo,short theFile,short theResId)
{
	GWorldPtr		theWorld;
	OSErr			theErr;
	BTEHandle		theBits;
	
	theInfo->lCoords=0L;
	theInfo->textRec.world=0L;
	
	theBits=(BTEHandle)BetterGetResource(theFile,kBlastTextExtrasResType,theResId);
	if (!theBits)
		return BetterGetResErr();
	
	theInfo->spaceWidth=(**theBits).spaceWidth;
	theInfo->remapMe=(**theBits).remapCol;
	theInfo->transp=(**theBits).transpCol;
	
	BetterDisposeHandle((Handle)theBits);
	
	if (theErr=NewGWorldWithPic(&theWorld,theResId,8))
		return theErr;
	MakeBCRecFromGWorld(theWorld,&theInfo->textRec);
	
	theInfo->lCoords=(Rect**)BetterGetResource(theFile,kLetterCoordResType,theResId);
	if (!theInfo->lCoords)
	{
		DisposeGWorld(theWorld);
		return BetterGetResErr();
	}
	
	HLock((Handle)theInfo->lCoords);
	
	return noErr;
}
开发者ID:MaddTheSane,项目名称:tntbasic,代码行数:34,代码来源:BLAST+Text.c

示例5: get_scrap_helper_dib

PUBLIC int
get_scrap_helper_dib (void *vh, void *lp)
{
  SDL_Surface *surfp;
  GWorldPtr gp;
  PicHandle pich;
  Handle h;
  int retval;
  int len;

  surfp = surface_from_dib (lp);
  gp = gworld_from_surface (surfp);
  SDL_FreeSurface (surfp);
  pich = pict_from_gworld (gp, &len);
  DisposeGWorld (gp);
  h = (Handle) vh;
  len = GetHandleSize ((Handle) pich);
  ReallocHandle (h, len);
  if (MemErr != noErr)
    retval = -1;
  else
    {
      memcpy (STARH (h), STARH (pich), len);
      retval = len;
    }
  DisposHandle ((Handle) pich);
  return retval;
}
开发者ID:LarBob,项目名称:executor,代码行数:28,代码来源:scrap.c

示例6: QutTexture_CreateCompressedTextureObjectFromFile

//=============================================================================
//		QutTexture_CreateCompressedTextureObjectFromFile :	Create a QD3D 
//															compressed texture.
//-----------------------------------------------------------------------------
TQ3TextureObject		
QutTexture_CreateCompressedTextureObjectFromFile(
									const FSSpec *	theFSSpec,
									TQ3PixelType	pixelType,
									TQ3Boolean		wantMipMaps)
{
	TQ3TextureObject	theTexture	= NULL;
	GWorldPtr			theGWorld	= NULL;
	PixMapHandle		thePixmap	= NULL;



	// Load the image, then create a texture from it
	theGWorld = QutTexture_CreateGWorldFromFile(theFSSpec, pixelType);
	if (theGWorld != NULL)
	{
		thePixmap	= GetGWorldPixMap(theGWorld);
		
		if( thePixmap != NULL)
		{
			theTexture = QutTexture_CreateCompressedTextureObjectFromPixmap(thePixmap, pixelType, wantMipMaps);
			DisposeGWorld(theGWorld);
		}
	}
	
	return(theTexture);
}
开发者ID:refnum,项目名称:quesa,代码行数:31,代码来源:QutTexture.c

示例7: createOffscreen

void createOffscreen(int pictItem)
{
	PicHandle	pict;
	Rect		rect;
	CGrafPtr	currentPort;
	GDHandle	currentDevice;
	
	if (gGWorld != nil)
		DisposeGWorld( gGWorld );
	
	pict = (PicHandle)GetResource( 'PICT', pictItem + 127 );
	
	rect = (**pict).picFrame;
	
	GetGWorld( &currentPort, &currentDevice );
	NewGWorld( &gGWorld, 32, &rect, nil, nil, 0 );
		
	LockPixels( GetPortPixMap(gGWorld));
	SetGWorld( gGWorld, nil );

	DrawPicture( pict, &rect );
	
	SetGWorld( currentPort, currentDevice );
	
	ReleaseResource( (Handle)pict );
}
开发者ID:fruitsamples,项目名称:QuickDraw_FX,代码行数:26,代码来源:main.c

示例8: StopMovie

////////////////////////////////////////////////////////////////////////////////
// private
bool LLMediaImplQuickTime::unload()
{
	if ( mMovieHandle )
	{
		StopMovie( mMovieHandle );
		if ( mMovieController )
		{
			MCMovieChanged( mMovieController, mMovieHandle );
		};
	};

	if ( mMovieController )
	{
		MCSetActionFilterWithRefCon( mMovieController, NULL, (long)this );
		DisposeMovieController( mMovieController );
		mMovieController = NULL;
	};

	if ( mMovieHandle )
	{
		SetMovieDrawingCompleteProc( mMovieHandle, movieDrawingCallWhenChanged, nil, ( long )this );
		DisposeMovie ( mMovieHandle );
		mMovieHandle = NULL;
	};

	if ( mGWorldHandle )
	{
		DisposeGWorld( mGWorldHandle );
		mGWorldHandle = NULL;
	};

	return true;
}
开发者ID:AlexRa,项目名称:Kirstens-clone,代码行数:35,代码来源:llmediaimplquicktime.cpp

示例9: put_scrap_helper_dib

PUBLIC void
put_scrap_helper_dib (void *lp)
{
  PicHandle pich;

  pich = pict_from_lp (lp);
  if (pich)
    {
      GWorldPtr gp;

      gp = gworld_from_pict (pich);
      if (gp)
	{
	  SDL_Surface *surfp;

	  surfp = surface_from_gworld (gp);
	  if (surfp)
	    {
	      write_surfp_to_clipboard (surfp);
	      SDL_FreeSurface (surfp);
	    }
	  DisposeGWorld (gp);
	}
      DisposHandle ((Handle) pich);
    }
}
开发者ID:LarBob,项目名称:executor,代码行数:26,代码来源:scrap.c

示例10: MyDisposeEverything

void MyDisposeEverything (void)
{
	short				nIndex;

	// dispose of each spriteÕs image data
	for (nIndex = 0; nIndex < kNumSprites; nIndex++)
	{
		if (gSprites[nIndex])
			DisposeSprite(gSprites[nIndex]);

		if (gCompressedPictures[nIndex])
			DisposeHandle(gCompressedPictures[nIndex]);
			
		if (gImageDescriptions[nIndex])
			DisposeHandle((Handle)gImageDescriptions[nIndex]);
	}
	
	// dispose of the sprite plane world
	if (gSpritePlane)
		DisposeGWorld(gSpritePlane);

	// dispose of the sprite world and associated graphics world
	if (gSpriteWorld)
		DisposeSpriteWorld(gSpriteWorld);
}
开发者ID:fruitsamples,项目名称:Desktop_Sprites,代码行数:25,代码来源:dispsprite.c

示例11: ROM_UnsetVideoMode

static void ROM_UnsetVideoMode(_THIS, SDL_Surface *current)
{
	/* Free the current window, if any */
	if ( SDL_Window != nil ) {
		GWorldPtr memworld;
		
		/* Handle OpenGL support */
		Mac_GL_Quit(this);

		memworld = (GWorldPtr)GetWRefCon(SDL_Window);
		if ( memworld != nil ) {
			UnlockPixels(GetGWorldPixMap(memworld));
			DisposeGWorld(memworld);
		}
		if ( (current->flags & SDL_FULLSCREEN) == SDL_FULLSCREEN ) {
#if USE_QUICKTIME
			EndFullScreen(fullscreen_ctx, nil);
			SDL_Window = nil;
#else
			ROM_ShowMenuBar(this);
#endif
		}
	}
	current->pixels = NULL;
	current->flags &= ~(SDL_HWSURFACE|SDL_FULLSCREEN);
}
开发者ID:3bu1,项目名称:crossbridge,代码行数:26,代码来源:SDL_romvideo.c

示例12: closeMovie

//---------------------------------------------------------------------------
ofVideoPlayer::~ofVideoPlayer(){
	
	//--------------------------------------
	#ifdef OF_VIDEO_PLAYER_QUICKTIME
	//--------------------------------------
		closeMovie();
		if(allocated)	delete(pixels);
		if(allocated)	delete(offscreenGWorldPixels);
		if(allocated && (offscreenGWorld)) DisposeGWorld((offscreenGWorld));

	 //--------------------------------------
	#else
	//--------------------------------------
		
		// [CHECK] anything else necessary for FOBS ? please check 
		if (fobsDecoder != NULL){
			delete fobsDecoder;
		}
		
		if (pixels != NULL){
			delete pixels;
		}
		
	//--------------------------------------
	#endif
	//--------------------------------------
	
	tex.clear();

}
开发者ID:LeonFedotov,项目名称:L.A.S.E.R.-TAG-GRL,代码行数:31,代码来源:ofVideoPlayer.cpp

示例13: EndMediaEdits

void MovieMaker::EndCapture()
{
	OSStatus	error = noErr;

	if (movie && movieResRef)
	{
		if (media && track)
		{
			// Errors adding the frame aren't too important here.
			(void)addFrame();
			
			error = EndMediaEdits(media);
			if (error == noErr)
			{
				error = SCCompressSequenceEnd(ci);
			}

			if (error == noErr)
			{
				error = InsertMediaIntoTrack(track, 0, 0, GetMediaDuration(media), fixed1);
			}
			media = NULL;
			track = NULL;
		}
		
		short resId = movieInDataForkResID;
		error = AddMovieResource(movie, movieResRef, &resId, "\pSecond Life");
		CloseMovieFile(movieResRef);
		movieResRef = 0;
		movie = NULL;
	}
	
	// NOTE:  idh is disposed by SCCompressSequenceEnd.
	idh = NULL;
	
	if(ci)
	{
		CloseComponent(ci);
		ci = NULL;
	}
	
	if(gworld)
	{
		DisposeGWorld(gworld);
		gworld = NULL;
	}

	if(buffer)
	{
		free(buffer);
		buffer = NULL;
	}

	if(invertedBuffer)
	{
		free(invertedBuffer);
		invertedBuffer = NULL;
	}
}
开发者ID:xinyaojiejie,项目名称:Dale,代码行数:59,代码来源:moviemaker.cpp

示例14: QTCode_DoDestroyOffscreen

void QTCode_DoDestroyOffscreen(GWorldPtr offscreen, HBITMAP	hBitmap)
{
	BOOL success;

		/* Destroy the offscreen GWorld and related objects */
	DisposeGWorld(offscreen);
	success = DeleteObject(hBitmap);
}
开发者ID:fruitsamples,项目名称:offscreen.win,代码行数:8,代码来源:QTCode.c

示例15: CloseTintWorld

void CloseTintWorld()
{
	if(gBL_TintWorld)
	{
		DisposeGWorld(gBL_TintWorld);
		gBL_TintWorld=0L;
	}
}
开发者ID:MaddTheSane,项目名称:tntbasic,代码行数:8,代码来源:BLAST+Tint.c


注:本文中的DisposeGWorld函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。