Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(65)

Side by Side Diff: experimental/PdfViewer/SkPdfBasics.h

Issue 20662003: pdfviewer: fix a few warnings (Closed) Base URL: http://skia.googlecode.com/svn/trunk/
Patch Set: Created 7 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | experimental/PdfViewer/SkPdfRenderer.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « no previous file | experimental/PdfViewer/SkPdfRenderer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698