Re: [fpc-pascal] Implementing AggPas with PtcGraph

2017-06-19 Thread Graeme Geldenhuys

On 2017-06-19 01:35, James Richters wrote:

The problem is not with rendering with rgb565,  the problem is something in the 
original that was patched with the setcolor function:

Line 122 of agg_color pas has:
constructor rgba8.Construct;
begin
 b{*}:=int8u(r_ );
 g:=int8u(g_ );
 r:=int8u(b_ );
 a:=int8u(a_ );

end;



WOW, well spotted - and how that went unnoticed for all these years is 
beyond me. Well done for bringing it to our attention.


That is a fundamental bug in AggPas, and something I'll be fixing 
immediately in fpGUI's repository. As for the affects on other code and 
programs. I'll do some testing to see what exact affect it has, and then 
add some notes in the CHANGELOG document describing code-breaking 
changes and recommended fixes.


I have always been in the mind that fundamental code and API's should be 
100% correct, and fixed promptly when a bug is found. Applications that 
are affected by such changes need to be updated - that's the bottom 
line. No point in continue maintaining buggy code and API's and 
guaranteed that things will just get worse in the future - if not 
immediately fixed.


Regards,
  Graeme

--
fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal
http://fpgui.sourceforge.net/

My public PGP key:  http://tinyurl.com/graeme-pgp
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] Serial to TCP gateway in FPC?

2017-06-19 Thread Bo Berglund
On Mon, 19 Jun 2017 09:25:59 -0400, Paul Breneman
 wrote:

>I've used com0com *and* hub4com successfully for several things in the 
>past.  See #3 here:
>   http://www.ctrlterm.com/related.htm
>

In the README file with com0com they write:

"INSTALLING
==

NOTE (x64-based Windows Vista/Windows Server 2008/Windows 7/8):
The com0com.sys is a test-signed kernel-mode driver that will not load
by default. To enable test signing, enter command:

bcdedit.exe -set TESTSIGNING ON

  and reboot the computer.

NOTE:
  Enabling test signing will impair computer security."

This does not sound good...

During installation I saw several warnings from Windows about unknown
signing of a driver, and Windows recommended not to install...


-- 
Bo Berglund
Developer in Sweden

___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] Serial to TCP gateway in FPC?

2017-06-19 Thread Paul Breneman

On 06/19/2017 08:43 AM, Bo Berglund wrote:

On Sun, 18 Jun 2017 19:16:05 -0400, Paul Breneman
 wrote:


Why do you need FPC code?  Here are free drivers that work in Windows:
   http://com0com.sourceforge.net/



...

I would really like to use an available program rather than spening
time to develop something myself, but it seems like com0com does not
cut it...


I've used com0com *and* hub4com successfully for several things in the 
past.  See #3 here:

  http://www.ctrlterm.com/related.htm

I'll try to take a look at com2tcp in the next few days and compare that 
to the Digi One SP (where Win2K drivers are *still* available) which 
I've used recently:

https://www.digi.com/products/serial-servers/serial-device-servers/digionesp

BTW, Digi used Delphi & AsyncPro years ago for some test software...

Regards,
Paul
www.ControlPascal.com
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] Serial to TCP gateway in FPC?

2017-06-19 Thread Bo Berglund
On Sun, 18 Jun 2017 19:16:05 -0400, Paul Breneman
 wrote:

>Why do you need FPC code?  Here are free drivers that work in Windows:
>   http://com0com.sourceforge.net/

I tried again and failed again.
I installed com0com and had an error in my face during installation:
SetupUninstallOEMInf(oem11.inf)
ERROR: 0xE23D - 

But it was possible to continue anyway, so I did that.

Afterwards I used the setup utility to make the com pair COM91-COM92.

Then I started com2tcp to connect to the remote port and make it
possible for my local application to use the virtual com port COM91 to
connect to the remote system. But:

com2tcp.exe --baud 38400 --data 8 --parity n --stop 1 --ignore-dsr
COM92 10.0.0.26 2091
OpenC0C(): CreateFile("COM92") ERROR No such file or directory (2)

And my application, which enumerates available serial ports on
startup, does not even show the COM91, COM92 virtual port pair...

So the local application cannot connect to one side of the virtual com
pair and com2tcp cannot connect to the other side...

I would really like to use an available program rather than spening
time to develop something myself, but it seems like com0com does not
cut it...


-- 
Bo Berglund
Developer in Sweden

___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] Serial to TCP gateway in FPC?

2017-06-19 Thread Bo Berglund
On Sun, 18 Jun 2017 19:16:05 -0400, Paul Breneman
 wrote:

>Why do you need FPC code?  Here are free drivers that work in Windows:
>   http://com0com.sourceforge.net/

Because I am programming in Pascal (Delphi and FPC) and I had failed
to find any working ready-made solutions.

It looks like I have already tested com0com a year ago or so:

When I look in my PC Win7 registry I find that two ports that are
enumerated but non-working seems to have been set up by com0com and by
what I see in the registry com0com seems to be a service.
However the indicated home dir for com0com does not exist and still
there are all these entries in the registry. There is no registered
service named com0com either...
Looks like leftovers from an incomplete uninstall.

Anyway, I would like to test this again but the question is if it
really works on Windows 7 and up (X64)?
The interesting part would be com0tcp in my case.


-- 
Bo Berglund
Developer in Sweden

___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] Implementing AggPas with PtcGraph

2017-06-19 Thread Graeme Geldenhuys

On 2017-06-16 01:51, James Richters wrote:

Yeah, probably not the best naming convention.

>

Perhaps some comments at the top of both units explaining the
difference and also mentioning the other unit exits would save some
confusion



I have applied such a change. So far only to the Agg2D and agg_2D units, 
but I'll do the same to the rest of the units shortly.


I'm also strongly considering renaming the "render/software/" directory 
to "render/aggpas/". I'll mull this over for another day or two.


Regards,
  Graeme

--
fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal
http://fpgui.sourceforge.net/

My public PGP key:  http://tinyurl.com/graeme-pgp
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal