Page 1 of 1

gflCrop and GFL_RECT

Posted: Tue Jan 29, 2008 11:13 pm
by madiazg
Hello, I have a problem with gflCrop and GFL_RECT.
if:

Code: Select all

var
  AreaAjusteFino : PGFL_RECT;
.
.
AreaAjusteFino.x := 10;
then Error: Access violation at address...

but

Code: Select all

  AreaAjusteFino : TFL_RECT;
.
.
.
  e2 := gflCrop(gfl_bmp2,nil,AreaAjusteFino)
then 'Incompatible types: PGFL_RECT and TGFL_RECT'

What am I doing badly?[/code]

I am using Turbo Delphi .

Regards...

Re: gflCrop and GFL_RECT

Posted: Wed Jan 30, 2008 8:32 am
by xnview
I don't know very well Delphi, but i think you must use TGFL_RECT

Re: gflCrop and GFL_RECT

Posted: Mon Mar 03, 2008 1:29 pm
by gispos
madiazg wrote:Hello, I have a problem with gflCrop and GFL_RECT.
if:

Code: Select all

var
  AreaAjusteFino : PGFL_RECT;
.
.
AreaAjusteFino.x := 10;
then Error: Access violation at address...

but

Code: Select all

  AreaAjusteFino : TFL_RECT;
.
.
.
  e2 := gflCrop(gfl_bmp2,nil,AreaAjusteFino)
then 'Incompatible types: PGFL_RECT and TGFL_RECT'

What am I doing badly?[/code]

I am using Turbo Delphi .

Regards...
PGFL_Rect is a Pointer !
You must get memory like New and finally Dispose or use this:

Code: Select all

AreaAjusteFino : TGFL_RECT;

e2 := gflCrop(gfl_bmp2,nil,@AreaAjusteFino)  // operator @

or 
pR: PGFL_RECT;
R: TGFL_RECT;

pR := @R;
pR.x := 10;
Gruß gispos

Posted: Fri Mar 07, 2008 10:41 pm
by madiazg
Thank you very much.