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 #ifndef PUBLIC_FPDF_DOC_H_ | 7 #ifndef PUBLIC_FPDF_DOC_H_ |
8 #define PUBLIC_FPDF_DOC_H_ | 8 #define PUBLIC_FPDF_DOC_H_ |
9 | 9 |
10 #include "fpdfview.h" | 10 #include "fpdfview.h" |
(...skipping 153 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
164 | 164 |
165 // Get the page index of |dest|. | 165 // Get the page index of |dest|. |
166 // | 166 // |
167 // document - handle to the document. | 167 // document - handle to the document. |
168 // dest - handle to the destination. | 168 // dest - handle to the destination. |
169 // | 169 // |
170 // Returns the page index containing |dest|. Page indices start from 0. | 170 // Returns the page index containing |dest|. Page indices start from 0. |
171 DLLEXPORT unsigned long STDCALL FPDFDest_GetPageIndex(FPDF_DOCUMENT document, | 171 DLLEXPORT unsigned long STDCALL FPDFDest_GetPageIndex(FPDF_DOCUMENT document, |
172 FPDF_DEST dest); | 172 FPDF_DEST dest); |
173 | 173 |
| 174 // Get the (x, y, zoom) location of |dest| in the destination page, if the |
| 175 // destination is in [page /XYZ x y zoom] syntax. |
| 176 // |
| 177 // dest - handle to the destination. |
| 178 // hasXVal - out parameter; true if the x value is not null |
| 179 // hasYVal - out parameter; true if the y value is not null |
| 180 // hasZoomVal - out parameter; true if the zoom value is not null |
| 181 // x - out parameter; the x coordinate, in page coordinates. |
| 182 // y - out parameter; the y coordinate, in page coordinates. |
| 183 // zoom - out parameter; the zoom value. |
| 184 // Returns TRUE on successfully reading the /XYZ value. |
| 185 // |
| 186 // Note the [x, y, zoom] values are only set if the corresponding hasXVal, |
| 187 // hasYVal or hasZoomVal flags are true. |
| 188 DLLEXPORT FPDF_BOOL STDCALL FPDFDest_GetLocationInPage(FPDF_DEST dest, |
| 189 FPDF_BOOL* hasXCoord, |
| 190 FPDF_BOOL* hasYCoord, |
| 191 FPDF_BOOL* hasZoom, |
| 192 FS_FLOAT* x, |
| 193 FS_FLOAT* y, |
| 194 FS_FLOAT* zoom); |
| 195 |
174 // Find a link at point (|x|,|y|) on |page|. | 196 // Find a link at point (|x|,|y|) on |page|. |
175 // | 197 // |
176 // page - handle to the document page. | 198 // page - handle to the document page. |
177 // x - the x coordinate, in the page coordinate system. | 199 // x - the x coordinate, in the page coordinate system. |
178 // y - the y coordinate, in the page coordinate system. | 200 // y - the y coordinate, in the page coordinate system. |
179 // | 201 // |
180 // Returns a handle to the link, or NULL if no link found at the given point. | 202 // Returns a handle to the link, or NULL if no link found at the given point. |
181 // | 203 // |
182 // You can convert coordinates from screen coordinates to page coordinates using | 204 // You can convert coordinates from screen coordinates to page coordinates using |
183 // |FPDF_DeviceToPage|. | 205 // |FPDF_DeviceToPage|. |
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
276 DLLEXPORT unsigned long STDCALL FPDF_GetMetaText(FPDF_DOCUMENT doc, | 298 DLLEXPORT unsigned long STDCALL FPDF_GetMetaText(FPDF_DOCUMENT doc, |
277 FPDF_BYTESTRING tag, | 299 FPDF_BYTESTRING tag, |
278 void* buffer, | 300 void* buffer, |
279 unsigned long buflen); | 301 unsigned long buflen); |
280 | 302 |
281 #ifdef __cplusplus | 303 #ifdef __cplusplus |
282 } // extern "C" | 304 } // extern "C" |
283 #endif // __cplusplus | 305 #endif // __cplusplus |
284 | 306 |
285 #endif // PUBLIC_FPDF_DOC_H_ | 307 #endif // PUBLIC_FPDF_DOC_H_ |
OLD | NEW |