您当前的位置:首页 > IT编程 > C++
| C语言 | Java | VB | VC | python | Android | TensorFlow | C++ | oracle | 学术与代码 | cnn卷积神经网络 | gnn | 图像修复 | Keras | 数据集 | Neo4j | 自然语言处理 | 深度学习 | 医学CAD | 医学影像 | 超参数 | pointnet | pytorch | 异常检测 | Transformers | 情感分类 | 知识图谱 |

自学教程:C++ FXSYS_memset函数代码示例

51自学网 2021-06-01 20:45:23
  C++
这篇教程C++ FXSYS_memset函数代码示例写得很实用,希望能帮到您。

本文整理汇总了C++中FXSYS_memset函数的典型用法代码示例。如果您正苦于以下问题:C++ FXSYS_memset函数的具体用法?C++ FXSYS_memset怎么用?C++ FXSYS_memset使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。

在下文中一共展示了FXSYS_memset函数的28个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的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,


示例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,


示例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,


示例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,


示例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,


示例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,


示例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,


示例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,


示例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,


示例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,


示例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,


示例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,


示例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,


示例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,


示例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,


示例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,


示例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,


示例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,


示例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,


示例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(&params, 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(&params, 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(&params, 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,


示例21: FXSYS_memset

CFX_FontMapper::CFX_FontMapper(){    FXSYS_memset(m_FoxitFaces, 0, sizeof m_FoxitFaces);    m_MMFaces[0] = m_MMFaces[1] = NULL;    m_pFontInfo = NULL;    m_bListLoaded = FALSE;    m_pFontEnumerator = NULL;}
开发者ID:mariospr,项目名称:chromium-browser,代码行数:8,


示例22: FXSYS_memset

CPDF_GeneralStateData::CPDF_GeneralStateData() {  FXSYS_memset(this, 0, sizeof(CPDF_GeneralStateData));  FXSYS_strcpy((FX_CHAR*)m_BlendMode, "Normal");  m_StrokeAlpha = 1.0f;  m_FillAlpha = 1.0f;  m_Flatness = 1.0f;  m_Matrix.SetIdentity();}
开发者ID:endlessm,项目名称:chromium-browser,代码行数:8,


示例23: GetNextOperator

uint8_t* CCodec_RLScanlineDecoder::v_GetNextLine(){    if (m_SrcOffset == 0) {        GetNextOperator();    } else {        if (m_bEOD) {            return NULL;        }    }    FXSYS_memset(m_pScanline, 0, m_Pitch);    FX_DWORD col_pos = 0;    FX_BOOL	eol = FALSE;    while (m_SrcOffset < m_SrcSize && !eol) {        if (m_Operator < 128) {            FX_DWORD copy_len = m_Operator + 1;            if (col_pos + copy_len >= m_dwLineBytes) {                copy_len = m_dwLineBytes - col_pos;                eol = TRUE;            }            if (copy_len >= m_SrcSize - m_SrcOffset) {                copy_len = m_SrcSize - m_SrcOffset;                m_bEOD = TRUE;            }            FXSYS_memcpy(m_pScanline + col_pos, m_pSrcBuf + m_SrcOffset, copy_len);            col_pos += copy_len;            UpdateOperator((uint8_t)copy_len);        } else if (m_Operator > 128) {            int fill = 0;            if (m_SrcOffset - 1 < m_SrcSize - 1) {                fill = m_pSrcBuf[m_SrcOffset];            }            FX_DWORD duplicate_len = 257 - m_Operator;            if (col_pos + duplicate_len >= m_dwLineBytes) {                duplicate_len = m_dwLineBytes - col_pos;                eol = TRUE;            }            FXSYS_memset(m_pScanline + col_pos, fill, duplicate_len);            col_pos += duplicate_len;            UpdateOperator((uint8_t)duplicate_len);        } else {            m_bEOD = TRUE;            break;        }    }    return m_pScanline;}
开发者ID:abbro-ca,项目名称:pdfium,代码行数:46,


示例24: ExpandBuf

void CFX_BinaryBuf::AppendFill(uint8_t byte, FX_STRSIZE count) {  ExpandBuf(count);  if (!m_pBuffer) {    return;  }  FXSYS_memset(m_pBuffer + m_DataSize, byte, count);  m_DataSize += count;}
开发者ID:primiano,项目名称:pdfium-merge,代码行数:8,


示例25: FX_Alloc2D

void CBC_CommonBitMatrix::Init(int32_t width, int32_t height) {  m_width = width;  m_height = height;  int32_t rowSize = (width + 31) >> 5;  m_rowSize = rowSize;  m_bits = FX_Alloc2D(int32_t, m_rowSize, m_height);  FXSYS_memset(m_bits, 0, m_rowSize * m_height * sizeof(int32_t));}
开发者ID:andoma,项目名称:pdfium,代码行数:8,


示例26: GetNextOperator

uint8_t* CCodec_RLScanlineDecoder::v_GetNextLine() {  if (m_SrcOffset == 0) {    GetNextOperator();  } else {    if (m_bEOD) {      return nullptr;    }  }  FXSYS_memset(m_pScanline, 0, m_Pitch);  uint32_t col_pos = 0;  bool eol = false;  while (m_SrcOffset < m_SrcSize && !eol) {    if (m_Operator < 128) {      uint32_t copy_len = m_Operator + 1;      if (col_pos + copy_len >= m_dwLineBytes) {        copy_len = m_dwLineBytes - col_pos;        eol = true;      }      if (copy_len >= m_SrcSize - m_SrcOffset) {        copy_len = m_SrcSize - m_SrcOffset;        m_bEOD = true;      }      FXSYS_memcpy(m_pScanline + col_pos, m_pSrcBuf + m_SrcOffset, copy_len);      col_pos += copy_len;      UpdateOperator((uint8_t)copy_len);    } else if (m_Operator > 128) {      int fill = 0;      if (m_SrcOffset - 1 < m_SrcSize - 1) {        fill = m_pSrcBuf[m_SrcOffset];      }      uint32_t duplicate_len = 257 - m_Operator;      if (col_pos + duplicate_len >= m_dwLineBytes) {        duplicate_len = m_dwLineBytes - col_pos;        eol = true;      }      FXSYS_memset(m_pScanline + col_pos, fill, duplicate_len);      col_pos += duplicate_len;      UpdateOperator((uint8_t)duplicate_len);    } else {      m_bEOD = true;      break;    }  }  return m_pScanline;}
开发者ID:luke-chang,项目名称:gecko-1,代码行数:45,


示例27: FXSYS_memset

FX_FILESIZE CFXCRT_FileAccess_Posix::GetSize() const {  if (m_nFD < 0) {    return 0;  }  struct stat s;  FXSYS_memset(&s, 0, sizeof(s));  fstat(m_nFD, &s);  return s.st_size;}
开发者ID:gradescope,项目名称:pdfium,代码行数:9,


示例28: FX_Free

bool CFX_BasicArray::SetSize(int nNewSize) {  if (nNewSize <= 0) {    FX_Free(m_pData);    m_pData = nullptr;    m_nSize = m_nMaxSize = 0;    return 0 == nNewSize;  }  if (!m_pData) {    pdfium::base::CheckedNumeric<int> totalSize = nNewSize;    totalSize *= m_nUnitSize;    if (!totalSize.IsValid()) {      m_nSize = m_nMaxSize = 0;      return false;    }    m_pData =        FX_Alloc(uint8_t, pdfium::base::ValueOrDieForType<size_t>(totalSize));    m_nSize = m_nMaxSize = nNewSize;  } else if (nNewSize <= m_nMaxSize) {    if (nNewSize > m_nSize) {      FXSYS_memset(m_pData + m_nSize * m_nUnitSize, 0,                   (nNewSize - m_nSize) * m_nUnitSize);    }    m_nSize = nNewSize;  } else {    int nNewMax = nNewSize < m_nMaxSize ? m_nMaxSize : nNewSize;    pdfium::base::CheckedNumeric<int> totalSize = nNewMax;    totalSize *= m_nUnitSize;    if (!totalSize.IsValid() || nNewMax < m_nSize) {      return false;    }    uint8_t* pNewData = FX_Realloc(        uint8_t, m_pData, pdfium::base::ValueOrDieForType<size_t>(totalSize));    if (!pNewData) {      return false;    }    FXSYS_memset(pNewData + m_nSize * m_nUnitSize, 0,                 (nNewMax - m_nSize) * m_nUnitSize);    m_pData = pNewData;    m_nSize = nNewSize;    m_nMaxSize = nNewMax;  }  return true;}
开发者ID:MIPS,项目名称:external-pdfium,代码行数:44,



注:本文中的FXSYS_memset函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


C++ FXSYS_round函数代码示例
C++ FXSYS_memcpy函数代码示例
万事OK自学网:51自学网_软件自学网_CAD自学网自学excel、自学PS、自学CAD、自学C语言、自学css3实例,是一个通过网络自主学习工作技能的自学平台,网友喜欢的软件自学网站。