⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 templatelibrary.c

📁 图像处理的压缩算法
💻 C
字号:
/*------------------------------------------------------------------------------*
 * File Name:	TemplateLibrary.c				 								*
 * Creation: 	12/15/2001														*
 * Purpose: OriginC Source C file												*
 * Copyright (c) OriginLab Corp.	2001										*
 * All Rights Reserved															*
 * 																				*
 * Modification Log:															*
 *------------------------------------------------------------------------------*/
#include <origin.h>

////////////////////////////////////////////////////////////////////////////////////

////////////////////////////////////////////////////////////////////////////////////
//
/**
		Opens a graph template and extracts an object "templatepict" if it exists.
	Example:
		OpenTemplate(Line);
	Return:
		1 for success extracting to templatepict.
*/
double	openTemplate(string template)
{
	double			isValid;
	GraphPage		grph;
	int				nOption = CREATE_HIDDEN | CREATE_NO_REMOVE_TEMPLATEPICT;
	BOOL bRet1	=	grph.Create(template, nOption);
	string			winName = grph.GetName();
	GraphLayer		lay(winName,0);
	LT_set_str("%Z",winName);
	LT_execute("ii=%Z!templatepict.enable");
	LT_get_var("ii", &isValid);
	if(isValid)
	{
		GraphObject		grPict;
		grPict		=	lay.GraphObjects("TemplatePict");
		string strPath = GetAppPath() + "TemplatePict.bmp";
		BOOL bRet2 	=	grPict.ExtractImageToFile(strPath);
	}
	grph.Destroy();
	return isValid;
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -