本文整理汇总了C++中FXSYS_memset函数的典型用法代码示例。如果您正苦于以下问题:C++ FXSYS_memset函数的具体用法?C++ FXSYS_memset怎么用?C++ FXSYS_memset使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了FXSYS_memset函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。
示例1: FX_Alloc
FXFT_Face CFGAS_FontMgr::LoadFace(IFX_SeekableReadStream* pFontStream,
int32_t iFaceIndex) {
if (!pFontStream)
return nullptr;
CFX_FontMgr* pFontMgr = CFX_GEModule::Get()->GetFontMgr();
pFontMgr->InitFTLibrary();
FXFT_Library library = pFontMgr->GetFTLibrary();
if (!library)
return nullptr;
FXFT_Stream ftStream = FX_Alloc(FXFT_StreamRec, 1);
FXSYS_memset(ftStream, 0, sizeof(FXFT_StreamRec));
ftStream->base = nullptr;
ftStream->descriptor.pointer = pFontStream;
ftStream->pos = 0;
ftStream->size = static_cast<unsigned long>(pFontStream->GetSize());
ftStream->read = _ftStreamRead;
ftStream->close = _ftStreamClose;
FXFT_Open_Args ftArgs;
FXSYS_memset(&ftArgs, 0, sizeof(FXFT_Open_Args));
ftArgs.flags |= FT_OPEN_STREAM;
ftArgs.stream = ftStream;
FXFT_Face pFace = nullptr;
if (FXFT_Open_Face(library, &ftArgs, iFaceIndex, &pFace)) {
FX_Free(ftStream);
return nullptr;
}
FXFT_Set_Pixel_Sizes(pFace, 0, 64);
return pFace;
}
开发者ID:documentcloud,项目名称:pdfium,代码行数:34,代码来源:cfgas_fontmgr.cpp
示例2: FXSYS_memset
CCodec_JpegDecoder::CCodec_JpegDecoder() {
m_pScanlineBuf = nullptr;
m_bStarted = FALSE;
m_bInited = FALSE;
FXSYS_memset(&cinfo, 0, sizeof(cinfo));
FXSYS_memset(&jerr, 0, sizeof(jerr));
FXSYS_memset(&src, 0, sizeof(src));
m_nDefaultScaleDenom = 1;
}
开发者ID:hfiguiere,项目名称:pdfium,代码行数:9,代码来源:fx_codec_jpeg.cpp
示例3: FXSYS_memset
CCodec_JpegDecoder::CCodec_JpegDecoder() {
m_pScanlineBuf = NULL;
m_DownScale = 1;
m_bStarted = FALSE;
m_bInited = FALSE;
m_pExtProvider = NULL;
m_pExtContext = NULL;
FXSYS_memset(&cinfo, 0, sizeof(cinfo));
FXSYS_memset(&jerr, 0, sizeof(jerr));
FXSYS_memset(&src, 0, sizeof(src));
m_nDefaultScaleDenom = 1;
}
开发者ID:azunite,项目名称:libpdfium,代码行数:12,代码来源:fx_codec_jpeg.cpp
示例4: FX_Alloc
void CBC_CommonByteArray::Reserve(int32_t capacity) {
if (!m_bytes || m_size < capacity) {
uint8_t* newArray = FX_Alloc(uint8_t, capacity);
if (m_bytes) {
FXSYS_memcpy(newArray, m_bytes, m_size);
FXSYS_memset(newArray + m_size, 0, capacity - m_size);
} else {
FXSYS_memset(newArray, 0, capacity);
}
FX_Free(m_bytes);
m_bytes = newArray;
m_size = capacity;
}
}
开发者ID:documentcloud,项目名称:pdfium,代码行数:14,代码来源:BC_CommonByteArray.cpp
示例5: CRYPT_MD5Generate
CFX_ByteString CPDF_StandardSecurityHandler::GetUserPassword(
const uint8_t* owner_pass,
FX_DWORD pass_size,
int32_t key_len) {
CFX_ByteString okey = m_pEncryptDict->GetString(FX_BSTRC("O"));
uint8_t passcode[32];
FX_DWORD i;
for (i = 0; i < 32; i++) {
passcode[i] = i < pass_size ? owner_pass[i] : defpasscode[i - pass_size];
}
uint8_t digest[16];
CRYPT_MD5Generate(passcode, 32, digest);
if (m_Revision >= 3) {
for (int i = 0; i < 50; i++) {
CRYPT_MD5Generate(digest, 16, digest);
}
}
uint8_t enckey[32];
FXSYS_memset(enckey, 0, sizeof(enckey));
FX_DWORD copy_len = key_len;
if (copy_len > sizeof(digest)) {
copy_len = sizeof(digest);
}
FXSYS_memcpy(enckey, digest, copy_len);
int okeylen = okey.GetLength();
if (okeylen > 32) {
okeylen = 32;
}
uint8_t okeybuf[64];
FXSYS_memset(okeybuf, 0, sizeof(okeybuf));
FXSYS_memcpy(okeybuf, okey.c_str(), okeylen);
if (m_Revision == 2) {
CRYPT_ArcFourCryptBlock(okeybuf, okeylen, enckey, key_len);
} else {
for (int i = 19; i >= 0; i--) {
uint8_t tempkey[32];
FXSYS_memset(tempkey, 0, sizeof(tempkey));
for (int j = 0; j < m_KeyLen; j++) {
tempkey[j] = enckey[j] ^ i;
}
CRYPT_ArcFourCryptBlock(okeybuf, okeylen, tempkey, key_len);
}
}
int len = 32;
while (len && defpasscode[len - 1] == okeybuf[len - 1]) {
len--;
}
return CFX_ByteString(okeybuf, len);
}
开发者ID:hoanganhx86,项目名称:pdfium,代码行数:49,代码来源:fpdf_parser_encrypt.cpp
示例6: CalcEncryptKey
FX_BOOL CPDF_StandardSecurityHandler::CheckUserPassword(
const uint8_t* password,
FX_DWORD pass_size,
FX_BOOL bIgnoreEncryptMeta,
uint8_t* key,
int32_t key_len) {
CalcEncryptKey(m_pEncryptDict, password, pass_size, key, key_len,
bIgnoreEncryptMeta, m_pParser->GetIDArray());
CFX_ByteString ukey = m_pEncryptDict
? m_pEncryptDict->GetString(FX_BSTRC("U"))
: CFX_ByteString();
if (ukey.GetLength() < 16) {
return FALSE;
}
uint8_t ukeybuf[32];
if (m_Revision == 2) {
FXSYS_memcpy(ukeybuf, defpasscode, 32);
CRYPT_ArcFourCryptBlock(ukeybuf, 32, key, key_len);
} else {
uint8_t test[32], tmpkey[32];
FX_DWORD copy_len = sizeof(test);
if (copy_len > (FX_DWORD)ukey.GetLength()) {
copy_len = ukey.GetLength();
}
FXSYS_memset(test, 0, sizeof(test));
FXSYS_memset(tmpkey, 0, sizeof(tmpkey));
FXSYS_memcpy(test, ukey.c_str(), copy_len);
for (int i = 19; i >= 0; i--) {
for (int j = 0; j < key_len; j++) {
tmpkey[j] = key[j] ^ i;
}
CRYPT_ArcFourCryptBlock(test, 32, tmpkey, key_len);
}
uint8_t md5[100];
CRYPT_MD5Start(md5);
CRYPT_MD5Update(md5, defpasscode, 32);
CPDF_Array* pIdArray = m_pParser->GetIDArray();
if (pIdArray) {
CFX_ByteString id = pIdArray->GetString(0);
CRYPT_MD5Update(md5, (uint8_t*)id.c_str(), id.GetLength());
}
CRYPT_MD5Finish(md5, ukeybuf);
return FXSYS_memcmp(test, ukeybuf, 16) == 0;
}
if (FXSYS_memcmp((void*)ukey.c_str(), ukeybuf, 16) == 0) {
return TRUE;
}
return FALSE;
}
开发者ID:hoanganhx86,项目名称:pdfium,代码行数:49,代码来源:fpdf_parser_encrypt.cpp
示例7: m_pEditEngine
CFDE_TxtEdtPage::CFDE_TxtEdtPage(CFDE_TxtEdtEngine* pEngine, int32_t nPageIndex)
: m_pEditEngine(pEngine),
m_PieceMassArr(100),
m_pBgnParag(nullptr),
m_pEndParag(nullptr),
m_nRefCount(0),
m_nPageStart(-1),
m_nCharCount(0),
m_nPageIndex(nPageIndex),
m_bLoaded(FALSE) {
FXSYS_memset(&m_rtPage, 0, sizeof(CFX_RectF));
FXSYS_memset(&m_rtPageMargin, 0, sizeof(CFX_RectF));
FXSYS_memset(&m_rtPageContents, 0, sizeof(CFX_RectF));
FXSYS_memset(&m_rtPageCanvas, 0, sizeof(CFX_RectF));
}
开发者ID:gradescope,项目名称:pdfium,代码行数:15,代码来源:cfde_txtedtpage.cpp
示例8: FXSYS_memset
bool CCodec_RLScanlineDecoder::v_Rewind() {
FXSYS_memset(m_pScanline, 0, m_Pitch);
m_SrcOffset = 0;
m_bEOD = false;
m_Operator = 0;
return true;
}
开发者ID:luke-chang,项目名称:gecko-1,代码行数:7,代码来源:fx_codec.cpp
示例9: KillFocus
void CPWL_Wnd::Destroy() {
KillFocus();
OnDestroy();
if (m_bCreated) {
for (int32_t i = m_aChildren.GetSize() - 1; i >= 0; i--) {
if (CPWL_Wnd* pChild = m_aChildren[i]) {
pChild->Destroy();
delete pChild;
pChild = nullptr;
}
}
if (m_sPrivateParam.pParentWnd)
m_sPrivateParam.pParentWnd->OnNotify(this, PNM_REMOVECHILD);
m_bCreated = FALSE;
}
DestroyMsgControl();
FXSYS_memset(&m_sPrivateParam, 0, sizeof(PWL_CREATEPARAM));
m_aChildren.RemoveAll();
m_pVScrollBar = nullptr;
}
开发者ID:endlessm,项目名称:chromium-browser,代码行数:25,代码来源:PWL_Wnd.cpp
示例10: FX_Alloc
void CPDF_SecurityHandler::AES256_SetPerms(CPDF_Dictionary* pEncryptDict,
uint32_t permissions,
FX_BOOL bEncryptMetadata,
const uint8_t* key) {
uint8_t buf[16];
buf[0] = (uint8_t)permissions;
buf[1] = (uint8_t)(permissions >> 8);
buf[2] = (uint8_t)(permissions >> 16);
buf[3] = (uint8_t)(permissions >> 24);
buf[4] = 0xff;
buf[5] = 0xff;
buf[6] = 0xff;
buf[7] = 0xff;
buf[8] = bEncryptMetadata ? 'T' : 'F';
buf[9] = 'a';
buf[10] = 'd';
buf[11] = 'b';
uint8_t* aes = FX_Alloc(uint8_t, 2048);
CRYPT_AESSetKey(aes, 16, key, 32, TRUE);
uint8_t iv[16], buf1[16];
FXSYS_memset(iv, 0, 16);
CRYPT_AESSetIV(aes, iv);
CRYPT_AESEncrypt(aes, buf1, buf, 16);
FX_Free(aes);
pEncryptDict->SetAtString("Perms", CFX_ByteString(buf1, 16));
}
开发者ID:gradescope,项目名称:pdfium,代码行数:26,代码来源:cpdf_security_handler.cpp
示例11: BC_EXCEPTION_CHECK_ReturnVoid
void CBC_QRDecodedBitStreamParser::DecodeByteSegment(
CBC_CommonBitSource* bits,
CFX_ByteString& result,
int32_t count,
CBC_CommonCharacterSetECI* currentCharacterSetECI,
CFX_Int32Array* byteSegments,
int32_t byteModeDecode,
int32_t& e) {
if (count < 0) {
e = BCExceptionNotFound;
BC_EXCEPTION_CHECK_ReturnVoid(e);
}
if ((count << 3) > bits->Available()) {
e = BCExceptionRead;
BC_EXCEPTION_CHECK_ReturnVoid(e);
}
uint8_t* readBytes = FX_Alloc(uint8_t, count);
FXSYS_memset(readBytes, 0x00, count);
for (int32_t i = 0; i < count; i++) {
readBytes[i] = (uint8_t)bits->ReadBits(8, e);
BC_EXCEPTION_CHECK_ReturnVoid(e);
}
CFX_ByteString bs(readBytes, count);
result += bs;
FX_Free(readBytes);
}
开发者ID:andoma,项目名称:pdfium,代码行数:26,代码来源:BC_QRDecodedBitStreamParser.cpp
示例12: FXSYS_memset
FX_BOOL CCodec_RLScanlineDecoder::v_Rewind() {
FXSYS_memset(m_pScanline, 0, m_Pitch);
m_SrcOffset = 0;
m_bEOD = FALSE;
m_Operator = 0;
return TRUE;
}
开发者ID:hoanganhx86,项目名称:pdfium,代码行数:7,代码来源:fx_codec.cpp
示例13: pTextOut
FX_BOOL CFDE_TxtEdtEngine::IsFitArea(CFX_WideString& wsText) {
std::unique_ptr<CFDE_TextOut> pTextOut(new CFDE_TextOut);
pTextOut->SetLineSpace(m_Param.fLineSpace);
pTextOut->SetFont(m_Param.pFont);
pTextOut->SetFontSize(m_Param.fFontSize);
CFX_RectF rcText;
FXSYS_memset(&rcText, 0, sizeof(rcText));
uint32_t dwStyle = 0;
if (!(m_Param.dwMode & FDE_TEXTEDITMODE_MultiLines))
dwStyle |= FDE_TTOSTYLE_SingleLine;
if (m_Param.dwMode & FDE_TEXTEDITMODE_AutoLineWrap) {
dwStyle |= FDE_TTOSTYLE_LineWrap;
rcText.width = m_Param.fPlateWidth;
} else {
rcText.width = 65535;
}
pTextOut->SetStyles(dwStyle);
wsText += L"\n";
pTextOut->CalcLogicSize(wsText.c_str(), wsText.GetLength(), rcText);
wsText.Delete(wsText.GetLength() - 1);
if ((m_Param.dwMode & FDE_TEXTEDITMODE_LimitArea_Horz) &&
(rcText.width > m_Param.fPlateWidth)) {
return FALSE;
}
if ((m_Param.dwMode & FDE_TEXTEDITMODE_LimitArea_Vert) &&
(rcText.height > m_Param.fLineSpace * m_Param.nLineCount)) {
return FALSE;
}
return TRUE;
}
开发者ID:hfiguiere,项目名称:pdfium,代码行数:31,代码来源:cfde_txtedtengine.cpp
示例14: restorer
int CPDF_Object::GetInteger() const
{
CFX_AutoRestorer<int> restorer(&s_nCurRefDepth);
if (++s_nCurRefDepth > OBJECT_REF_MAX_DEPTH) {
return 0;
}
switch (m_Type) {
case PDFOBJ_BOOLEAN:
return ((CPDF_Boolean*)this)->m_bValue;
case PDFOBJ_NUMBER:
return ((CPDF_Number*)this)->GetInteger();
case PDFOBJ_REFERENCE: {
CPDF_Reference* pRef = (CPDF_Reference*)(void*)this;
PARSE_CONTEXT context;
FXSYS_memset(&context, 0, sizeof(PARSE_CONTEXT));
if (pRef->m_pObjList == NULL) {
return 0;
}
CPDF_Object* pObj = pRef->m_pObjList->GetIndirectObject(pRef->m_RefObjNum, &context);
if (pObj == NULL) {
return 0;
}
return pObj->GetInteger();
}
}
return 0;
}
开发者ID:abbro-ca,项目名称:pdfium,代码行数:27,代码来源:fpdf_parser_objects.cpp
示例15: DrawFreeGouraudShading
static void DrawFreeGouraudShading(CFX_DIBitmap* pBitmap,
CFX_Matrix* pObject2Bitmap,
CPDF_Stream* pShadingStream,
CPDF_Function** pFuncs,
int nFuncs,
CPDF_ColorSpace* pCS,
int alpha) {
ASSERT(pBitmap->GetFormat() == FXDIB_Argb);
CPDF_MeshStream stream;
if (!stream.Load(pShadingStream, pFuncs, nFuncs, pCS))
return;
CPDF_MeshVertex triangle[3];
FXSYS_memset(triangle, 0, sizeof(triangle));
while (!stream.m_BitStream.IsEOF()) {
CPDF_MeshVertex vertex;
FX_DWORD flag = stream.GetVertex(vertex, pObject2Bitmap);
if (flag == 0) {
triangle[0] = vertex;
for (int j = 1; j < 3; j++) {
stream.GetVertex(triangle[j], pObject2Bitmap);
}
} else {
if (flag == 1) {
triangle[0] = triangle[1];
}
triangle[1] = triangle[2];
triangle[2] = vertex;
}
DrawGouraud(pBitmap, alpha, triangle);
}
}
开发者ID:primiano,项目名称:pdfium-merge,代码行数:34,代码来源:fpdf_render_pattern.cpp
示例16: getErrorCorrectionCodewordCount
CFX_WideString CBC_PDF417ErrorCorrection::generateErrorCorrection(
CFX_WideString dataCodewords,
int32_t errorCorrectionLevel,
int32_t& e) {
int32_t k = getErrorCorrectionCodewordCount(errorCorrectionLevel, e);
if (e != BCExceptionNO)
return L" ";
FX_WCHAR* ech = FX_Alloc(FX_WCHAR, k);
FXSYS_memset(ech, 0, k * sizeof(FX_WCHAR));
int32_t sld = dataCodewords.GetLength();
for (int32_t i = 0; i < sld; i++) {
int32_t t1 = (dataCodewords.GetAt(i) + ech[k - 1]) % 929;
int32_t t2;
int32_t t3;
for (int32_t j = k - 1; j >= 1; j--) {
t2 = (t1 * EC_COEFFICIENTS[errorCorrectionLevel][j]) % 929;
t3 = 929 - t2;
ech[j] = (FX_WCHAR)((ech[j - 1] + t3) % 929);
}
t2 = (t1 * EC_COEFFICIENTS[errorCorrectionLevel][0]) % 929;
t3 = 929 - t2;
ech[0] = (FX_WCHAR)(t3 % 929);
}
CFX_WideString sb;
for (int32_t j = k - 1; j >= 0; j--) {
if (ech[j] != 0) {
ech[j] = (FX_WCHAR)(929 - ech[j]);
}
sb += (FX_WCHAR)ech[j];
}
FX_Free(ech);
return sb;
}
开发者ID:MIPS,项目名称:external-pdfium,代码行数:33,代码来源:BC_PDF417ErrorCorrection.cpp
示例17: FXSYS_memset
FXFT_Face CFPF_SkiaFontMgr::GetFontFace(IFX_FileRead* pFileRead,
int32_t iFaceIndex) {
if (!pFileRead) {
return nullptr;
}
if (pFileRead->GetSize() == 0) {
return nullptr;
}
if (iFaceIndex < 0) {
return nullptr;
}
FXFT_StreamRec streamRec;
FXSYS_memset(&streamRec, 0, sizeof(FXFT_StreamRec));
streamRec.size = pFileRead->GetSize();
streamRec.descriptor.pointer = pFileRead;
streamRec.read = FPF_SkiaStream_Read;
streamRec.close = FPF_SkiaStream_Close;
FXFT_Open_Args args;
args.flags = FT_OPEN_STREAM;
args.stream = &streamRec;
FXFT_Face face;
if (FXFT_Open_Face(m_FTLibrary, &args, iFaceIndex, &face)) {
return nullptr;
}
FXFT_Set_Pixel_Sizes(face, 0, 64);
return face;
}
开发者ID:gradescope,项目名称:pdfium,代码行数:27,代码来源:fpf_skiafontmgr.cpp
示例18: m_pTextSet
CFDE_TxtEdtPage::CFDE_TxtEdtPage(CFDE_TxtEdtEngine* pEngine, int32_t nPageIndex)
: m_pTextSet(nullptr),
m_pBgnParag(nullptr),
m_pEndParag(nullptr),
m_nRefCount(0),
m_nPageStart(-1),
m_nCharCount(0),
m_nPageIndex(nPageIndex),
m_bLoaded(FALSE),
m_pCharWidth(nullptr) {
FXSYS_memset(&m_rtPage, 0, sizeof(CFX_RectF));
FXSYS_memset(&m_rtPageMargin, 0, sizeof(CFX_RectF));
FXSYS_memset(&m_rtPageContents, 0, sizeof(CFX_RectF));
FXSYS_memset(&m_rtPageCanvas, 0, sizeof(CFX_RectF));
m_pEditEngine = static_cast<CFDE_TxtEdtEngine*>(pEngine);
}
开发者ID:endlessm,项目名称:chromium-browser,代码行数:16,代码来源:cfde_txtedtpage.cpp
示例19: FXSYS_memcpy
void CPDF_CryptoHandler::CryptBlock(bool bEncrypt,
uint32_t objnum,
uint32_t gennum,
const uint8_t* src_buf,
uint32_t src_size,
uint8_t* dest_buf,
uint32_t& dest_size) {
if (m_Cipher == FXCIPHER_NONE) {
FXSYS_memcpy(dest_buf, src_buf, src_size);
return;
}
uint8_t realkey[16];
int realkeylen = 16;
if (m_Cipher != FXCIPHER_AES || m_KeyLen != 32) {
uint8_t key1[32];
PopulateKey(objnum, gennum, key1);
if (m_Cipher == FXCIPHER_AES) {
FXSYS_memcpy(key1 + m_KeyLen + 5, "sAlT", 4);
}
CRYPT_MD5Generate(
key1, m_Cipher == FXCIPHER_AES ? m_KeyLen + 9 : m_KeyLen + 5, realkey);
realkeylen = m_KeyLen + 5;
if (realkeylen > 16) {
realkeylen = 16;
}
}
if (m_Cipher == FXCIPHER_AES) {
CRYPT_AESSetKey(m_pAESContext, 16, m_KeyLen == 32 ? m_EncryptKey : realkey,
m_KeyLen, bEncrypt);
if (bEncrypt) {
uint8_t iv[16];
for (int i = 0; i < 16; i++) {
iv[i] = (uint8_t)rand();
}
CRYPT_AESSetIV(m_pAESContext, iv);
FXSYS_memcpy(dest_buf, iv, 16);
int nblocks = src_size / 16;
CRYPT_AESEncrypt(m_pAESContext, dest_buf + 16, src_buf, nblocks * 16);
uint8_t padding[16];
FXSYS_memcpy(padding, src_buf + nblocks * 16, src_size % 16);
FXSYS_memset(padding + src_size % 16, 16 - src_size % 16,
16 - src_size % 16);
CRYPT_AESEncrypt(m_pAESContext, dest_buf + nblocks * 16 + 16, padding,
16);
dest_size = 32 + nblocks * 16;
} else {
CRYPT_AESSetIV(m_pAESContext, src_buf);
CRYPT_AESDecrypt(m_pAESContext, dest_buf, src_buf + 16, src_size - 16);
dest_size = src_size - 16;
dest_size -= dest_buf[dest_size - 1];
}
} else {
ASSERT(dest_size == src_size);
if (dest_buf != src_buf) {
FXSYS_memcpy(dest_buf, src_buf, src_size);
}
CRYPT_ArcFourCryptBlock(dest_buf, dest_size, realkey, realkeylen);
}
}
开发者ID:MIPS,项目名称:external-pdfium,代码行数:60,代码来源:cpdf_crypto_handler.cpp
示例20: FXSYS_memset
FX_FONTDESCRIPTOR const* CFGAS_FontMgr::FindFont(const FX_WCHAR* pszFontFamily,
uint32_t dwFontStyles,
uint32_t dwMatchFlags,
uint16_t wCodePage,
uint32_t dwUSB,
FX_WCHAR wUnicode) {
FX_FONTMATCHPARAMS params;
FXSYS_memset(¶ms, 0, sizeof(params));
params.dwUSB = dwUSB;
params.wUnicode = wUnicode;
params.wCodePage = wCodePage;
params.pwsFamily = pszFontFamily;
params.dwFontStyles = dwFontStyles;
params.dwMatchFlags = dwMatchFlags;
FX_FONTDESCRIPTOR const* pDesc = MatchDefaultFont(¶ms, m_FontFaces);
if (pDesc)
return pDesc;
if (!pszFontFamily || !m_pEnumerator)
return nullptr;
CFX_FontDescriptors namedFonts(100);
m_pEnumerator(namedFonts, pszFontFamily, wUnicode);
params.pwsFamily = nullptr;
pDesc = MatchDefaultFont(¶ms, namedFonts);
if (!pDesc)
return nullptr;
for (int32_t i = m_FontFaces.GetSize() - 1; i >= 0; i--) {
FX_FONTDESCRIPTOR const* pMatch = m_FontFaces.GetPtrAt(i);
if (*pMatch == *pDesc)
return pMatch;
}
int index = m_FontFaces.Add(*pDesc);
return m_FontFaces.GetPtrAt(index);
}
开发者ID:documentcloud,项目名称:pdfium,代码行数:34,代码来源:cfgas_fontmgr.cpp
注:本文中的FXSYS_memset函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论