コード例 #1
0
ファイル: FontPlatformData.cpp プロジェクト: mirror/chromium
bool FontPlatformData::operator==(const FontPlatformData& a) const {
  // If either of the typeface pointers are null then we test for pointer
  // equality. Otherwise, we call SkTypeface::Equal on the valid pointers.
  bool typefacesEqual = false;
  if (!typeface() || !a.typeface())
    typefacesEqual = typeface() == a.typeface();
  else
    typefacesEqual = SkTypeface::Equal(typeface(), a.typeface());

  return typefacesEqual && m_textSize == a.m_textSize &&
         m_isHashTableDeletedValue == a.m_isHashTableDeletedValue &&
         m_syntheticBold == a.m_syntheticBold &&
         m_syntheticItalic == a.m_syntheticItalic
#if OS(LINUX) || OS(ANDROID)
         && m_style == a.m_style
#endif
         && m_orientation == a.m_orientation;
}
コード例 #2
0
void paintSkiaText(GraphicsContext* context,
                   const FontPlatformData& data,
                   int numGlyphs,
                   const WORD* glyphs,
                   const int* advances,
                   const GOFFSET* offsets,
                   const SkPoint* origin)
{
    paintSkiaText(context, data.hfont(), data.typeface(), data.size(), data.lfQuality(),
                  numGlyphs, glyphs, advances, offsets, origin);
}
void paintSkiaText(GraphicsContext* context,
                   const FontPlatformData& data,
                   int numGlyphs,
                   const WORD* glyphs,
                   const int* advances,
                   const GOFFSET* offsets,
                   const SkPoint& origin,
                   const SkRect& textRect)
{
    paintSkiaText(context, data.hfont(), data.typeface(), data.size(), data.paintTextFlags(),
                  numGlyphs, glyphs, advances, offsets, origin, textRect);
}