Last active
November 13, 2019 04:24
-
-
Save kjk/1bdccc78eb909a0030ab2b5f50c4b20e to your computer and use it in GitHub Desktop.
sumatra notes on link handling (made with https://codeeval.dev)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Custom draw tree view notes: | |
https://docs.microsoft.com/en-us/windows/win32/controls/about-custom-draw | |
https://docs.microsoft.com/en-us/windows/win32/controls/nm-customdraw-tree-view | |
https://deweymao.github.io/c/c++/2017/06/04/custom_draw_implementation_of_tree_view_control.html | |
https://github.com/search?l=C%2B%2B&q=NM_CUSTOMDRAW&type=Code | |
https://www.codeguru.com/cpp/controls/treeview/misc-advanced/article.php/c651/Custom-Draw-Tree-Control.htm | |
---------------- | |
In old: | |
FZ_LINK_LAUNCH | |
file_spec = "C1.jpg" | |
embedded_num = 3183 | |
PdfLink::GetValue() returns "C1.jpg" | |
GetDestType() -> LaunchEmbedded | |
calls link->SaveEmbedded() | |
New code: | |
fz_outline | |
pdf_parse_link_action (dict A) | |
Types of links in outline | |
GoTo -> Destination | |
Destination (dict D): | |
pdf_parse_link_dest | |
Name | |
String | |
Array | |
first el is pageNo | |
second is: XYZ, FitR, FitH, FitBH, FitV, FitBV | |
represented as "#{pageNo+1},${x},${y}" | |
remaining: | |
"#${pageNo+1}" | |
pdf_resolve_link | |
parses "#{pageNo},${x},${y}" => pageNo, &x, &x floats | |
------------- | |
void | |
pdf_annot_color(fz_context *ctx, pdf_annot *annot, int *n, float color[4]) | |
{ | |
pdf_obj *c = pdf_dict_get(ctx, annot->obj, PDF_NAME(C)); | |
pdf_annot_color_imp(ctx, c, n, color); | |
} | |
-------------- |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment