Exemplo n.º 1
0
static void doMenu( long menuSelection )
{
	short whichMenu = HiWord(menuSelection);
	short whichMenuItem = LoWord(menuSelection);
	
	switch (whichMenu) {
	case kAppleMenuID:
		switch (whichMenuItem) {
		case kAppleMenuAbout:
			Alert(128, NULL);
			break;

		default:
			break;
		}
		break;

	case kFileMenuID:
		switch (whichMenuItem) {
		case kFileMenuQuit:
			gDone = true;
			break;
		}
		break;
	
	case kDemoMenuID:
		if (window) { DisposeWindow( window ); window = NULL; };
		switch (whichMenuItem) {
		case kDemoMenuDraw: DrawImage(); break;
		case kDemoMenuScaleRotate: ScaleAndRotate(); break;
		case kDemoMenuAlpha: AlphaComposite(); break;
		case kDemoMenuMoreInfo: GetMoreInfo(); break;
		case kDemoMenuMultipleImage: MultipleImage(); break;
		case kDemoMenuURLImage: ImageFromURL(); break;
		case kDemoMenuFiltersExport: FilterExport(); break;
		case kDemoMenuMovieImage: MovieToImage(); break;
		case kDemoMenuDeepImages: DeepImages(); break;
        case kDemoMenuDrawCMYK: DrawCMYK(); break;
        case kDemoMenuDrawUsingCGImage: DrawUsingCGImage(); break;
        case kDemoMenuExportFromCGBitmapContext: ExportFromCGBitmapContext(); break;
		default:
			break;
		} // switch
	}
	
	HiliteMenu(0);
}
Exemplo n.º 2
0
void AlphaComposite(RefPtr<Gdk::Pixbuf> dst, RefPtr<Gdk::Pixbuf> src, const Point& a)
{
    AlphaComposite(dst, src, RectASz(a, PixbufSize(src)));
}