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

Unified Diff: experimental/PdfViewer/SkPdfGraphicsState.h

Issue 23020003: pdfviewer: debug code for drawText (show magenta background for text, to show text even when we fai… (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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « experimental/PdfViewer/SkPdfFont.cpp ('k') | experimental/PdfViewer/SkPdfGraphicsState.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: experimental/PdfViewer/SkPdfGraphicsState.h
===================================================================
--- experimental/PdfViewer/SkPdfGraphicsState.h (revision 10543)
+++ experimental/PdfViewer/SkPdfGraphicsState.h (working copy)
@@ -4,19 +4,17 @@
#include "SkCanvas.h"
#include "SkPaint.h"
#include "SkPdfConfig.h"
+#include "SkPdfUtils.h"
-#include <iostream>
-#include <cstdio>
-#include <map>
#include <stack>
class SkPdfFont;
class SkPdfDoc;
-class SkPdfObject;
+class SkPdfNativeObject;
class SkPdfResourceDictionary;
class SkPdfSoftMaskDictionary;
-class SkNativeParsedPDF;
+class SkPdfNativeDoc;
class SkPdfAllocator;
// TODO(edisonn): better class design.
@@ -35,7 +33,7 @@
// TODO(edisonn): make color space an enum!
public:
NotOwnedString fColorSpace;
- SkPdfObject* fPattern;
+ SkPdfNativeObject* fPattern;
/*
color (various) The current color to be used during painting operations (see Section
@@ -67,7 +65,7 @@
fPattern = NULL;
}
- void setPatternColorSpace(SkPdfObject* pattern) {
+ void setPatternColorSpace(SkPdfNativeObject* pattern) {
fColorSpace.fBuffer = (const unsigned char*)"Pattern";
fColorSpace.fBytes = 7; // strlen("Pattern")
fPattern = pattern;
@@ -360,41 +358,18 @@
};
// TODO(edisonn): better class design.
-// TODO(edisonn): could we remove it?
-// TODO(edisonn): rename to SkPdfInlineImage
-struct SkPdfInlineImage {
- std::map<std::string, std::string> fKeyValuePairs;
- std::string fImageData;
-};
-
-// TODO(edisonn): better class design.
// TODO(edisonn): rename to SkPdfContext
-struct PdfContext {
- std::stack<SkPdfObject*> fObjectStack;
+struct SkPdfContext {
+ std::stack<SkPdfNativeObject*> fObjectStack;
std::stack<SkPdfGraphicsState> fStateStack;
SkPdfGraphicsState fGraphicsState;
- SkNativeParsedPDF* fPdfDoc;
+ SkPdfNativeDoc* fPdfDoc;
// TODO(edisonn): the allocator, could be freed after the page is done drawing.
SkPdfAllocator* fTmpPageAllocator;
SkMatrix fOriginalMatrix;
- SkPdfInlineImage fInlineImage;
-
- PdfContext(SkNativeParsedPDF* doc);
- ~PdfContext();
+ SkPdfContext(SkPdfNativeDoc* doc);
+ ~SkPdfContext();
};
-// TODO(edisonn): temporary code, to report how much of the PDF we actually think we rendered.
-// TODO(edisonn): rename to SkPdfResult
-enum PdfResult {
- kOK_PdfResult,
- kPartial_PdfResult,
- kNYI_PdfResult,
- kIgnoreError_PdfResult,
- kError_PdfResult,
- kUnsupported_PdfResult,
-
- kCount_PdfResult
-};
-
#endif // __DEFINED__SkPdfBasics
« no previous file with comments | « experimental/PdfViewer/SkPdfFont.cpp ('k') | experimental/PdfViewer/SkPdfGraphicsState.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698