本文整理汇总了C++中ImgFile_Ptr::AddLayer方法的典型用法代码示例。如果您正苦于以下问题:C++ ImgFile_Ptr::AddLayer方法的具体用法?C++ ImgFile_Ptr::AddLayer怎么用?C++ ImgFile_Ptr::AddLayer使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ImgFile_Ptr
的用法示例。
在下文中一共展示了ImgFile_Ptr::AddLayer方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: Redo
void AddCopyLayerHandle::Redo(ImgFile_weakPtr wpFile){
ImgFile_Ptr pFile = wpFile.lock();
pFile->AddLayer(m_addLayer.lock());
m_is_added_layer = true;
m_addLayer_lock = NULL;
LPUPDATE_DATA data = pFile->CreateUpdateData();
data->isAll = true;
pFile->PushUpdateData(data);
}
示例2: Do
bool AddCopyLayerHandle::Do(ImgFile_weakPtr wpFile)
{
ImgFile_Ptr pFile = wpFile.lock();
m_addLayer = m_addLayer_lock = CreateIEImgLayer( pFile );
IImgLayer_weakPtr wlayer = pFile->GetSelectLayer();
if (wlayer.expired()) {
OutputError::PushLog(LOG_LEVEL::_ERROR, "AddCopyLayerHandle::Do() select layer is expired");
return false;
}
IImgLayer_Ptr layer = wlayer.lock();
if(layer->GetLayerType() != IE_LAYER_TYPE::NORMAL_LAYER){
OutputError::PushLog(LOG_LEVEL::_ERROR, "AddCopyLayerHandle::Do() select layer is not normal layer");
return false;
}
if(m_copyLayer.lock() == NULL){
m_copyLayer = std::dynamic_pointer_cast<ImgLayer>(layer);
}
const_ImgLayer_Ptr copy_layer = m_copyLayer.lock();
copy_layer->CopyImgLayer( m_addLayer_lock );
char layer_name[MAX_IMG_LAYER_NAME];
copy_layer->GetName(layer_name);
sprintf(layer_name, "%s�̃R�s�[", layer_name);
m_addLayer_lock->SetName(layer_name);
m_addLayer_lock->SetLayerSynthFourCC( LayerSynthesizerMG::GetDefaultLayerSynthFourCC() );
pFile->AddLayer(m_addLayer_lock);
m_is_added_layer = true;
m_addLayer_lock = NULL;
LPUPDATE_DATA data = pFile->CreateUpdateData();
data->isAll = true;
pFile->PushUpdateData(data);
return true;
}