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

Unified Diff: experimental/PdfViewer/autogen/SkPdfType1HalftoneDictionary_autogen.h

Issue 17856004: refactoring for pdf viewer lib (Closed) Base URL: http://skia.googlecode.com/svn/trunk/
Patch Set: Created 7 years, 6 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
Index: experimental/PdfViewer/autogen/SkPdfType1HalftoneDictionary_autogen.h
===================================================================
--- experimental/PdfViewer/autogen/SkPdfType1HalftoneDictionary_autogen.h (revision 9765)
+++ experimental/PdfViewer/autogen/SkPdfType1HalftoneDictionary_autogen.h (working copy)
@@ -532,13 +532,7 @@
return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Type", "", NULL));
}
- std::string Type() const {
- std::string ret;
- if (NameFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Type", "", &ret)) return ret;
- // TODO(edisonn): warn about missing required field, assert for known good pdfs
- return "";
- }
-
+ std::string Type() const;
/** (Required) A code identifying the halftone type that this dictionary
* describes; must be 1 for this type of halftone.
**/
@@ -546,26 +540,14 @@
return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "HalftoneType", "", NULL));
}
- long HalftoneType() const {
- long ret;
- if (LongFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "HalftoneType", "", &ret)) return ret;
- // TODO(edisonn): warn about missing required field, assert for known good pdfs
- return 0;
- }
-
+ long HalftoneType() const;
/** (Optional) The name of the halftone dictionary.
**/
bool has_HalftoneName() const {
return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "HalftoneName", "", NULL));
}
- std::string HalftoneName() const {
- std::string ret;
- if (StringFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "HalftoneName", "", &ret)) return ret;
- // TODO(edisonn): warn about missing required field, assert for known good pdfs
- return "";
- }
-
+ std::string HalftoneName() const;
/** (Required) The screen frequency, measured in halftone cells per inch in
* device space.
**/
@@ -573,13 +555,7 @@
return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Frequency", "", NULL));
}
- double Frequency() const {
- double ret;
- if (DoubleFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Frequency", "", &ret)) return ret;
- // TODO(edisonn): warn about missing required field, assert for known good pdfs
- return 0;
- }
-
+ double Frequency() const;
/** (Required) The screen angle, in degrees of rotation counterclockwise
* with respect to the device coordinate system. (Note that most output
* devices have left-handed device spaces; on such devices, a counter-
@@ -590,13 +566,7 @@
return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Angle", "", NULL));
}
- double Angle() const {
- double ret;
- if (DoubleFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Angle", "", &ret)) return ret;
- // TODO(edisonn): warn about missing required field, assert for known good pdfs
- return 0;
- }
-
+ double Angle() const;
/** (Required) A function object defining the order in which device pixels
* within a screen cell are adjusted for different gray levels, or the name of
* one of the predefined spot functions (see Table 6.1 on page 385).
@@ -611,26 +581,14 @@
return ret->podofo()->GetDataType() == ePdfDataType_Reference;
}
- SkPdfFunction getSpotFunctionAsFunction() const {
- SkPdfFunction ret = SkPdfFunction();
- if (FunctionFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "SpotFunction", "", &ret)) return ret;
- // TODO(edisonn): warn about missing required field, assert for known good pdfs
- return SkPdfFunction();
- }
-
+ SkPdfFunction getSpotFunctionAsFunction() const;
bool isSpotFunctionAName() const {
SkPdfObject* ret = NULL;
if (!ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "SpotFunction", "", &ret)) return false;
return ret->podofo()->GetDataType() == ePdfDataType_Name;
}
- std::string getSpotFunctionAsName() const {
- std::string ret = "";
- if (NameFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "SpotFunction", "", &ret)) return ret;
- // TODO(edisonn): warn about missing required field, assert for known good pdfs
- return "";
- }
-
+ std::string getSpotFunctionAsName() const;
/** (Optional) A flag specifying whether to invoke a special halftone al-
* gorithm that is extremely precise, but computationally expensive; see
* below for further discussion. Default value: false.
@@ -639,13 +597,7 @@
return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "AccurateScreens", "", NULL));
}
- bool AccurateScreens() const {
- bool ret;
- if (BoolFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "AccurateScreens", "", &ret)) return ret;
- // TODO(edisonn): warn about missing required field, assert for known good pdfs
- return false;
- }
-
+ bool AccurateScreens() const;
/** (Optional) A transfer function, which overrides the current transfer
* function in the graphics state for the same component. This entry is
* required if the dictionary is a component of a type 5 halftone (see
@@ -664,26 +616,14 @@
return ret->podofo()->GetDataType() == ePdfDataType_Reference;
}
- SkPdfFunction getTransferFunctionAsFunction() const {
- SkPdfFunction ret = SkPdfFunction();
- if (FunctionFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "TransferFunction", "", &ret)) return ret;
- // TODO(edisonn): warn about missing required field, assert for known good pdfs
- return SkPdfFunction();
- }
-
+ SkPdfFunction getTransferFunctionAsFunction() const;
bool isTransferFunctionAName() const {
SkPdfObject* ret = NULL;
if (!ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "TransferFunction", "", &ret)) return false;
return ret->podofo()->GetDataType() == ePdfDataType_Name;
}
- std::string getTransferFunctionAsName() const {
- std::string ret = "";
- if (NameFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "TransferFunction", "", &ret)) return ret;
- // TODO(edisonn): warn about missing required field, assert for known good pdfs
- return "";
- }
-
+ std::string getTransferFunctionAsName() const;
};
#endif // __DEFINED__SkPdfType1HalftoneDictionary

Powered by Google App Engine
This is Rietveld 408576698