[fpc-pascal] Best way / tool to create resource files (*.res) for fpc projects

2016-05-26 Thread Luiz Americo Pereira Camara
For Lazarus projects, the IDE comes with an integrated resource editor that uses fcl-res to create the resource file In my case, i want to create a standalone resource to be used in a package so can't use Lazarus IDE editor Is there any tool that uses fcl-res to manipulate resource files? (GLazRe

Re: [fpc-pascal] Questions regarding FPImage's TFPMemoryImage.FData variable

2016-05-26 Thread Michael Van Canneyt
On Thu, 26 May 2016, Graeme Geldenhuys wrote: On 2016-05-26 13:22, Michael Van Canneyt wrote: Yes it does, but this is very slow. Probably due to Colors array usage. ;-) Yes. But sometimes it is all you've got; e.g. when drawing on an image. Just so that others know, the 3rd party imag

Re: [fpc-pascal] Questions regarding FPImage's TFPMemoryImage.FData variable

2016-05-26 Thread Graeme Geldenhuys
On 2016-05-26 13:22, Michael Van Canneyt wrote: > Yes it does, but this is very slow. Probably due to Colors array usage. ;-) > Yes. But sometimes it is all you've got; e.g. when drawing on an image. Just so that others know, the 3rd party image library I’m using is AggPas. AggPas (like most ot

Re: [fpc-pascal] Questions regarding FPImage's TFPMemoryImage.FData variable

2016-05-26 Thread Michael Van Canneyt
On Thu, 26 May 2016, Graeme Geldenhuys wrote: On 2016-05-26 12:08, Michael Van Canneyt wrote: BUT: depending on UsePalette, it contains indexes in the palette or RGB Data. Oh, I forgot about Palette usage. I’ll have to check for that in my code. Does setting UsePalette := False at runtime a

Re: [fpc-pascal] Questions regarding FPImage's TFPMemoryImage.FData variable

2016-05-26 Thread Graeme Geldenhuys
On 2016-05-26 12:08, Michael Van Canneyt wrote: > BUT: > depending on UsePalette, it contains indexes in the palette or RGB Data. Oh, I forgot about Palette usage. I’ll have to check for that in my code. Does setting UsePalette := False at runtime auto convert palette data to RGB data? I had a lo

Re: [fpc-pascal] Questions regarding FPImage's TFPMemoryImage.FData variable

2016-05-26 Thread Graeme Geldenhuys
Playing around further I've managed to get something kinda working. See attached image. Left is what I now render via my 3rd party image library, right is what it is supposed to look like. Two points to note about the attached image: 1. The colours are obviously wrong. 2. The image seems

Re: [fpc-pascal] Questions regarding FPImage's TFPMemoryImage.FData variable

2016-05-26 Thread Michael Van Canneyt
On Thu, 26 May 2016, Graeme Geldenhuys wrote: Hi, The internal FData field variable of TFPMemoryImage is of type FPFItegerArray and is defined as follows: TFPIntegerArray = array [0..(maxint-1) div sizeof(integer)-1] of integer; PFPIntegerArray = ^TFPIntegerArray; Unfortunately the FPImag

Re: [fpc-pascal] How to declare function with untyped array parameter

2016-05-26 Thread LacaK
> > >>> is there way how to declare function, which will accept as parameter any >>> array type ? >>> (this parameter I need forward to System.Length() only ) >> >> Generally one uses TArray as parametertype. in such cases. One can take >> the length of a generic array. > > Hm, > I do not un

Re: [fpc-pascal] Using paszlib from fpc 3.0 with fpc and delphi 2007?

2016-05-26 Thread Bo Berglund
On Thu, 26 May 2016 00:10:20 +0200, Bo Berglund wrote: >OK, I will see if I can work with Abbrevia without installing the complete >package. Maybe I can just figure out the needed units and go with >these. If so I will post the result here (I mean which units were >needed for a minimum file write

[fpc-pascal] Questions regarding FPImage's TFPMemoryImage.FData variable

2016-05-26 Thread Graeme Geldenhuys
Hi, The internal FData field variable of TFPMemoryImage is of type FPFItegerArray and is defined as follows: TFPIntegerArray = array [0..(maxint-1) div sizeof(integer)-1] of integer; PFPIntegerArray = ^TFPIntegerArray; Unfortunately the FPImage unit is not documented at all. So I have the fo

Re: [fpc-pascal] How to declare function with untyped array parameter

2016-05-26 Thread Sven Barth
Am 26.05.2016 10:38 schrieb "LacaK" : > > >>> is there way how to declare function, which will accept as parameter any >>> array type ? >>> (this parameter I need forward to System.Length() only ) >> >> Generally one uses TArray as parametertype. in such cases. One can take >> the length of a gener

Re: [fpc-pascal] How to declare function with untyped array parameter

2016-05-26 Thread LacaK
is there way how to declare function, which will accept as parameter any array type ? (this parameter I need forward to System.Length() only ) Generally one uses TArray as parametertype. in such cases. One can take the length of a generic array. Hm, I do not understand. I need something like:

Re: [fpc-pascal] How to declare function with untyped array parameter

2016-05-26 Thread LacaK
Dňa 26.5.2016 o 9:11 Sven Barth napísal(a): Am 26.05.2016 08:33 schrieb "LacaK" >: > > Hi, > > is there way how to declare function, which will accept as parameter any array type ? > (this parameter I need forward to System.Length() only ) > > Just like Length() functi

Re: [fpc-pascal] Using paszlib from fpc 3.0 with fpc and delphi 2007?

2016-05-26 Thread Graeme Geldenhuys
On 2016-05-25 23:10, Bo Berglund wrote: > I will see if I can work with it without installing the complete > package. Maybe I can just figure out the needed units and go with > these. That's exactly what we did too. We didn't even bother installing it (visible in the Component Palette of the IDE).

Re: [fpc-pascal] How to declare function with untyped array parameter

2016-05-26 Thread Sven Barth
Am 26.05.2016 09:39 schrieb "Marco van de Voort" : > > In our previous episode, LacaK said: > > is there way how to declare function, which will accept as parameter any > > array type ? > > (this parameter I need forward to System.Length() only ) > > Generally one uses TArray as parametertype. in s

Re: [fpc-pascal] How to declare function with untyped array parameter

2016-05-26 Thread Marco van de Voort
In our previous episode, LacaK said: > is there way how to declare function, which will accept as parameter any > array type ? > (this parameter I need forward to System.Length() only ) Generally one uses TArray as parametertype. in such cases. One can take the length of a generic array.

Re: [fpc-pascal] How to declare function with untyped array parameter

2016-05-26 Thread Sven Barth
Am 26.05.2016 08:33 schrieb "LacaK" : > > Hi, > > is there way how to declare function, which will accept as parameter any array type ? > (this parameter I need forward to System.Length() only ) > > Just like Length() function. > > Now I fall into problem with generics , where I have in one unit ge