Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 /* | 1 /* |
| 2 * Copyright 2013 Google Inc. | 2 * Copyright 2013 Google Inc. |
| 3 * | 3 * |
| 4 * Use of this source code is governed by a BSD-style license that can be | 4 * Use of this source code is governed by a BSD-style license that can be |
| 5 * found in the LICENSE file. | 5 * found in the LICENSE file. |
| 6 */ | 6 */ |
| 7 | 7 |
| 8 // TODO(edisonn): this file not commented much on purpose. | 8 // TODO(edisonn): this file not commented much on purpose. |
| 9 // It will probably need heavy refactoring soon anyway to support all encodings, fonts and | 9 // It will probably need heavy refactoring soon anyway to support all encodings, fonts and |
| 10 // proper text sizing and spacing | 10 // proper text sizing and spacing |
| (...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 78 class SkPdfEncoding { | 78 class SkPdfEncoding { |
| 79 public: | 79 public: |
| 80 virtual ~SkPdfEncoding() {} | 80 virtual ~SkPdfEncoding() {} |
| 81 virtual bool decodeText(const SkUnencodedText& textIn, SkDecodedText* textOu t) const = 0; | 81 virtual bool decodeText(const SkUnencodedText& textIn, SkDecodedText* textOu t) const = 0; |
| 82 static SkPdfEncoding* fromName(const char* name); | 82 static SkPdfEncoding* fromName(const char* name); |
| 83 }; | 83 }; |
| 84 | 84 |
| 85 SkTDict<SkPdfEncoding*>& getStandardEncodings(); | 85 SkTDict<SkPdfEncoding*>& getStandardEncodings(); |
| 86 | 86 |
| 87 class SkPdfToUnicode { | 87 class SkPdfToUnicode { |
| 88 SkPdfNativeDoc* fParsed; | |
|
bungeman-skia
2014/01/08 16:41:35
Must admit I have no idea why this was there, and
| |
| 89 // TODO(edisonn): hide public members | 88 // TODO(edisonn): hide public members |
| 90 public: | 89 public: |
| 91 unsigned short* fCMapEncoding; | 90 unsigned short* fCMapEncoding; |
| 92 unsigned char* fCMapEncodingFlag; | 91 unsigned char* fCMapEncodingFlag; |
| 93 | 92 |
| 94 SkPdfToUnicode(SkPdfNativeDoc* parsed, SkPdfStream* stream); | 93 SkPdfToUnicode(SkPdfNativeDoc* parsed, SkPdfStream* stream); |
| 95 }; | 94 }; |
| 96 | 95 |
| 97 | 96 |
| 98 class SkPdfIdentityHEncoding : public SkPdfEncoding { | 97 class SkPdfIdentityHEncoding : public SkPdfEncoding { |
| (...skipping 372 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 471 SkDoubleToScalar(pdfContext->fGraphicsState.fCurFontSize * | 470 SkDoubleToScalar(pdfContext->fGraphicsState.fCurFontSize * |
| 472 fChars[ch - fFirstChar].fWidth), | 471 fChars[ch - fFirstChar].fWidth), |
| 473 SkDoubleToScalar(0.0)); | 472 SkDoubleToScalar(0.0)); |
| 474 return fChars[ch - fFirstChar].fWidth; | 473 return fChars[ch - fFirstChar].fWidth; |
| 475 } | 474 } |
| 476 | 475 |
| 477 virtual void afterWord(SkPaint* paint, SkMatrix* matrix) {} | 476 virtual void afterWord(SkPaint* paint, SkMatrix* matrix) {} |
| 478 }; | 477 }; |
| 479 | 478 |
| 480 #endif // SkPdfFont_DEFINED | 479 #endif // SkPdfFont_DEFINED |
| OLD | NEW |