| 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 #include "SkData.h" | 8 #include "SkData.h" |
| 9 #include "SkPaint.h" |
| 9 #include "SkPDFCanon.h" | 10 #include "SkPDFCanon.h" |
| 10 #include "SkPDFFormXObject.h" | 11 #include "SkPDFFormXObject.h" |
| 11 #include "SkPDFGraphicState.h" | 12 #include "SkPDFGraphicState.h" |
| 12 #include "SkPDFUtils.h" | 13 #include "SkPDFUtils.h" |
| 13 | 14 |
| 14 static const char* as_blend_mode(SkXfermode::Mode mode) { | 15 static const char* as_blend_mode(SkXfermode::Mode mode) { |
| 15 switch (mode) { | 16 switch (mode) { |
| 16 case SkXfermode::kSrcOver_Mode: | 17 case SkXfermode::kSrcOver_Mode: |
| 17 return "Normal"; | 18 return "Normal"; |
| 18 case SkXfermode::kMultiply_Mode: | 19 case SkXfermode::kMultiply_Mode: |
| (...skipping 184 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 203 static_assert(SkPaint::kJoinCount == 3, "paint_join_mismatch"); | 204 static_assert(SkPaint::kJoinCount == 3, "paint_join_mismatch"); |
| 204 SkASSERT(strokeJoin >= 0 && strokeJoin <= 2); | 205 SkASSERT(strokeJoin >= 0 && strokeJoin <= 2); |
| 205 dict->insertInt("LJ", strokeJoin); | 206 dict->insertInt("LJ", strokeJoin); |
| 206 | 207 |
| 207 dict->insertScalar("LW", fStrokeWidth); | 208 dict->insertScalar("LW", fStrokeWidth); |
| 208 dict->insertScalar("ML", fStrokeMiter); | 209 dict->insertScalar("ML", fStrokeMiter); |
| 209 dict->insertBool("SA", true); // SA = Auto stroke adjustment. | 210 dict->insertBool("SA", true); // SA = Auto stroke adjustment. |
| 210 dict->insertName("BM", as_blend_mode(xferMode)); | 211 dict->insertName("BM", as_blend_mode(xferMode)); |
| 211 dict->emitObject(stream, objNumMap, substitutes); | 212 dict->emitObject(stream, objNumMap, substitutes); |
| 212 } | 213 } |
| OLD | NEW |