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, 2011 Apple Inc. All rights reserved. | 5 * Copyright (C) 2003, 2006, 2007, 2011 Apple Inc. All rights reserved. |
6 * | 6 * |
7 * This library is free software; you can redistribute it and/or | 7 * This library is free software; you can redistribute it and/or |
8 * modify it under the terms of the GNU Library General Public | 8 * modify it under the terms of the GNU Library General Public |
9 * License as published by the Free Software Foundation; either | 9 * License as published by the Free Software Foundation; either |
10 * version 2 of the License, or (at your option) any later version. | 10 * version 2 of the License, or (at your option) any later version. |
(...skipping 197 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
208 | 208 |
209 void disableSpacing() { m_disableSpacing = true; } | 209 void disableSpacing() { m_disableSpacing = true; } |
210 void setDirection(TextDirection direction) { m_direction = direction; } | 210 void setDirection(TextDirection direction) { m_direction = direction; } |
211 void setDirectionalOverride(bool override) { m_directionalOverride = overrid
e; } | 211 void setDirectionalOverride(bool override) { m_directionalOverride = overrid
e; } |
212 void setCharacterScanForCodePath(bool scan) { m_characterScanForCodePath = s
can; } | 212 void setCharacterScanForCodePath(bool scan) { m_characterScanForCodePath = s
can; } |
213 void setUseComplexCodePath(bool useComplex) { m_useComplexCodePath = useComp
lex; } | 213 void setUseComplexCodePath(bool useComplex) { m_useComplexCodePath = useComp
lex; } |
214 | 214 |
215 class RenderingContext : public RefCounted<RenderingContext> { | 215 class RenderingContext : public RefCounted<RenderingContext> { |
216 public: | 216 public: |
217 virtual ~RenderingContext() { } | 217 virtual ~RenderingContext() { } |
218 | |
219 virtual GlyphData glyphDataForCharacter(const Font&, const TextRun&, Sim
pleShaper&, UChar32 character, bool mirror, int currentCharacter, unsigned& adva
nceLength) = 0; | |
220 virtual void drawSVGGlyphs(GraphicsContext*, const TextRun&, const Simpl
eFontData*, const GlyphBuffer&, int from, int to, const FloatPoint&) const = 0; | |
221 virtual float floatWidthUsingSVGFont(const Font&, const TextRun&, int& c
harsConsumed, Glyph& glyphId) const = 0; | |
222 }; | 218 }; |
223 | 219 |
224 RenderingContext* renderingContext() const { return m_renderingContext.get()
; } | 220 RenderingContext* renderingContext() const { return m_renderingContext.get()
; } |
225 void setRenderingContext(PassRefPtr<RenderingContext> context) { m_rendering
Context = context; } | 221 void setRenderingContext(PassRefPtr<RenderingContext> context) { m_rendering
Context = context; } |
226 | 222 |
227 private: | 223 private: |
228 union { | 224 union { |
229 const LChar* characters8; | 225 const LChar* characters8; |
230 const UChar* characters16; | 226 const UChar* characters16; |
231 } m_data; | 227 } m_data; |
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
272 | 268 |
273 const TextRun& run; | 269 const TextRun& run; |
274 int from; | 270 int from; |
275 int to; | 271 int to; |
276 FloatRect bounds; | 272 FloatRect bounds; |
277 RefPtr<const SkTextBlob>* cachedTextBlob; | 273 RefPtr<const SkTextBlob>* cachedTextBlob; |
278 }; | 274 }; |
279 | 275 |
280 } | 276 } |
281 #endif | 277 #endif |
OLD | NEW |