OLD | NEW |
1 #ifndef __DEFINED__SkPdfBasics | 1 #ifndef __DEFINED__SkPdfBasics |
2 #define __DEFINED__SkPdfBasics | 2 #define __DEFINED__SkPdfBasics |
3 | 3 |
4 #include "SkCanvas.h" | 4 #include "SkCanvas.h" |
5 #include "SkPaint.h" | 5 #include "SkPaint.h" |
6 #include "SkPdfConfig.h" | 6 #include "SkPdfConfig.h" |
7 | 7 |
8 #include <iostream> | 8 #include <iostream> |
9 #include <cstdio> | 9 #include <cstdio> |
10 #include <map> | 10 #include <map> |
(...skipping 171 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
182 | 182 |
183 | 183 |
184 /* | 184 /* |
185 blend mode name or array (PDF 1.4) The current blend mode to be used in t
he transparent | 185 blend mode name or array (PDF 1.4) The current blend mode to be used in t
he transparent |
186 imaging model (see Sections 7.2.4, “Blend Mode,”
and 7.5.2, “Spec- | 186 imaging model (see Sections 7.2.4, “Blend Mode,”
and 7.5.2, “Spec- |
187 ifying Blending Color Space and Blend Mode”). Th
is parameter is | 187 ifying Blending Color Space and Blend Mode”). Th
is parameter is |
188 implicitly reset to its initial value at the beg
inning of execution of a | 188 implicitly reset to its initial value at the beg
inning of execution of a |
189 transparency group XObject (see Section 7.5.5, “
Transparency | 189 transparency group XObject (see Section 7.5.5, “
Transparency |
190 Group XObjects”). Initial value: Normal. | 190 Group XObjects”). Initial value: Normal. |
191 */ | 191 */ |
192 SkXfermode::Mode fBlendMode; | 192 SkXfermode::Mode fBlendModes[256]; |
| 193 int fBlendModesLength; |
193 | 194 |
194 /* | 195 /* |
195 soft mask dictionary (PDF 1.4) A soft-mask dictionary (see “Soft-Mask
Dictionaries” on | 196 soft mask dictionary (PDF 1.4) A soft-mask dictionary (see “Soft-Mask
Dictionaries” on |
196 or name page 445) specifying the mask shape or mask opac
ity values to be | 197 or name page 445) specifying the mask shape or mask opac
ity values to be |
197 used in the transparent imaging model (see “Sour
ce Shape and | 198 used in the transparent imaging model (see “Sour
ce Shape and |
198 Opacity” on page 421 and “Mask Shape and Opacity
” on page 443), | 199 Opacity” on page 421 and “Mask Shape and Opacity
” on page 443), |
199 or the name None if no such mask is specified. Th
is parameter is | 200 or the name None if no such mask is specified. Th
is parameter is |
200 implicitly reset to its initial value at the beg
inning of execution of a | 201 implicitly reset to its initial value at the beg
inning of execution of a |
201 transparency group XObject (see Section 7.5.5, “
Transparency | 202 transparency group XObject (see Section 7.5.5, “
Transparency |
202 Group XObjects”). Initial value: None. | 203 Group XObjects”). Initial value: None. |
(...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
320 fHasClipPathToApply = false; | 321 fHasClipPathToApply = false; |
321 fResources = NULL; | 322 fResources = NULL; |
322 fSkFont = NULL; | 323 fSkFont = NULL; |
323 fLineCap = 0; | 324 fLineCap = 0; |
324 fLineJoin = 0; | 325 fLineJoin = 0; |
325 fMiterLimit = 10.0; | 326 fMiterLimit = 10.0; |
326 fAphaConstant = 1.0; | 327 fAphaConstant = 1.0; |
327 fAlphaSource = false; | 328 fAlphaSource = false; |
328 fDashArrayLength = 0; | 329 fDashArrayLength = 0; |
329 fDashPhase = 0; | 330 fDashPhase = 0; |
330 fBlendMode = SkXfermode::kSrc_Mode; // PDF: Normal Blend mode | 331 fBlendModesLength = 1; |
| 332 fBlendModes[0] = SkXfermode::kSrc_Mode; // PDF: Normal Blend mode |
331 } | 333 } |
332 | 334 |
333 // TODO(edisonn): make two functons instead, stroking and non stoking, avoid
branching | 335 // TODO(edisonn): make two functons instead, stroking and non stoking, avoid
branching |
334 void applyGraphicsState(SkPaint* paint, bool stroking); | 336 void applyGraphicsState(SkPaint* paint, bool stroking); |
335 }; | 337 }; |
336 | 338 |
337 // TODO(edisonn): better class design. | 339 // TODO(edisonn): better class design. |
338 // TODO(edisonn): could we remove it? | 340 // TODO(edisonn): could we remove it? |
339 // TODO(edisonn): rename to SkPdfInlineImage | 341 // TODO(edisonn): rename to SkPdfInlineImage |
340 struct SkPdfInlineImage { | 342 struct SkPdfInlineImage { |
(...skipping 25 matching lines...) Expand all Loading... |
366 kPartial_PdfResult, | 368 kPartial_PdfResult, |
367 kNYI_PdfResult, | 369 kNYI_PdfResult, |
368 kIgnoreError_PdfResult, | 370 kIgnoreError_PdfResult, |
369 kError_PdfResult, | 371 kError_PdfResult, |
370 kUnsupported_PdfResult, | 372 kUnsupported_PdfResult, |
371 | 373 |
372 kCount_PdfResult | 374 kCount_PdfResult |
373 }; | 375 }; |
374 | 376 |
375 #endif // __DEFINED__SkPdfBasics | 377 #endif // __DEFINED__SkPdfBasics |
OLD | NEW |