| <<<Back 1 day (to 2013/05/18) | 2013/05/19 |
vtorri_ | Robin_Watts: the functions called are: | 03:08.56 |
| https://github.com/vtorri/ecrin/blob/master/etui/src/modules/pdf/etui_module_pdf.c#L166 | 03:08.59 |
| https://github.com/vtorri/ecrin/blob/master/etui/src/modules/pdf/etui_module_pdf.c#L300 | 03:09.20 |
| https://github.com/vtorri/ecrin/blob/master/etui/src/modules/pdf/etui_module_pdf.c#L445 | 03:09.37 |
| so file_open, then page_set, then render | 03:09.51 |
| also, are those codes : | 06:46.22 |
| http://codepad.org/h8CkY3yu | 06:46.24 |
| and | 06:46.26 |
| http://codepad.org/UDf8wPsU | 06:46.35 |
| equivalent ? | 06:46.42 |
| i mean : should I replace the first one by the second one ? | 06:47.34 |
Robin_Watts | vtorri: Lines 503 and 507 | 10:04.19 |
| presumably should be width and then height? not width twice ? | 10:04.30 |
| yes, use the second one. | 10:06.41 |
| On the face of it, the code looks OK. | 10:06.53 |
| Except if you're using the display list you'll be regenerating it on every render call. | 10:07.43 |
| Presumably you only want to bin the display list if you're rendering a different page to the last one? | 10:08.07 |
| oh, and you're not setting ctm. That'd be a problem :) | 10:09.02 |
| or rather, you're setting it, but not setting it correctly, AFAICT. | 10:09.52 |
| or maybe you are :( | 10:12.53 |
| I can't see why you don't get anything displayed. | 10:13.58 |
| I think the display list code is wrong in that on every render you 1) make a display list of one doesn't exist, 2) add the page contents to the end of the list. | 10:14.31 |
| which means the display list will get bigger, and bigger, and bigger each time. | 10:14.51 |
vtorri_ | Robin_Watts: indeed (for width) ! | 10:25.50 |
| Robin_Watts: about the display list, as I use calloc to allocate my big structure, it is NULL | 10:27.17 |
| then, line 467, i create it | 10:27.33 |
Robin_Watts | vtorri: OK, so on first entry to render, you make it. | 10:27.36 |
vtorri_ | yes | 10:27.44 |
Robin_Watts | then you draw into it. | 10:27.44 |
| Next time you render (be it the same page, or a different one), you then reuse the same display list. | 10:28.05 |
| but at no point do you clear the display list. | 10:28.16 |
vtorri_ | wel, i don't really know how to use the display list | 10:28.39 |
| i tried to look at mudraw.c | 10:28.47 |
| that's all | 10:29.00 |
Robin_Watts | well, presumably you can test without the display list for now ? | 10:29.05 |
vtorri_ | yes | 10:29.11 |
| by default, is it indeed disabled | 10:29.20 |
| but in my test program, i have enabled it | 10:29.45 |
Robin_Watts | So, if it was me, I'd disable it for now. | 10:29.58 |
vtorri_ | ok | 10:30.08 |
Robin_Watts | Then I'd pick a text only PDF and try to display that. | 10:30.17 |
| and I'd put a breakpoint on fz_draw_fill_text | 10:31.03 |
vtorri_ | ok | 10:31.46 |
| i also have to add all the try/catch stuff | 10:32.01 |
| but that's for later | 10:32.08 |
Robin_Watts | You can ignore that for now, yes. | 10:32.15 |
vtorri_ | have tried, no luck :/ | 10:32.18 |
Robin_Watts | Does the breakpoint get hit? | 10:32.47 |
vtorri_ | i've fixed the width/height bug and disabled display list | 10:32.48 |
| i have not tried yet | 10:32.55 |
| unfortunately i have to go | 10:33.00 |
| i'll do it when i'm back | 10:33.06 |
| thanks :) | 10:33.09 |
Robin_Watts | ok. | 10:33.21 |
| my immediate guess would be that there is something wrong with the transform. | 10:33.52 |
vtorri_ | ok | 10:35.36 |
henryto | hi all | 10:35.39 |
| anyone knows if it's possible to build GS to run on jailbroken iOS? | 10:38.36 |
vtorri_ | btw | 10:46.52 |
| about GS, a guy came here and had problems to build GS on Mac OS X | 10:47.14 |
| i tried to help him, but no luck | 10:47.28 |
| i don't understand, btw, why autoconf is used, but not the other autotools | 10:48.06 |
| arg | 10:49.25 |
| i really have to go | 10:49.29 |
| bbl | 10:49.32 |
henryto | for Mac OS there is a precompiled available from MacPorts | 10:50.14 |
_ingsoc | How do I enter text into a form with mupdf? | 16:12.07 |
| I can't find any documentation. | 16:12.15 |
vtorri_ | tor8, hey | 16:58.59 |
| tor8, would you have some time to review the code of my library, using mupdf, please ? | 16:59.28 |
| tor8, it does not display anything and i don't know why | 16:59.43 |
tor8 | vtorri_: link? | 17:02.28 |
vtorri_ | https://github.com/vtorri/ecrin/blob/master/etui/src/modules/pdf/etui_module_pdf.c#L166 | 17:02.59 |
| https://github.com/vtorri/ecrin/blob/master/etui/src/modules/pdf/etui_module_pdf.c#L300 | 17:03.24 |
tor8 | vtorri_: what do I need to check out to build? | 17:03.25 |
vtorri_ | https://github.com/vtorri/ecrin/blob/master/etui/src/modules/pdf/etui_module_pdf.c#L445 | 17:03.28 |
| so file_open, then page_set, then render | 17:03.36 |
| don't try to build the lib | 17:03.53 |
| it requires some libraries taht are not widely available | 17:04.06 |
| tor8, i've not used yet try/catch | 17:04.34 |
| i've disabled display list | 17:04.42 |
tor8 | have you tried adding a fz_write_png call to save the pixmap result after the fz_run_page call? | 17:04.57 |
vtorri_ | no | 17:05.05 |
| tor8, line 498 ? | 17:05.28 |
tor8 | also, print the contents of the ctm matrix you're using and the values of the bbox used to create the pixmap | 17:05.50 |
| often errors like this are due to messing up the matrices so the page is drawn outside the pixmap | 17:06.17 |
vtorri_ | tor8, ctm is an array of 9 elts, right ? | 17:06.21 |
tor8 | 6 elts | 17:06.27 |
| a, b, c, d, e ,f | 17:06.31 |
vtorri_ | ok | 17:06.35 |
tor8 | abcd are the rotation/scaling part of the matrix, ef are the translation | 17:06.53 |
vtorri_ | tor8, i print ctm before or after fz_run_page ? | 17:07.03 |
tor8 | the same ctm as you pass into fz_run_page | 17:07.13 |
| fz_run_page does not modify it | 17:07.18 |
vtorri_ | ok | 17:07.21 |
| tor8, ctm has these values : 1 0 0 1 0 0 | 17:11.55 |
| i'm writing the png right now | 17:12.06 |
| ctm is the identity matrixa and no translation | 17:12.31 |
tor8 | so pd->page.rotation is 0, and pd->page.hscale, pd->page.vscale are 1? | 17:14.28 |
vtorri_ | yes | 17:15.42 |
| by default | 17:15.46 |
| the png is white | 17:16.24 |
| the size is correct | 17:16.43 |
| the pdf is the one in zlib thirdparty dir | 17:17.12 |
| i'm a bit lost... | 17:20.43 |
| tor8, do you find the code of _etui_pdf_render correct ? | 17:30.24 |
| the mupdf parts, of course | 17:30.41 |
tor8 | bbox values... | 17:33.08 |
vtorri_ | ? | 17:33.20 |
tor8 | what are they? | 17:33.26 |
| ibounds and fz_pixmap_bounds | 17:33.47 |
vtorri_ | do you mean ibounds ? | 17:33.49 |
| tor8, line 478 and 479, i compute width and height | 17:34.24 |
| i display them just after | 17:34.33 |
| width and height are 595 and 842 | 17:34.46 |
| tor8, it's not sufficient ? | 17:34.58 |
| hmm | 17:36.28 |
tor8 | x0 and y0 are they 0? | 17:36.34 |
vtorri_ | maybe x0 and y0 are too big | 17:36.39 |
| 0 0 595 842 | 17:36.57 |
| so seems good | 17:37.07 |
tor8 | compare your code with doc/example.c | 17:38.45 |
vtorri_ | ok | 17:38.51 |
| btw, the command i used for the png is : | 17:38.59 |
| fz_write_png(pd->doc.ctx, image, "test.png", 0); | 17:39.01 |
tor8 | you can add printfs and compare the values between doc/example.c and your code | 17:39.19 |
vtorri_ | ok | 17:39.25 |
tor8 | I don't see anything obviously wrong with your code, but it could be something subtle | 17:39.44 |
vtorri_ | yes | 17:39.50 |
tor8 | without being able to run it, it's hard for me to say | 17:39.52 |
vtorri_ | or something so obvious we don't see it | 17:40.01 |
| hmm | 17:40.06 |
| if you want to compile the dependency libs : http://git.enlightenment.org/core/efl.git/ | 17:41.03 |
| if you're on linux it should not be hard | 17:41.13 |
| on windows, tell me | 17:41.19 |
| there are some commands to pass to configure | 17:41.29 |
| tor8, these libs can achieve these animations : http://www.rasterman.com/files/wp2.avi | 17:42.29 |
| i plan to use them for an "exposé" effect for example | 17:42.47 |
| (for my pdf viewer) | 17:43.22 |
| tor8, the png is correct | 17:49.42 |
| i've misplaced the call of the creation of the png | 17:49.55 |
tor8 | right. so the rendering makes the right data at least. that's good to know :) | 17:50.14 |
vtorri_ | tor8, so image is correctly filled | 17:50.16 |
| so I have some data that i passsed to mupdf with fz_new_pixmap_with_data() | 17:50.50 |
| image = fz_new_pixmap_with_data(pd->doc.ctx, fz_device_rgb, width, height, (unsigned char *)m); | 17:50.59 |
| whe i run the page, that data (here it's m) is filled with the content of the pdf page, right ? | 17:51.34 |
| when* | 17:51.37 |
tor8 | yes | 17:51.56 |
vtorri_ | so it's a problem on my side | 17:52.06 |
| tor8, thank you | 17:52.21 |
| tor8, i'll have more questions later, when i fix that problem :p | 17:52.59 |
tor8 | vtorri_: what is the pixel format of evas_object_image? | 17:54.03 |
vtorri_ | BGRA | 17:54.16 |
| i build a pixel with : a<<24 + r << 16 + g << 8 + b | 17:55.11 |
| well, "I" don't build a pixel | 17:55.37 |
| but it's that format | 17:55.52 |
tor8 | the docs on enlightenment.org list a number of EVAS_COLORSPACE_* constants | 17:55.58 |
vtorri_ | by default it's BGRA | 17:56.15 |
| i don't modify the colorspace | 17:56.25 |
tor8 | EVAS_COLORSPACE_ARGB8888 says high byte is alpha | 17:57.19 |
| high byte on little-endian is first byte | 17:57.27 |
| mupdf renders to RGBA or BGRA | 17:57.47 |
| so you may have the alpha channel swapped with red | 17:58.00 |
| should still draw something, since it's a white background | 17:58.19 |
vtorri_ | yes | 17:58.25 |
tor8 | but text would be transparent, due to being black | 17:58.31 |
vtorri_ | so i might misuse evas | 17:58.46 |
| i feel a bit ashamed because i was one of the main developpers of evas and the other libs... | 17:59.15 |
| tor8, with poppler i have to translate the page with -bbox.y1 | 18:39.15 |
| tor8, is it the same with mupdf ? | 18:39.25 |
tor8 | why do you have to translate it with poppler? | 18:40.15 |
vtorri_ | otherwise it's inversed | 18:42.26 |
| or something like that | 18:42.34 |
| i can't remember exactly | 18:42.41 |
| it was a long time ago | 18:42.46 |
tor8 | you don't need to do anything like that with mupdf, not sure why you'd think so | 18:44.01 |
vtorri_ | ok | 18:45.09 |
| i wanted to be sure | 18:45.16 |
| Forward 1 day (to 2013/05/20)>>> | |