double SkPdfBlockLevelStructureElementsDictionary::TextIndent(SkPdfNativeDoc* doc) {
  SkPdfNativeObject* ret = get("TextIndent", "");
  if (doc) {ret = doc->resolveReference(ret);}
  if ((ret != NULL && ret->isNumber()) || (doc == NULL && ret != NULL && ret->isReference())) return ret->numberValue();
  // TODO(edisonn): warn about missing default value for optional fields
  return 0;
}
コード例 #2
0
double SkPdfType1PatternDictionary::YStep(SkPdfNativeDoc* doc) {
  SkPdfNativeObject* ret = get("YStep", "");
  if (doc) {ret = doc->resolveReference(ret);}
  if ((ret != NULL && ret->isNumber()) || (doc == NULL && ret != NULL && ret->isReference())) return ret->numberValue();
  // TODO(edisonn): warn about missing required field, assert for known good pdfs
  return 0;
}
コード例 #3
0
double SkPdfSoundActionDictionary::Volume(SkPdfNativeDoc* doc) {
  SkPdfNativeObject* ret = get("Volume", "");
  if (doc) {ret = doc->resolveReference(ret);}
  if ((ret != NULL && ret->isNumber()) || (doc == NULL && ret != NULL && ret->isReference())) return ret->numberValue();
  // TODO(edisonn): warn about missing default value for optional fields
  return 0;
}
double SkPdfStructureTreeRootDictionary::getParentTreeAsNumber(SkPdfNativeDoc* doc) {
  SkPdfNativeObject* ret = get("ParentTree", "");
  if (doc) {ret = doc->resolveReference(ret);}
  if ((ret != NULL && ret->isNumber()) || (doc == NULL && ret != NULL && ret->isReference())) return ret->numberValue();
  // TODO(edisonn): warn about missing default value for optional fields
  return 0;
}