3.2, Wrapping DLLs and Float types

new topic     » topic index » view thread      » older message » newer message

I've wrapped PgSQL and used Sqlite, PCRE and Iup in 3.2 now w/no problems, once
the stack offset was fixed for gcc 4.3.0, however, none of those use the Float
type.

Now, before going further, the C examples I have created work great, and the
wrapper that I've created works identical to the C examples when executed with
Euphoria 3.1.1. However, the results are different with the same wrapper, the
same examples on the same computer when run with 3.2.

I am now wrapping LibHaru, which will be released into the archives and will
give Euphoria PDF capabilities. However, floats, I have identified what I think
is a bug, but I do not have the knowledge to track it down. The bug is this:

constant
fHPDF_Page_SetFontAndSize = define_c_func(lib, "HPDF_Page_SetFontAndSize", 
    {P, P, F}, I),
fHPDF_Page_TextOut = define_c_func(lib, "HPDF_Page_TextOut", 
    {P, F, F, P}, I)

-- P = C_POINTER, F = C_FLOAT, I = C_INT.


The parameters for TextOut are: Page, X, Y and Text. The problem is the
resulting PDF outputs for X, Y: 761 0 Td  when it should be 60 761. What that
tells PDF readers is unimportant, the part that is important is that Y is being
shifted to X's position, and Y is 0.

The parameters for SetFontAndSize are: Page, Font, Size. The Font section is
output correctly, but the size is in the PDF as: 0 Tf when it should be 12 Tf.

So, once again the Float is being lost/corrupted somehow in 3.2. Again, this all
works great in 3.1.1.

Thanks for any input.

--
Jeremy Cowgar
http://jeremy.cowgar.com

new topic     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu