What is the correct definition for gflAddText in delphi??

Discussions on GFL SDK, the graphic library for reading and writing graphic files

Moderators: XnTriq, helmut, xnview

haerdalis

What is the correct definition for gflAddText in delphi??

Post by haerdalis »

What is the correct definition for gflAddText in delphi?

All the ones I have tried totally ignores the color parameter,
and instead writes the text with total transparency.. even after
changing the TGFL_COLOR structure to the same as defined in
libgfle.h.

By the way, it seems like the libgfl.pas hasn't been updated in a while.

I've tried:

function gflAddText(src: PGFL_BITMAP;
text: PChar;
font_name: PChar;
x: GFL_INT32;
y: GFL_INT32;
font_size: GFL_INT32;
orientation: GFL_INT32;
italic: GFL_BOOL;
bold: GFL_BOOL;
strike_out: GFL_BOOL;
underline: GFL_BOOL;
antialias: GFL_BOOL;
var color: PGFL_COLOR): GFL_ERROR; stdcall;

function gflAddText(src: PGFL_BITMAP;
text: PChar;
font_name: PChar;
x: GFL_INT32;
y: GFL_INT32;
font_size: GFL_INT32;
orientation: GFL_INT32;
italic: GFL_BOOL;
bold: GFL_BOOL;
strike_out: GFL_BOOL;
underline: GFL_BOOL;
antialias: GFL_BOOL;
var color: TGFL_COLOR): GFL_ERROR; stdcall;

and

function gflAddText(src: PGFL_BITMAP;
text: PChar;
font_name: PChar;
x: GFL_INT32;
y: GFL_INT32;
font_size: GFL_INT32;
orientation: GFL_INT32;
italic: GFL_BOOL;
bold: GFL_BOOL;
strike_out: GFL_BOOL;
underline: GFL_BOOL;
antialias: GFL_BOOL;
const color: PGFL_COLOR): GFL_ERROR; stdcall;
User avatar
xnview
Author of XnView
Posts: 44920
Joined: Mon Oct 13, 2003 7:31 am
Location: France

Re: What is the correct definition for gflAddText in delphi?

Post by xnview »

haerdalis wrote:What is the correct definition for gflAddText in delphi?

All the ones I have tried totally ignores the color parameter,
and instead writes the text with total transparency.. even after
changing the TGFL_COLOR structure to the same as defined in
libgfle.h.

By the way, it seems like the libgfl.pas hasn't been updated in a while.

function gflAddText(src: PGFL_BITMAP;
text: PChar;
font_name: PChar;
x: GFL_INT32;
y: GFL_INT32;
font_size: GFL_INT32;
orientation: GFL_INT32;
italic: GFL_BOOL;
bold: GFL_BOOL;
strike_out: GFL_BOOL;
underline: GFL_BOOL;
antialias: GFL_BOOL;
const color: PGFL_COLOR): GFL_ERROR; stdcall;
This one doesn't works??
Pierre.
haerdalis
Posts: 6
Joined: Tue Nov 15, 2005 5:08 am

Re: What is the correct definition for gflAddText in delphi?

Post by haerdalis »

xnview wrote:
haerdalis wrote:What is the correct definition for gflAddText in delphi?

All the ones I have tried totally ignores the color parameter,
and instead writes the text with total transparency.. even after
changing the TGFL_COLOR structure to the same as defined in
libgfle.h.

By the way, it seems like the libgfl.pas hasn't been updated in a while.

function gflAddText(src: PGFL_BITMAP;
text: PChar;
font_name: PChar;
x: GFL_INT32;
y: GFL_INT32;
font_size: GFL_INT32;
orientation: GFL_INT32;
italic: GFL_BOOL;
bold: GFL_BOOL;
strike_out: GFL_BOOL;
underline: GFL_BOOL;
antialias: GFL_BOOL;
const color: PGFL_COLOR): GFL_ERROR; stdcall;
This one doesn't works??
Well, no, not really.. In RGB or similar without alpha, yes then it works, but not in RGBA mode, or the other alphamodes.. Then it writes the text in the same color as the
main background is instead.. Rather strange actually..
User avatar
xnview
Author of XnView
Posts: 44920
Joined: Mon Oct 13, 2003 7:31 am
Location: France

Re: What is the correct definition for gflAddText in delphi?

Post by xnview »

haerdalis wrote:Well, no, not really.. In RGB or similar without alpha, yes then it works, but not in RGBA mode, or the other alphamodes.. Then it writes the text in the same color as the
main background is instead.. Rather strange actually..
Ok, i'll check
Pierre.