diff options
author | 2011-04-11 23:24:18 +0000 | |
---|---|---|
committer | 2011-04-11 23:24:18 +0000 | |
commit | 75f97e452e8f2ee55cd2b283df7d7734f48bc2bf (patch) | |
tree | 22bbb2a11daf8bd4edfbe5dc15f203872b2fca6b /src/pdf/SkPDFFont.cpp | |
parent | 7aaee005fa2b219bb74c9c050936042e8c9bde6e (diff) |
Generalize the flip origin argument to the PDF device constructor.
The argument still has a default value that does what most users will want, but provides more flexibility.
Chrome will use this change to support an initial translation of the origin to simulate a margin and to scale the entire content (needed on Windows).
When landing to Chrome, this will need http://codereview.chromium.org/6820038
Review URL: http://codereview.appspot.com/4373052
git-svn-id: http://skia.googlecode.com/svn/trunk@1111 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'src/pdf/SkPDFFont.cpp')
-rw-r--r-- | src/pdf/SkPDFFont.cpp | 10 |
1 files changed, 1 insertions, 9 deletions
diff --git a/src/pdf/SkPDFFont.cpp b/src/pdf/SkPDFFont.cpp index 9a2180d8c1..3e363f7a90 100644 --- a/src/pdf/SkPDFFont.cpp +++ b/src/pdf/SkPDFFont.cpp @@ -251,15 +251,7 @@ void setGlyphWidthAndBoundingBox(SkScalar width, SkIRect box, content->writeText(" d1\n"); } -SkPDFArray* makeFontBBox( - SkIRect glyphBBox, uint16_t emSize, - SkPDFDevice::OriginTransform flipOrigin = - SkPDFDevice::kNoFlip_OriginTransform) { - if (flipOrigin == SkPDFDevice::kFlip_OriginTransform) { - int32_t temp = -glyphBBox.fTop; - glyphBBox.fTop = -glyphBBox.fBottom; - glyphBBox.fBottom = temp; - } +SkPDFArray* makeFontBBox(SkIRect glyphBBox, uint16_t emSize) { SkPDFArray* bbox = new SkPDFArray; bbox->reserve(4); bbox->append(new SkPDFScalar(scaleFromFontUnits(glyphBBox.fLeft, |