| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2000 Lars Knoll (knoll@kde.org) | 2 * Copyright (C) 2000 Lars Knoll (knoll@kde.org) |
| 3 * (C) 2000 Antti Koivisto (koivisto@kde.org) | 3 * (C) 2000 Antti Koivisto (koivisto@kde.org) |
| 4 * (C) 2000 Dirk Mueller (mueller@kde.org) | 4 * (C) 2000 Dirk Mueller (mueller@kde.org) |
| 5 * Copyright (C) 2003, 2006, 2007, 2010, 2011 Apple Inc. All rights reserved. | 5 * Copyright (C) 2003, 2006, 2007, 2010, 2011 Apple Inc. All rights reserved. |
| 6 * Copyright (C) 2008 Holger Hans Peter Freyther | 6 * Copyright (C) 2008 Holger Hans Peter Freyther |
| 7 * | 7 * |
| 8 * This library is free software; you can redistribute it and/or | 8 * This library is free software; you can redistribute it and/or |
| 9 * modify it under the terms of the GNU Library General Public | 9 * modify it under the terms of the GNU Library General Public |
| 10 * License as published by the Free Software Foundation; either | 10 * License as published by the Free Software Foundation; either |
| (...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 130 | 130 |
| 131 std::pair<GlyphData, GlyphPage*> glyphDataAndPageForCharacter(UChar32&, bool
mirror, bool normalizeSpace = false, FontDataVariant = AutoVariant) const; | 131 std::pair<GlyphData, GlyphPage*> glyphDataAndPageForCharacter(UChar32&, bool
mirror, bool normalizeSpace = false, FontDataVariant = AutoVariant) const; |
| 132 bool primaryFontHasGlyphForCharacter(UChar32) const; | 132 bool primaryFontHasGlyphForCharacter(UChar32) const; |
| 133 | 133 |
| 134 CodePath codePath(const TextRunPaintInfo&) const; | 134 CodePath codePath(const TextRunPaintInfo&) const; |
| 135 | 135 |
| 136 private: | 136 private: |
| 137 enum ForTextEmphasisOrNot { NotForTextEmphasis, ForTextEmphasis }; | 137 enum ForTextEmphasisOrNot { NotForTextEmphasis, ForTextEmphasis }; |
| 138 | 138 |
| 139 // Returns the total advance. | 139 // Returns the total advance. |
| 140 float buildGlyphBuffer(const TextRunPaintInfo&, GlyphBuffer&, ForTextEmphasi
sOrNot = NotForTextEmphasis) const; | 140 float buildGlyphBuffer(const TextRunPaintInfo&, GlyphBuffer&, const GlyphDat
a* emphasisData = nullptr) const; |
| 141 PassTextBlobPtr buildTextBlob(const GlyphBuffer&) const; | 141 PassTextBlobPtr buildTextBlob(const GlyphBuffer&) const; |
| 142 SkPaint textFillPaint(GraphicsContext*, const SimpleFontData*) const; | 142 SkPaint textFillPaint(GraphicsContext*, const SimpleFontData*) const; |
| 143 SkPaint textStrokePaint(GraphicsContext*, const SimpleFontData*, bool isFill
ing) const; | 143 SkPaint textStrokePaint(GraphicsContext*, const SimpleFontData*, bool isFill
ing) const; |
| 144 void paintGlyphs(GraphicsContext*, const SimpleFontData*, const Glyph glyphs
[], unsigned numGlyphs, | 144 void paintGlyphs(GraphicsContext*, const SimpleFontData*, const Glyph glyphs
[], unsigned numGlyphs, |
| 145 const SkPoint pos[], const FloatRect& textRect) const; | 145 const SkPoint pos[], const FloatRect& textRect) const; |
| 146 void paintGlyphsHorizontal(GraphicsContext*, const SimpleFontData*, const Gl
yph glyphs[], unsigned numGlyphs, | 146 void paintGlyphsHorizontal(GraphicsContext*, const SimpleFontData*, const Gl
yph glyphs[], unsigned numGlyphs, |
| 147 const SkScalar xpos[], SkScalar constY, const FloatRect& textRect) const
; | 147 const SkScalar xpos[], SkScalar constY, const FloatRect& textRect) const
; |
| 148 void paintGlyphsVertical(GraphicsContext*, const SimpleFontData*, const Glyp
hBuffer&, | 148 void paintGlyphsVertical(GraphicsContext*, const SimpleFontData*, const Glyp
hBuffer&, |
| 149 unsigned from, unsigned numGlyphs, const FloatPoint&, const FloatRect&)
const; | 149 unsigned from, unsigned numGlyphs, const FloatPoint&, const FloatRect&)
const; |
| 150 void drawGlyphs(GraphicsContext*, const SimpleFontData*, const GlyphBuffer&,
unsigned from, unsigned numGlyphs, const FloatPoint&, const FloatRect& textRect
) const; | 150 void drawGlyphs(GraphicsContext*, const SimpleFontData*, const GlyphBuffer&,
unsigned from, unsigned numGlyphs, const FloatPoint&, const FloatRect& textRect
) const; |
| 151 void drawTextBlob(GraphicsContext*, const SkTextBlob*, const SkPoint& origin
) const; | 151 void drawTextBlob(GraphicsContext*, const SkTextBlob*, const SkPoint& origin
) const; |
| 152 void drawGlyphBuffer(GraphicsContext*, const TextRunPaintInfo&, const GlyphB
uffer&, const FloatPoint&) const; | 152 void drawGlyphBuffer(GraphicsContext*, const TextRunPaintInfo&, const GlyphB
uffer&, const FloatPoint&) const; |
| 153 void drawEmphasisMarks(GraphicsContext*, const TextRunPaintInfo&, const Glyp
hBuffer&, const AtomicString&, const FloatPoint&) const; | |
| 154 float floatWidthForSimpleText(const TextRun&, HashSet<const SimpleFontData*>
* fallbackFonts = 0, IntRectOutsets* glyphBounds = 0) const; | 153 float floatWidthForSimpleText(const TextRun&, HashSet<const SimpleFontData*>
* fallbackFonts = 0, IntRectOutsets* glyphBounds = 0) const; |
| 155 int offsetForPositionForSimpleText(const TextRun&, float position, bool incl
udePartialGlyphs) const; | 154 int offsetForPositionForSimpleText(const TextRun&, float position, bool incl
udePartialGlyphs) const; |
| 156 FloatRect selectionRectForSimpleText(const TextRun&, const FloatPoint&, int
h, int from, int to, bool accountForGlyphBounds) const; | 155 FloatRect selectionRectForSimpleText(const TextRun&, const FloatPoint&, int
h, int from, int to, bool accountForGlyphBounds) const; |
| 157 | 156 |
| 158 bool getEmphasisMarkGlyphData(const AtomicString&, GlyphData&) const; | 157 bool getEmphasisMarkGlyphData(const AtomicString&, GlyphData&) const; |
| 159 | 158 |
| 160 float floatWidthForComplexText(const TextRun&, HashSet<const SimpleFontData*
>* fallbackFonts, IntRectOutsets* glyphBounds) const; | 159 float floatWidthForComplexText(const TextRun&, HashSet<const SimpleFontData*
>* fallbackFonts, IntRectOutsets* glyphBounds) const; |
| 161 int offsetForPositionForComplexText(const TextRun&, float position, bool inc
ludePartialGlyphs) const; | 160 int offsetForPositionForComplexText(const TextRun&, float position, bool inc
ludePartialGlyphs) const; |
| 162 FloatRect selectionRectForComplexText(const TextRun&, const FloatPoint&, int
h, int from, int to) const; | 161 FloatRect selectionRectForComplexText(const TextRun&, const FloatPoint&, int
h, int from, int to) const; |
| 163 | 162 |
| (...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 223 // to the next tab stop is less than that, advance an additional tab stop. | 222 // to the next tab stop is less than that, advance an additional tab stop. |
| 224 if (distanceToTabStop < fontDescription().letterSpacing()) | 223 if (distanceToTabStop < fontDescription().letterSpacing()) |
| 225 distanceToTabStop += baseTabWidth; | 224 distanceToTabStop += baseTabWidth; |
| 226 | 225 |
| 227 return distanceToTabStop; | 226 return distanceToTabStop; |
| 228 } | 227 } |
| 229 | 228 |
| 230 } // namespace blink | 229 } // namespace blink |
| 231 | 230 |
| 232 #endif | 231 #endif |
| OLD | NEW |