fafalone / WinDevLib

Windows Development Library for twinBASIC
Creative Commons Zero v1.0 Universal
26 stars 6 forks source link

GdipFillClosedCurve2 and GdipFillClosedCurve2I declarations #17

Closed GCuser99 closed 7 months ago

GCuser99 commented 7 months ago

Jon, just now starting to use your WinDevLib for vb6-to-tB project conversion. This helps a lot but still a very tedious process!

Anyway, I'm currently using WinDevLib 7.7.370.0 and ran across possible mis-declarations for two GDI-Plus functions.

These are the current declarations your wdGDPI.twin module:

Public Declare PtrSafe Function GdipFillClosedCurve2 Lib "gdiplus" (ByVal Graphics As LongPtr, ByVal brush As LongPtr, Points As POINTF, ByVal count As Long, ByVal fillMode As GpFillMode) As GpStatus
Public Declare PtrSafe Function GdipFillClosedCurve2I Lib "gdiplus" (ByVal Graphics As LongPtr, ByVal brush As LongPtr, Points As POINT, ByVal count As Long, ByVal fillMode As GpFillMode) As GpStatus

which I believe might be missing the "tension" argument:

Public Declare PtrSafe Function GdipFillClosedCurve2 Lib "gdiplus" (ByVal Graphics As LongPtr, ByVal brush As LongPtr, Points As POINTF, ByVal count As Long, ByVal tension As Single, ByVal fillMode As GpFillMode) As GpStatus
Public Declare PtrSafe Function GdipFillClosedCurve2I Lib "gdiplus" (ByVal Graphics As LongPtr, ByVal brush As LongPtr, Points As POINT, ByVal count As Long, ByVal tension As Single, ByVal fillMode As GpFillMode) As GpStatus

Can you take a look? Thx!

Edit: I'm on Windows 11 if that matters

fafalone commented 7 months ago

You're right, those should include the tension argument.

Fixed in WinDevLib 7.7.372 (out now on package server and this repo), thanks for reporting!