本文整理汇总了C++中GetImage函数的典型用法代码示例。如果您正苦于以下问题:C++ GetImage函数的具体用法?C++ GetImage怎么用?C++ GetImage使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了GetImage函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: GetImage
//-----------------------------------------------------------------------------
// Purpose:
//-----------------------------------------------------------------------------
void CAvatarImagePanel::PaintBackground( void )
{
vgui::IImage *pImage = GetImage();
if ( pImage )
{
pImage->SetColor( GetDrawColor() );
pImage->Paint();
}
}
示例2: mono_class_from_name
MonoClass* MonoEmbedding::GetClass()
{
static MonoClass* klass;
if (!klass)
klass = mono_class_from_name(GetImage(), "", "MonoEmbedding");
return klass;
}
示例3: GetImage
void CCompositeImageDesc::MarkImage (const CCompositeImageSelector &Selector, DWORD dwModifiers)
// MarkImage
//
// Marks the image in use
{
GetImage(Selector, dwModifiers).MarkImage();
}
示例4: OP_ASSERT
OP_STATUS HEListElm::SendImageFinishedLoadingEvent(FramesDocument* doc)
{
OP_ASSERT(doc);
OP_ASSERT(!GetEventSent());
if (inline_type == IMAGE_INLINE && HElm()->GetInserted() == HE_INSERTED_BY_PARSE_AHEAD)
{
HElm()->SetSpecialBoolAttr(ATTR_JS_DELAYED_ONLOAD, TRUE, SpecialNs::NS_LOGDOC);
return OpStatus::OK;
}
// Since this requires decoding the image, skip it if there are no event listeners
if (inline_type == IMAGE_INLINE &&
(GetElm()->HasEventHandler(doc, ONLOAD) || GetElm()->HasEventHandler(doc, ONERROR)))
{
LoadInlineElm* lie = GetLoadInlineElm();
OP_ASSERT(lie);
URLStatus url_status = lie->GetUrl()->Status(TRUE);
if (url_status == URL_LOADED)
{
#ifdef SVG_SUPPORT
// If it is an svg image wait with sending onerror or
// onload until it has been parsed.
if (lie->GetUrl()->ContentType() == URL_SVG_CONTENT)
return OpStatus::OK;
#endif // SVG_SUPPORT
Image img = GetImage();
// IsAnimated() implies that the first frame is decoded which is good enough for us.
if (img.ImageDecoded() || img.IsAnimated())
return OnLoad();
if (GetUrlContentProvider() && !GetImageVisible())
{
/* Force image decoding, so that we can send onload or onerror as appropriate. */
OP_STATUS status = img.IncVisible(this);
if (OpStatus::IsSuccess(status))
{
// Scripts might load image in a hidden place and move
// on load, in which case we don't want image to be
// re-decoded.
ImageManager::GraceTimeLock lock(imgManager);
// This will send onload or onerror through the ImageListener callbacks (OnError and OnPortionDecoded).
// except for animated images since only the first frame will be decoded.
status = img.OnLoadAll(GetUrlContentProvider());
img.DecVisible(this);
OP_ASSERT(GetEventSent());
}
return status;
}
}
else if (url_status == URL_LOADING_FAILURE)
SendOnError();
}
return OpStatus::OK;
}
示例5: CAvatarImage
void CAvatarImagePanel::SetAvatarBySteamID( CSteamID *friendsID )
{
if ( !GetImage() )
{
CAvatarImage *pImage = new CAvatarImage();
SetImage( pImage );
}
// Indent the image. These are deliberately non-resolution-scaling.
int iIndent = 2;
GetImage()->SetPos( iIndent, iIndent );
int wide = GetWide() - (iIndent*2);
((CAvatarImage*)GetImage())->SetAvatarSize( ( wide > 32 ) ? k_EAvatarSize64x64 : k_EAvatarSize32x32 );
((CAvatarImage*)GetImage())->SetAvatarSteamID( *friendsID );
GetImage()->SetSize( wide, GetTall()-(iIndent*2) );
}
示例6: mmi_java_entry_terminate_dialog
/*****************************************************************************
* FUNCTION
* mmi_java_entry_terminate_dialog
* DESCRIPTION
* The entry function to ask user if they want to terminate/Pause Java
* PARAMETERS
* void
* RETURNS
* void
*****************************************************************************/
void mmi_java_entry_terminate_dialog(void) /* called by JAVA adaptor, also in mmi task */
{
/*----------------------------------------------------------------*/
/* Local Variables */
/*----------------------------------------------------------------*/
U8 *guiBuffer;
U8 *icon_items[2];
U8 *text_items[2];
/*----------------------------------------------------------------*/
/* Code Body */
/*----------------------------------------------------------------*/
EntryNewScreen(
SCR_JAVA_TERMINATE_DIALOG,
mmi_java_entry_terminate_dialog_exit,
mmi_java_entry_terminate_dialog,
NULL);
guiBuffer = GetCurrGuiBuffer(SCR_JAVA_TERMINATE_DIALOG);
RegisterHighlightHandler(mmi_java_highlight_handler);
memset(icon_items, 0, sizeof(icon_items));
text_items[0] = (PU8) GetString(STR_JAVA_PAUSE);
text_items[1] = (PU8) GetString(STR_JAVA_TERMINATE);
ShowCategory32Screen(
format_asking_string(STR_JAVA_TERMINATE_DIALOG_TITLE),
NULL,
(PU8) GetString(STR_GLOBAL_OK),
(PU8) GetImage(IMG_GLOBAL_OK),
(PU8) GetString(STR_GLOBAL_BACK),
(PU8) GetImage(IMG_GLOBAL_BACK),
2,
text_items,
icon_items,
0,
0,
guiBuffer);
SetLeftSoftkeyFunction(mmi_java_terminate_dialog_yes_hdlr, KEY_EVENT_UP);
SetRightSoftkeyFunction(mmi_java_terminate_dialog_no_hdlr, KEY_EVENT_UP);
}
示例7: Java_xwp_jr_Fingerprint_SecondReg
/*
功能:第二次确认指纹并注册指纹
成功返回SUCCESS,失败返回错误码
*/
int Java_xwp_jr_Fingerprint_SecondReg(JNIEnv *env, jclass thiz)
{
int ret = ACK_NOFINGER;
int count = 0;
if(OPENED != fd_status)
{
LOGE("设备未打开");
goto EXIT;
}
while(ret == ACK_NOFINGER)
{
if(count > OVERTIME)
break;
LOGI("获取第二次指纹中。。。。");
ret = GetImage();
count++;
usleep(DELAYTIME);
}
if(ret != SUCCESS)
{
LOGE("第二次获取指纹失败。。。");
goto EXIT;
}
ret = GenChar(charbuffer2);
if(ret != SUCCESS)
{
LOGE("生成指纹特征库失败");
goto EXIT;
}
ret = RegModel();
if(ret != SUCCESS)
{
LOGE("合并指纹失败");
goto EXIT;
}
ret = StoreChar(charbuffer2, finger_id);
if(ret != SUCCESS)
{
LOGE("存储指纹失败");
goto EXIT;
}
finger_id++;
LOGI("注册指纹总数:%d", finger_id);
EXIT:
status = VERIFY;
return ret;
}
示例8: GetImage
void CUnitVolumeMakerDlg::GetVolume(int iWidth,
int iLength,
int iHeight,
EZoomOut eZoomOutLevel)
{
int iZ = 0;
for(iZ = 0; iZ < m_TissueBlock.m_UnitCube.m_nHeight; iZ++)
GetImage(iWidth, iLength, iHeight, iZ, eZoomOutLevel);
}
示例9: GetImage
ALERROR CGImageCache::LockImageSurface (int iIndex, CGLockedSurface *pLockedSurface)
// LockImageSurface
//
// Locks the image and fill-in the locked surface object
{
IMAGEDATASTRUCT *pData = GetImage(iIndex);
return pLockedSurface->Create(pData->pSurface, NULL, pData->pTrans, NULL);
}
示例10: SceneObject
House::House(glm::vec3 pos, sf::Color color, int houseType, int roofType, float length, float width, float height = 10.f)
: SceneObject(pos)
,roof(GetImage( std::string(RoofTypeNames[roofType]) + ".png"))
,side(GetImage( std::string(HouseTypeNames[houseType]) + ".png"))
,color(color)
,length(length)
,width(width)
,height(height)
{
// roof.Bind();
// glEnable(GL_TEXTURE_2D);
// glGenerateMipmap(true);
// glTexParameteri(GL_TEXTURE_2D, GL_GENERATE_MIPMAP, GL_TRUE);
// side.Bind();
// glEnable(GL_TEXTURE_2D);
// glGenerateMipmap(true);
// glTexParameteri(GL_TEXTURE_2D, GL_GENERATE_MIPMAP, GL_TRUE);
}
示例11: if
VulkanDescriptorSet *VkHardwareTexture::GetDescriptorSet(const FMaterialState &state)
{
FMaterial *mat = state.mMaterial;
FTexture *tex = state.mMaterial->tex;
int clampmode = state.mClampMode;
int translation = state.mTranslation;
if (tex->UseType == ETextureType::SWCanvas) clampmode = CLAMP_NOFILTER;
if (tex->isHardwareCanvas()) clampmode = CLAMP_CAMTEX;
else if ((tex->isWarped() || tex->shaderindex >= FIRST_USER_SHADER) && clampmode <= CLAMP_XY) clampmode = CLAMP_NONE;
// Textures that are already scaled in the texture lump will not get replaced by hires textures.
int flags = state.mMaterial->isExpanded() ? CTF_Expand : (gl_texture_usehires && !tex->isScaled() && clampmode <= CLAMP_XY) ? CTF_CheckHires : 0;
if (tex->isHardwareCanvas()) static_cast<FCanvasTexture*>(tex)->NeedUpdate();
for (auto &set : mDescriptorSets)
{
if (set.descriptor && set.clampmode == clampmode && set.flags == flags) return set.descriptor.get();
}
int numLayers = mat->GetLayers();
auto fb = GetVulkanFrameBuffer();
auto descriptor = fb->GetRenderPassManager()->AllocateTextureDescriptorSet(numLayers);
descriptor->SetDebugName("VkHardwareTexture.mDescriptorSets");
VulkanSampler *sampler = fb->GetSamplerManager()->Get(clampmode);
WriteDescriptors update;
update.addCombinedImageSampler(descriptor.get(), 0, GetImage(tex, translation, flags)->View.get(), sampler, mImage.Layout);
for (int i = 1; i < numLayers; i++)
{
FTexture *layer;
auto systex = static_cast<VkHardwareTexture*>(mat->GetLayer(i, 0, &layer));
update.addCombinedImageSampler(descriptor.get(), i, systex->GetImage(layer, 0, mat->isExpanded() ? CTF_Expand : 0)->View.get(), sampler, systex->mImage.Layout);
}
update.updateSets(fb->device);
mDescriptorSets.emplace_back(clampmode, flags, std::move(descriptor));
return mDescriptorSets.back().descriptor.get();
}
示例12: geWorld_GetBitmapByName
/* ------------------------------------------------------------------------------------ */
bool CAnimGif::DisplayNextFrameTexture(const char *szTextureName, bool FFrame)
{
if(!Active)
return false;
if(FFrame)
{
geBitmap_Info Info;
geBitmap *theBitmap = geWorld_GetBitmapByName(CCD->World(), szTextureName);
if(!theBitmap)
{
Active = false;
return false;
}
geBitmap_GetInfo(theBitmap, &Info, NULL);
if(nWidth!=Info.Width || nHeight!=Info.Height)
{
Active = false;
return false;
}
if(theBmp)
{
// changed QD 12/15/05
geEngine_RemoveBitmap(CCD->Engine()->Engine(), theBmp);
// end change
geBitmap_Destroy(&theBmp);
}
theBmp = theBitmap;
Texture = true;
TotalReadByte = 0;
pcGifTrack=pcGif;
VAnimTime = (float)CCD->FreeRunningCounter();
if(GetImage(true))
{
FirstFrame = false;
return true;
}
FirstFrame = false;
return false;
}
else
{
NextFrame(true);
}
return true;
}
示例13: painter
void QtGameWidget::paintEvent(QPaintEvent *)
{
QPainter painter(this);
const int width = this->width();
const int height = this->height();
const double scale_x
= static_cast<double>(width)
/ TankBattalion::GetArenaWidth();
const double scale_y
= static_cast<double>(height)
/ TankBattalion::GetArenaHeight();
painter.setBackgroundMode(Qt::TransparentMode);
painter.drawImage(
this->rect(),
*GetImage(TankBattalion::arena).get());
painter.drawImage(
QRect(0,0,scale_x * 16.0, scale_y * 16.0),
*GetImage(TankBattalion::player_left).get());
}
示例14: mmi_rmgr_list_ro_entry_option
/*****************************************************************************
* FUNCTION
* mmi_rmgr_list_ro_entry_option
* DESCRIPTION
* Entry function of the list ro option screen
* PARAMETERS
* void
* RETURNS
* void
*****************************************************************************/
static void mmi_rmgr_list_ro_entry_option(void)
{
/*----------------------------------------------------------------*/
/* Local Variables */
/*----------------------------------------------------------------*/
U16 g_id;
U16 menu_cui_id;
/*----------------------------------------------------------------*/
/* Code Body */
/*----------------------------------------------------------------*/
g_id = mmi_frm_group_create(GRP_ID_RMGR_MAIN, GRP_ID_RMGR_RO_OPTIONS, mmi_rmgr_ro_options_evt_hdlr, NULL);
mmi_frm_group_enter(g_id, MMI_FRM_NODE_SMART_CLOSE_FLAG);
menu_cui_id = cui_menu_create(
g_id,
CUI_MENU_SRC_TYPE_RESOURCE,
CUI_MENU_TYPE_OPTION,
MENU_ID_RMGR_RO_OPTIONS,
MMI_FALSE,
NULL);
cui_menu_set_default_title_image(menu_cui_id,(UI_image_type)GetImage(mmi_rmgr_get_root_icon()));
cui_menu_run(menu_cui_id);
#if 0
/* under construction !*/
/* under construction !*/
/* under construction !*/
/* under construction !*/
/* under construction !*/
/* under construction !*/
/* under construction !*/
/* under construction !*/
/* under construction !*/
/* under construction !*/
/* under construction !*/
/* under construction !*/
/* under construction !*/
/* under construction !*/
/* under construction !*/
/* under construction !*/
/* under construction !*/
/* under construction !*/
/* under construction !*/
/* under construction !*/
/* under construction !*/
/* under construction !*/
/* under construction !*/
/* under construction !*/
/* under construction !*/
/* under construction !*/
#endif /*0*/
}
示例15: SetupDisplay
void TopLevel::newPage(){
if(!display_is_setup)
SetupDisplay();
XDefineCursor(qtdisplay, Win, WorkCursor);
XFlush(qtdisplay);
freeImages();
int k = -1;
if(!thispage) {
XDefineCursor(qtdisplay, Win, ReadyCursor);
return;
}
if (Pimage(thispage) == NULL){
while((k != 0) && (k != 3) && (k !=1))
k = GetImage(thispage);
}
if (k == 3 ){
XDefineCursor(qtdisplay, Win, ReadyCursor);
FreeFax();
/* KMessageBox::sorry(i18n("Bad fax file k=3"));*/
return;
}
if (k == 0 ){
XDefineCursor(qtdisplay, Win, ReadyCursor);
FreeFax();
/* KMessageBox::sorry(i18n("Bad fax file k=0"));*/
return;
}
Image = Images[0] = Pimage(thispage);
setCaption(QFile::decodeName(thispage->name));
Image = generateZoomImages(oz);
PaneWidth = Image->width;
PaneHeight = Image->height;
Refresh = 1;
XDefineCursor(qtdisplay, Win, ReadyCursor);
uiUpdate();
}