OLD | NEW |
1 // Copyright 2014 PDFium Authors. All rights reserved. | 1 // Copyright 2014 PDFium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com | 5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com |
6 | 6 |
7 #include "core/fpdfapi/fpdf_page/pageint.h" | 7 #include "core/fpdfapi/fpdf_page/pageint.h" |
8 | 8 |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
139 FX_FLOAT x; | 139 FX_FLOAT x; |
140 FX_FLOAT y; | 140 FX_FLOAT y; |
141 stream.GetCoords(x, y); | 141 stream.GetCoords(x, y); |
142 if (bStarted) { | 142 if (bStarted) { |
143 rect.UpdateRect(x, y); | 143 rect.UpdateRect(x, y); |
144 } else { | 144 } else { |
145 rect.InitRect(x, y); | 145 rect.InitRect(x, y); |
146 bStarted = true; | 146 bStarted = true; |
147 } | 147 } |
148 } | 148 } |
149 FX_SAFE_UINT32 nBits = stream.comps(); | 149 FX_SAFE_UINT32 nBits = stream.Components(); |
150 nBits *= stream.CompBits(); | 150 nBits *= stream.ComponentBits(); |
151 nBits *= color_count; | 151 nBits *= color_count; |
152 if (!nBits.IsValid()) | 152 if (!nBits.IsValid()) |
153 break; | 153 break; |
154 | 154 |
155 stream.BitStream()->SkipBits(nBits.ValueOrDie()); | 155 stream.BitStream()->SkipBits(nBits.ValueOrDie()); |
156 if (bGouraud) | 156 if (bGouraud) |
157 stream.BitStream()->ByteAlign(); | 157 stream.BitStream()->ByteAlign(); |
158 } | 158 } |
159 rect.Transform(&matrix); | 159 rect.Transform(&matrix); |
160 return rect; | 160 return rect; |
(...skipping 1535 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1696 } else { | 1696 } else { |
1697 PDF_ReplaceAbbr(pElement); | 1697 PDF_ReplaceAbbr(pElement); |
1698 } | 1698 } |
1699 } | 1699 } |
1700 break; | 1700 break; |
1701 } | 1701 } |
1702 default: | 1702 default: |
1703 break; | 1703 break; |
1704 } | 1704 } |
1705 } | 1705 } |
OLD | NEW |