| 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 38 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 49     void setRGBColor(SkColor color) { | 49     void setRGBColor(SkColor color) { | 
| 50         // TODO(edisonn): ASSERT DeviceRGB is the color space. | 50         // TODO(edisonn): ASSERT DeviceRGB is the color space. | 
| 51         fColor = color; | 51         fColor = color; | 
| 52     } | 52     } | 
| 53     // TODO(edisonn): double check the default values for all fields. | 53     // TODO(edisonn): double check the default values for all fields. | 
| 54     SkPdfColorOperator() : fColor(SK_ColorBLACK), fOpacity(1) { | 54     SkPdfColorOperator() : fColor(SK_ColorBLACK), fOpacity(1) { | 
| 55         NotOwnedString::init(&fColorSpace); | 55         NotOwnedString::init(&fColorSpace); | 
| 56     } | 56     } | 
| 57 | 57 | 
| 58     void applyGraphicsState(SkPaint* paint) { | 58     void applyGraphicsState(SkPaint* paint) { | 
| 59         paint->setColor(SkColorSetA(fColor, fOpacity * 255)); | 59         paint->setColor(SkColorSetA(fColor, (U8CPU)(fOpacity * 255))); | 
| 60     } | 60     } | 
| 61 }; | 61 }; | 
| 62 | 62 | 
| 63 // TODO(edisonn): better class design. | 63 // TODO(edisonn): better class design. | 
| 64 struct SkPdfGraphicsState { | 64 struct SkPdfGraphicsState { | 
| 65     // TODO(edisonn): deprecate and remove these! | 65     // TODO(edisonn): deprecate and remove these! | 
| 66     double              fCurPosX; | 66     double              fCurPosX; | 
| 67     double              fCurPosY; | 67     double              fCurPosY; | 
| 68 | 68 | 
| 69     double              fCurFontSize; | 69     double              fCurFontSize; | 
| (...skipping 296 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 366     kPartial_PdfResult, | 366     kPartial_PdfResult, | 
| 367     kNYI_PdfResult, | 367     kNYI_PdfResult, | 
| 368     kIgnoreError_PdfResult, | 368     kIgnoreError_PdfResult, | 
| 369     kError_PdfResult, | 369     kError_PdfResult, | 
| 370     kUnsupported_PdfResult, | 370     kUnsupported_PdfResult, | 
| 371 | 371 | 
| 372     kCount_PdfResult | 372     kCount_PdfResult | 
| 373 }; | 373 }; | 
| 374 | 374 | 
| 375 #endif  // __DEFINED__SkPdfBasics | 375 #endif  // __DEFINED__SkPdfBasics | 
| OLD | NEW | 
|---|