OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2011 Google Inc. | 2 * Copyright 2011 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 | 8 |
9 #include "SkData.h" | 9 #include "SkData.h" |
10 #include "SkGeometry.h" | 10 #include "SkGeometry.h" |
11 #include "SkPaint.h" | |
12 #include "SkPath.h" | |
13 #include "SkPDFResourceDict.h" | 11 #include "SkPDFResourceDict.h" |
14 #include "SkPDFUtils.h" | 12 #include "SkPDFUtils.h" |
15 #include "SkStream.h" | 13 #include "SkStream.h" |
16 #include "SkString.h" | 14 #include "SkString.h" |
17 #include "SkPDFTypes.h" | 15 #include "SkPDFTypes.h" |
18 | 16 |
19 #include <cmath> | 17 #include <cmath> |
20 | 18 |
21 sk_sp<SkPDFArray> SkPDFUtils::RectToArray(const SkRect& rect) { | 19 sk_sp<SkPDFArray> SkPDFUtils::RectToArray(const SkRect& rect) { |
22 auto result = sk_make_sp<SkPDFArray>(); | 20 auto result = sk_make_sp<SkPDFArray>(); |
(...skipping 385 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
408 uint8_t c = static_cast<uint8_t>(cin[i]); | 406 uint8_t c = static_cast<uint8_t>(cin[i]); |
409 static const char gHex[] = "0123456789ABCDEF"; | 407 static const char gHex[] = "0123456789ABCDEF"; |
410 char hexValue[2]; | 408 char hexValue[2]; |
411 hexValue[0] = gHex[(c >> 4) & 0xF]; | 409 hexValue[0] = gHex[(c >> 4) & 0xF]; |
412 hexValue[1] = gHex[ c & 0xF]; | 410 hexValue[1] = gHex[ c & 0xF]; |
413 wStream->write(hexValue, 2); | 411 wStream->write(hexValue, 2); |
414 } | 412 } |
415 wStream->writeText(">"); | 413 wStream->writeText(">"); |
416 } | 414 } |
417 } | 415 } |
OLD | NEW |