#1 2017-02-21 23:06:55

jeanmilost
Member
Registered: 2016-01-21
Posts: 35

Questions and suggestions

Hello,

I have some suggestions and questions about the latest version (nightly build) of the library:

- In SynPdf, I found the following code:

function CenterPoint(const Rect: TRect): TPoint;
begin
  result.X := (Rect.Right-Rect.Left) div 2+Rect.Left;
  result.Y := (Rect.Bottom-Rect.Top) div 2+Rect.Top;
end;

As it is a kind of function that may be called intensively, I suggest the following modification:

function CenterPoint(const Rect: TRect): TPoint;
begin
  result.X := (Rect.Left+Rect.Right) div 2;
  result.Y := (Rect.Top+Rect.Bottom) div 2;
end;

- Several month ago I posted a proposition to link Uniscribe dynamically inside SynPDF, and not only statically, as it's the case on the latest nightly build. Apparently this code has never been accepted. As it is an important functionality required by my company to work with SynPDF, and because for now I have no other alternative than synchronize the code manually, I want to know why this change was rejected, and what are the modalities to incorporate it inside the next library version?

- The latest version of the library generates the following warning while compiled on my computer:

[dcc32 Warning] SynPdfLib.dpk(46): W1029 Duplicate constructor 'ESynException.CreateLastOSError' with identical parameters will be inacessible from C++

Regards

Offline

#2 2017-02-22 06:52:20

ab
Administrator
From: France
Registered: 2010-06-21
Posts: 14,231
Website

Re: Questions and suggestions

1. Slightly easier code, thanks for the input!
But won't make any difference in terms of performance, for sure (function very seldom called).

2. Honestly, we did not had the opportunity at the time you notified it, then we forgot about it.
The safest way of making a proposal is to make a regular pull request on GitHub.

3. Which compiler?

Offline

#3 2017-02-22 13:54:50

jeanmilost
Member
Registered: 2016-01-21
Posts: 35

Re: Questions and suggestions

Hello,

I posted a pull request just now, thanks for the info.

For 3, I use Embarcadero RAD Studio XE7.

Regards

Offline

Board footer

Powered by FluxBB