| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 The Chromium 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 #ifndef PDF_PDFIUM_PDFIUM_PAGE_H_ | 5 #ifndef PDF_PDFIUM_PDFIUM_PAGE_H_ |
| 6 #define PDF_PDFIUM_PDFIUM_PAGE_H_ | 6 #define PDF_PDFIUM_PDFIUM_PAGE_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 48 | 48 |
| 49 // Given a start char index, find the longest continuous run of text that's | 49 // Given a start char index, find the longest continuous run of text that's |
| 50 // in a single direction and with the same style and font size. Return the | 50 // in a single direction and with the same style and font size. Return the |
| 51 // length of that sequence and its font size and bounding box. | 51 // length of that sequence and its font size and bounding box. |
| 52 void GetTextRunInfo(int start_char_index, | 52 void GetTextRunInfo(int start_char_index, |
| 53 uint32_t* out_len, | 53 uint32_t* out_len, |
| 54 double* out_font_size, | 54 double* out_font_size, |
| 55 pp::FloatRect* out_bounds); | 55 pp::FloatRect* out_bounds); |
| 56 // Get a unicode character from the page. | 56 // Get a unicode character from the page. |
| 57 uint32_t GetCharUnicode(int char_index); | 57 uint32_t GetCharUnicode(int char_index); |
| 58 // Get the width of a character in page pixels. | 58 // Get the bounds of a character in page pixels. |
| 59 double GetCharWidth(int char_index); | 59 pp::FloatRect GetCharBounds(int char_index); |
| 60 | 60 |
| 61 enum Area { | 61 enum Area { |
| 62 NONSELECTABLE_AREA, | 62 NONSELECTABLE_AREA, |
| 63 TEXT_AREA, | 63 TEXT_AREA, |
| 64 WEBLINK_AREA, // Area is a hyperlink. | 64 WEBLINK_AREA, // Area is a hyperlink. |
| 65 DOCLINK_AREA, // Area is a link to a different part of the same document. | 65 DOCLINK_AREA, // Area is a link to a different part of the same document. |
| 66 }; | 66 }; |
| 67 | 67 |
| 68 struct LinkTarget { | 68 struct LinkTarget { |
| 69 // We are using std::string here which have a copy contructor. | 69 // We are using std::string here which have a copy contructor. |
| (...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 144 int loading_count_; | 144 int loading_count_; |
| 145 pp::Rect rect_; | 145 pp::Rect rect_; |
| 146 bool calculated_links_; | 146 bool calculated_links_; |
| 147 std::vector<Link> links_; | 147 std::vector<Link> links_; |
| 148 bool available_; | 148 bool available_; |
| 149 }; | 149 }; |
| 150 | 150 |
| 151 } // namespace chrome_pdf | 151 } // namespace chrome_pdf |
| 152 | 152 |
| 153 #endif // PDF_PDFIUM_PDFIUM_PAGE_H_ | 153 #endif // PDF_PDFIUM_PDFIUM_PAGE_H_ |
| OLD | NEW |