本文整理汇总了C++中LoadPage函数的典型用法代码示例。如果您正苦于以下问题:C++ LoadPage函数的具体用法?C++ LoadPage怎么用?C++ LoadPage使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了LoadPage函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: TEST_F
TEST_F(FPDFViewEmbeddertest, Page) {
EXPECT_TRUE(OpenDocument("about_blank.pdf"));
FPDF_PAGE page = LoadPage(0);
EXPECT_NE(nullptr, page);
EXPECT_EQ(612.0, FPDF_GetPageWidth(page));
EXPECT_EQ(792.0, FPDF_GetPageHeight(page));
UnloadPage(page);
EXPECT_EQ(nullptr, LoadPage(1));
}
示例2: FillPersistentMemory
Status FillPersistentMemory(Reference reference, int count, byte data)
{
Status result = OK;
int pageIndex = reference / FLASH_PAGE_SIZE;
int pageOffset = pageIndex * FLASH_PAGE_SIZE;
Reference pageBase = pageOffset;
int workIndex = reference - pageOffset;
while ((result == OK) && (count > 0))
{
int i;
int end = workIndex + count;
if (end > FLASH_PAGE_SIZE)
{
end = FLASH_PAGE_SIZE;
}
LoadPage(pageBase);
for (i = workIndex; i < end; ++i)
{
workMemory[i] = data;
}
result = StorePage(pageBase);
workIndex = 0;
pageBase += FLASH_PAGE_SIZE;
count -= end - workIndex;
}
return result;
}
示例3: LoadPage
void CGUIManager::PushPage(const CStrW& pageName, shared_ptr<ScriptInterface::StructuredClone> initData)
{
m_PageStack.push_back(SGUIPage());
m_PageStack.back().name = pageName;
m_PageStack.back().initData = initData;
LoadPage(m_PageStack.back());
}
示例4: LoadPage
int OGRESRIFeatureServiceDataset::LoadNextPage()
{
if( !poCurrent->HasOtherPages() )
return FALSE;
nLastOffset += poCurrent->GetLayer(0)->GetFeatureCount();
return LoadPage();
}
示例5: WritePage
Status WritePage(Reference pageBase, int index, int length, void* buffer, int* written)
{
LoadPage(pageBase);
*written = (index + length <= FLASH_PAGE_SIZE) ? length : FLASH_PAGE_SIZE - index;
ModifyPageData(index, *written, buffer);
return StorePage(pageBase);
}
示例6: TEST_F
TEST_F(FPDFParserEmbeddertest, Bug_481363) {
// Test colorspace object with malformed dictionary.
EXPECT_TRUE(OpenDocument("testing/resources/bug_481363.pdf"));
FPDF_PAGE page = LoadPage(0);
EXPECT_NE(nullptr, page);
UnloadPage(page);
}
示例7: LoadPage
SceneryPage* SceneryZone::GetOrCreatePage(const SceneryPageKey& key)
{
PAGEMAP::iterator it = mPages.find(key);
if(it != mPages.end())
return &it->second;
return LoadPage(key);
}
示例8: Temp
//---------------------------------------------------------------------------
void GUI_Main_HTML::GUI_Refresh()
{
std::string Temp(wxConvUTF8.cWX2MB(C->Inform_Get().c_str()));
wxFileSystem::AddHandler(new wxMemoryFSHandler);
wxMemoryFSHandler::AddFile(__T("index.html"), Temp.c_str(), Temp.size());
LoadPage(__T("memory:index.html"));
wxMemoryFSHandler::RemoveFile(__T("index.html"));
}
示例9: QMainWindow
WebPageWindow::WebPageWindow(QString givenUrl,QWidget *parent) :
QMainWindow(parent),
ui(new Ui::WebPageWindow)
{
m_pUrl = new QUrl(givenUrl);
this->Init();
LoadPage();
}
示例10: LoadPage
/// Retrieve BLOB from storage
TThinMIn TPgBlob::Get(const TPgBlobPt& Pt) {
char* Pg = LoadPage(Pt);
TPgBlobPageItem* Item = GetItemRec(Pg, Pt.GetIIx());
char* Data;
int Len = Item->Len;
GetItem(Pg, Pt.GetIIx(), &Data, Len);
return TThinMIn(Data, Len);
}
示例11: TEST_F
TEST_F(FXGETextEmbedderTest, BadItalic) {
// Shouldn't crash.
EXPECT_TRUE(OpenDocument("bug_601362.pdf"));
FPDF_PAGE page = LoadPage(0);
EXPECT_NE(nullptr, page);
FPDF_BITMAP bitmap = RenderPage(page);
FPDFBitmap_Destroy(bitmap);
UnloadPage(page);
}
示例12: TEST_F
TEST_F(FXCodecEmbeddertest, Bug_631912) {
// Test jbig2 image in PDF file can be loaded successfully.
// Should not crash.
EXPECT_TRUE(OpenDocument("bug_631912.pdf"));
FPDF_PAGE page = LoadPage(0);
EXPECT_NE(nullptr, page);
FPDF_BITMAP bitmap = RenderPage(page);
FPDFBitmap_Destroy(bitmap);
UnloadPage(page);
}
示例13: TEST_F
TEST_F(FPDFRenderLoadImageEmbeddertest, Bug_557223) {
// Should not crash
EXPECT_TRUE(OpenDocument("bug_557223.pdf"));
FPDF_PAGE page = LoadPage(0);
EXPECT_NE(nullptr, page);
FPDF_BITMAP bitmap = RenderPage(page);
CompareBitmap(bitmap, 24, 24, "dc0ea1b743c2edb22c597cadc8537f7b");
FPDFBitmap_Destroy(bitmap);
UnloadPage(page);
}
示例14: InitPageP
/// Create new page and return pointers to it
void TPgBlob::CreateNewPage(TPgBlobPgPt& Pt, char** Bf) {
// determine if last file is empty
if (Files.Len() > 0) {
// try to add to last file
long Pg = Files.Last()->CreateNewPage();
if (Pg >= 0) {
Pt.Set(Files.Len() - 1, (uint32)Pg);
*Bf = LoadPage(Pt, false);
InitPageP(*Bf);
return;
}
}
TStr NewFNm = FNm + ".bin" + TStr::GetNrNumFExt(Files.Len());
Files.Add(TPgBlobFile::New(NewFNm, TFAccess::faCreate, MxBlobFLen));
long Pg = Files.Last()->CreateNewPage();
EAssert(Pg >= 0);
Pt.Set(Files.Len() - 1, (uint32)Pg);
*Bf = LoadPage(Pt, false);
InitPageP(*Bf);
}
示例15: LoadPage
int OGRESRIFeatureServiceDataset::ResetReading()
{
if( nLastOffset > nFirstOffset )
{
nLastOffset = nFirstOffset;
return LoadPage();
}
poCurrent->GetLayer(0)->ResetReading();
return TRUE;
}