Clipper2 icon indicating copy to clipboard operation
Clipper2 copied to clipboard

Add Z-Component to Clipper DLL Exports, as well as Z-Fill Callback default

Open schellingerhout opened this issue 8 months ago • 2 comments

Added the Z-component and the Z-Fill callback. These are added when USINGZ preprocessor identifier is present Also added inflate for path (code was directly derived from code used for paths).

We depend on this Z-component for our functionality and rather not have a fork that diverges from your repository

This PR also has some contributions we'd like to make. Specifically for the Delphi interfaces to the C++. I added wrappers around the C++ raw pointer types for higher performance for the transmission of data.

You can see most of the code under DLL/Delphi_interface

  • DLL/Delphi_interface/Clipper.DLL.Data.pas: a wrapper for the path and tree raw pointers passed to and from the DLL. Using this wrapper allows for faster in-stream memory processing rather than translating and converting to the Clipper Delphi datatypes.
  • DLL/Delphi_interface/Clipper.DLL.pas: a DLL interface that takes type strong arguments, and allows allows for the use of the pointer wrappers provided by Clipper.DLL.Data for input and output.
  • DLL/Delphi_interface/Clipper.DLL.Enums.pas: Strongly typed enums used by Clipper.DLL.pas.
  • DLL/Delphi_interface/Clipper.DLL.inc: Controls z-component inclusion, double type coordinates and pointer wrappers

Consumers rarely need to include Clipper.DLL.Data or Clipper.DLL.Enums since the most commonly used types are aliased in Clipper.DLL.pas

All Clipper Delphi examples were converted to use these interfaces and can be found under DLL/Delphi_TestApps. I moved the test previously in DLL/Delphi_TestApp to a subfolder (DLL/Delphi_TestApp/Test_DLL).

  • DLL/Delphi_interface/SVG/Clipper.DLL.SVG.pas and DLL/Delphi_interface/Utils/Clipper.DLL.Utils.pas: used by test apps to generate data and output. These are translations of @AngusJohnson's Delphi Clipper code but which now operates on the raw pointer wrappers

schellingerhout avatar Jun 20 '24 12:06 schellingerhout