| 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 123 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 134 | 134 |
| 135 CodePath codePath(const TextRunPaintInfo&) const; | 135 CodePath codePath(const TextRunPaintInfo&) const; |
| 136 | 136 |
| 137 private: | 137 private: |
| 138 enum ForTextEmphasisOrNot { NotForTextEmphasis, ForTextEmphasis }; | 138 enum ForTextEmphasisOrNot { NotForTextEmphasis, ForTextEmphasis }; |
| 139 | 139 |
| 140 // Returns the initial in-stream advance. | 140 // Returns the initial in-stream advance. |
| 141 float buildGlyphBuffer(const TextRunPaintInfo&, GlyphBuffer&, ForTextEmphasi
sOrNot = NotForTextEmphasis) const; | 141 float buildGlyphBuffer(const TextRunPaintInfo&, GlyphBuffer&, ForTextEmphasi
sOrNot = NotForTextEmphasis) const; |
| 142 PassTextBlobPtr buildTextBlob(const GlyphBuffer&, float initialAdvance, cons
t FloatRect& bounds, | 142 PassTextBlobPtr buildTextBlob(const GlyphBuffer&, float initialAdvance, cons
t FloatRect& bounds, |
| 143 bool couldUseLCD) const; | 143 bool couldUseLCD) const; |
| 144 |
| 145 SkPaint textFillPaint(GraphicsContext*, const SimpleFontData*) const; |
| 146 SkPaint textStrokePaint(GraphicsContext*, const SimpleFontData*, bool isFill
ing) const; |
| 147 void paintGlyphs(GraphicsContext*, const SimpleFontData*, const Glyph glyphs
[], unsigned numGlyphs, |
| 148 const SkPoint pos[], const FloatRect& textRect) const; |
| 149 void paintGlyphsHorizontal(GraphicsContext*, const SimpleFontData*, const Gl
yph glyphs[], unsigned numGlyphs, |
| 150 const SkScalar xpos[], SkScalar constY, const FloatRect& textRect) const
; |
| 144 void drawGlyphs(GraphicsContext*, const SimpleFontData*, const GlyphBuffer&,
unsigned from, unsigned numGlyphs, const FloatPoint&, const FloatRect& textRect
) const; | 151 void drawGlyphs(GraphicsContext*, const SimpleFontData*, const GlyphBuffer&,
unsigned from, unsigned numGlyphs, const FloatPoint&, const FloatRect& textRect
) const; |
| 145 void drawTextBlob(GraphicsContext*, const SkTextBlob*, const SkPoint& origin
) const; | 152 void drawTextBlob(GraphicsContext*, const SkTextBlob*, const SkPoint& origin
) const; |
| 146 float drawGlyphBuffer(GraphicsContext*, const TextRunPaintInfo&, const Glyph
Buffer&, const FloatPoint&) const; | 153 float drawGlyphBuffer(GraphicsContext*, const TextRunPaintInfo&, const Glyph
Buffer&, const FloatPoint&) const; |
| 147 void drawEmphasisMarks(GraphicsContext*, const TextRunPaintInfo&, const Glyp
hBuffer&, const AtomicString&, const FloatPoint&) const; | 154 void drawEmphasisMarks(GraphicsContext*, const TextRunPaintInfo&, const Glyp
hBuffer&, const AtomicString&, const FloatPoint&) const; |
| 148 float floatWidthForSimpleText(const TextRun&, HashSet<const SimpleFontData*>
* fallbackFonts = 0, IntRectExtent* glyphBounds = 0) const; | 155 float floatWidthForSimpleText(const TextRun&, HashSet<const SimpleFontData*>
* fallbackFonts = 0, IntRectExtent* glyphBounds = 0) const; |
| 149 int offsetForPositionForSimpleText(const TextRun&, float position, bool incl
udePartialGlyphs) const; | 156 int offsetForPositionForSimpleText(const TextRun&, float position, bool incl
udePartialGlyphs) const; |
| 150 FloatRect selectionRectForSimpleText(const TextRun&, const FloatPoint&, int
h, int from, int to, bool accountForGlyphBounds) const; | 157 FloatRect selectionRectForSimpleText(const TextRun&, const FloatPoint&, int
h, int from, int to, bool accountForGlyphBounds) const; |
| 151 | 158 |
| 152 bool getEmphasisMarkGlyphData(const AtomicString&, GlyphData&) const; | 159 bool getEmphasisMarkGlyphData(const AtomicString&, GlyphData&) const; |
| 153 | 160 |
| (...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 210 { | 217 { |
| 211 if (!tabSize) | 218 if (!tabSize) |
| 212 return fontDescription().letterSpacing(); | 219 return fontDescription().letterSpacing(); |
| 213 float tabWidth = tabSize * fontData.spaceWidth() + fontDescription().letterS
pacing(); | 220 float tabWidth = tabSize * fontData.spaceWidth() + fontDescription().letterS
pacing(); |
| 214 return tabWidth - fmodf(position, tabWidth); | 221 return tabWidth - fmodf(position, tabWidth); |
| 215 } | 222 } |
| 216 | 223 |
| 217 } // namespace blink | 224 } // namespace blink |
| 218 | 225 |
| 219 #endif | 226 #endif |
| OLD | NEW |