HPDF_Page_SetDash

115 views
Skip to first unread message

Finn Arildsen

unread,
Feb 16, 2021, 2:26:30 PM2/16/21
to lib...@googlegroups.com

Hi

 

I have been using a fairly old version (@2014) of LibHaru, and finally decided to update to the latest.

 

While integrating the latest version, I found that HPDF_Page_SetDash was changed at some point from taking an array of HPDF_REAL to taking an array og HPDT_UINT16 for the dash_ptn parameter.  Also, I realized that there is now a check that none of the elements in the pattern can be zero.

 

I don’t know if someone can explain this change?   It breaks my code – in particular the check for elements of value 0.    Using a pattern with REAL length elements and allowing zero length elements has been working flawlessly for many years.   Using zero length dashes with round line ends renders a dotted line.   This may not be the most elegant approach, but it works.

 

😊

 

Best regards,

Finn

 

Bill Hōrger

unread,
Feb 16, 2021, 4:56:36 PM2/16/21
to LibHaru Group
I also have an old version, and the HPDF_Page_SetDash routine I have takes an array of integers. My source dates from 2009, and the configure file references libHaru 2.2.1. Yours might be a *lot* older.

It does look like it would be relatively easy to re-gen a function definition that uses REAL's.

There is one call to HPDF_IToA that builds a successive buffer using the UINT16 values. You could function overload to use REAL to access a different routine with the same name. The compiler should be able to handle that.

Bill


--
--
---
libHaru.org development mailing list
To unsubscribe, send email to libharu-u...@googlegroups.com
---
You received this message because you are subscribed to the Google Groups "libHaru" group.
To unsubscribe from this group and stop receiving emails from it, send an email to libharu+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/libharu/004401d70499%249ba2bcc0%24d2e83640%24%40arildsen.com.
Reply all
Reply to author
Forward
0 new messages