diff options
author | Tom Sepez <tsepez@chromium.org> | 2016-02-29 11:24:29 -0800 |
---|---|---|
committer | Tom Sepez <tsepez@chromium.org> | 2016-02-29 11:24:29 -0800 |
commit | d5e7b355b8c4c22ff770547797cbc536bdc95d5b (patch) | |
tree | 4c0607b1701f23753a71b42c02b74764dd4bfd38 /core/include/fpdfapi/fpdf_resource.h | |
parent | a74e9c9d3b0d98c5d6042d7ca739cd921a4524db (diff) | |
download | pdfium-d5e7b355b8c4c22ff770547797cbc536bdc95d5b.tar.xz |
Fixup FX_RECT and FX_SMALL_RECT classes.
Put these first, so later on more complicated classes can
have constructors that take these as arguments.
Add better constructors, and call appropriately. Also don't
be afraid to return these from methods since RVO.
R=dsinclair@chromium.org
Review URL: https://codereview.chromium.org/1745683002 .
Diffstat (limited to 'core/include/fpdfapi/fpdf_resource.h')
-rw-r--r-- | core/include/fpdfapi/fpdf_resource.h | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/core/include/fpdfapi/fpdf_resource.h b/core/include/fpdfapi/fpdf_resource.h index 393a9cc0bf..23e1b55efb 100644 --- a/core/include/fpdfapi/fpdf_resource.h +++ b/core/include/fpdfapi/fpdf_resource.h @@ -149,7 +149,7 @@ class CPDF_Font { int GetStringWidth(const FX_CHAR* pString, int size); virtual int GetCharWidthF(FX_DWORD charcode, int level = 0) = 0; - virtual void GetCharBBox(FX_DWORD charcode, FX_RECT& rect, int level = 0) = 0; + virtual FX_RECT GetCharBBox(FX_DWORD charcode, int level = 0) = 0; CPDF_Document* m_pDocument; CFX_Font m_Font; @@ -226,7 +226,7 @@ class CPDF_SimpleFont : public CPDF_Font { // CPDF_Font: int GetCharWidthF(FX_DWORD charcode, int level = 0) override; - void GetCharBBox(FX_DWORD charcode, FX_RECT& rect, int level = 0) override; + FX_RECT GetCharBBox(FX_DWORD charcode, int level = 0) override; int GlyphFromCharCode(FX_DWORD charcode, FX_BOOL* pVertGlyph = NULL) override; FX_BOOL IsUnicodeCompatible() const override; CFX_WideString UnicodeFromCharCode(FX_DWORD charcode) const override; @@ -317,7 +317,7 @@ class CPDF_Type3Font : public CPDF_SimpleFont { const CPDF_Type3Font* AsType3Font() const override { return this; } CPDF_Type3Font* AsType3Font() override { return this; } int GetCharWidthF(FX_DWORD charcode, int level = 0) override; - void GetCharBBox(FX_DWORD charcode, FX_RECT& rect, int level = 0) override; + FX_RECT GetCharBBox(FX_DWORD charcode, int level = 0) override; void SetPageResources(CPDF_Dictionary* pResources) { m_pPageResources = pResources; @@ -367,7 +367,7 @@ class CPDF_CIDFont : public CPDF_Font { CPDF_CIDFont* AsCIDFont() override { return this; } int GlyphFromCharCode(FX_DWORD charcode, FX_BOOL* pVertGlyph = NULL) override; int GetCharWidthF(FX_DWORD charcode, int level = 0) override; - void GetCharBBox(FX_DWORD charcode, FX_RECT& rect, int level = 0) override; + FX_RECT GetCharBBox(FX_DWORD charcode, int level = 0) override; FX_DWORD GetNextChar(const FX_CHAR* pString, int nStrLen, int& offset) const override; |