_string.pp changes

This commit is contained in:
oscarl-2
2003-12-20 08:54:24 +00:00
parent 5408d63bed
commit 0e1c50a2be
2 changed files with 292 additions and 385 deletions

View File

@@ -23,7 +23,7 @@ unit Bitmap;
interface interface
uses uses
BeObj, Archivable, GraphicDefs, Message, OS, Rect, SupportDefs,accelerant; BeObj, Archivable, GraphicDefs, Message, OS, Rect, SupportDefs, View;
const const
B_BITMAP_CLEAR_TO_WHITE = $00000001; B_BITMAP_CLEAR_TO_WHITE = $00000001;
@@ -70,48 +70,17 @@ type
cs : color_space); cs : color_space);
function GetOverlayRestrictions(restrict : overlay_restrictions) function GetOverlayRestrictions(restrict : overlay_restrictions)
: status_t; : status_t;
// procedure AddChild(view : BView); procedure AddChild(view : BView);
// function RemoveChild(view : BView) : Boolean; function RemoveChild(view : BView) : Boolean;
function CountChildren : Integer; function CountChildren : Integer;
// function ChildAt(index : Integer) : BView; function ChildAt(index : Integer) : BView;
// function FindView(view_name : PChar) : BView; function FindView(view_name : PChar) : BView;
// function FindView(point : BPoint) : BView; function FindView(point : BPoint) : BView;
function Lock : Boolean; function Lock : Boolean;
procedure Unlock; procedure Unlock;
function IsLocked : Boolean; function IsLocked : Boolean;
function Perform(d : perform_code; arg : Pointer) : status_t; function Perform(d : perform_code; arg : Pointer) : status_t;
{
procedure _ReservedBitmap1;
procedure _ReservedBitmap2;
procedure _ReservedBitmap3;
constructor Create( : TBitmap);
function operator=( : TBitmap) : TBitmap;
function get_shared_pointer : PChar;
procedure set_bits(offset : integer; data : PChar; length : integer);
procedure set_bits_24(offset : integer; data : PChar; length : integer);
procedure set_bits_24_local_gray(offset : integer; data : PChar; len : integer);
procedure set_bits_24_local_256(offset : integer; data : PByte; len : integer);
procedure set_bits_24_24(offset : integer; data : PChar; length : integer; big_endian_dst : Boolean);
procedure set_bits_8_24(offset : integer; data : PChar; length : integer; big_endian_dst : Boolean);
procedure set_bits_gray_24(offset : integer; data : PChar; length : integer; big_endian_dst : Boolean);
function get_server_token : integer;
procedure InitObject(frame : TRect; depth : TColor_Space; flags : Cardinal; bytesPerRow : integer; screenID : TScreenID);
procedure AssertPtr;
procedure void *fBasePtr;
procedure int32 fSize;
procedure color_space fType;
procedure BRect fBound;
procedure int32 fRowBytes;
procedure BWindow *fWindow;
procedure int32 fServerToken;
procedure int32 fToken;
procedure uint8 unused;
procedure area_id fArea;
procedure area_id fOrigArea;
procedure uint32 fFlags;
procedure status_t fInitError;
}
end; end;
function BBitmap_Create(AObject : TBeObject; frame : TCPlusObject; function BBitmap_Create(AObject : TBeObject; frame : TCPlusObject;
@@ -189,7 +158,7 @@ function BBitmap_RemoveChild(AObject : TCPlusObject; view : TCPlusObject)
function BBitmap_CountChildren(AObject : TCPlusObject) : Integer; cdecl; function BBitmap_CountChildren(AObject : TCPlusObject) : Integer; cdecl;
external BePascalLibName name 'BBitmap_CountChildren'; external BePascalLibName name 'BBitmap_CountChildren';
(*function BBitmap_ChildAt(AObject : TCPlusObject; index : Integer) : BView; function BBitmap_ChildAt(AObject : TCPlusObject; index : Integer) : BView;
cdecl; external BePascalLibName name 'BBitmap_ChildAt'; cdecl; external BePascalLibName name 'BBitmap_ChildAt';
function BBitmap_FindView(AObject : TCPlusObject; view_name : PChar) : BView; function BBitmap_FindView(AObject : TCPlusObject; view_name : PChar) : BView;
@@ -197,7 +166,7 @@ function BBitmap_FindView(AObject : TCPlusObject; view_name : PChar) : BView;
function BBitmap_FindView(AObject : TCPlusObject; point : {BPoint}TCPlusObject) function BBitmap_FindView(AObject : TCPlusObject; point : {BPoint}TCPlusObject)
: BView; cdecl; external BePascalLibName name 'BBitmap_FindView'; : BView; cdecl; external BePascalLibName name 'BBitmap_FindView';
*)
function BBitmap_Lock(AObject : TCPlusObject) : Boolean; cdecl; function BBitmap_Lock(AObject : TCPlusObject) : Boolean; cdecl;
external BePascalLibName name 'BBitmap_Lock'; external BePascalLibName name 'BBitmap_Lock';
@@ -209,38 +178,6 @@ function BBitmap_IsLocked(AObject : TCPlusObject) : Boolean; cdecl;
function BBitmap_Perform(AObject : TCPlusObject; d : perform_code; arg : Pointer) : status_t; cdecl; external BePascalLibName name 'BBitmap_Perform'; function BBitmap_Perform(AObject : TCPlusObject; d : perform_code; arg : Pointer) : status_t; cdecl; external BePascalLibName name 'BBitmap_Perform';
{
procedure BBitmap__ReservedBitmap1(AObject : TCPlusObject); cdecl; external BePascalLibName name 'BBitmap__ReservedBitmap1';
procedure BBitmap__ReservedBitmap2(AObject : TCPlusObject); cdecl; external BePascalLibName name 'BBitmap__ReservedBitmap2';
procedure BBitmap__ReservedBitmap3(AObject : TCPlusObject); cdecl; external BePascalLibName name 'BBitmap__ReservedBitmap3';
function BBitmap_Create(AObject : TBeObject; : TBitmap); cdecl; external BePascalLibName name 'BBitmap_Create';
function BBitmap_operator=(AObject : TCPlusObject; : TBitmap) : TBitmap; cdecl; external BePascalLibName name 'BBitmap_operator=';
function BBitmap_get_shared_pointer(AObject : TCPlusObject) : PChar; cdecl; external BePascalLibName name 'BBitmap_get_shared_pointer';
procedure BBitmap_set_bits(AObject : TCPlusObject; offset : integer; data : PChar; length : integer); cdecl; external BePascalLibName name 'BBitmap_set_bits';
procedure BBitmap_set_bits_24(AObject : TCPlusObject; offset : integer; data : PChar; length : integer); cdecl; external BePascalLibName name 'BBitmap_set_bits_24';
procedure BBitmap_set_bits_24_local_gray(AObject : TCPlusObject; offset : integer; data : PChar; len : integer); cdecl; external BePascalLibName name 'BBitmap_set_bits_24_local_gray';
procedure BBitmap_set_bits_24_local_256(AObject : TCPlusObject; offset : integer; data : PByte; len : integer); cdecl; external BePascalLibName name 'BBitmap_set_bits_24_local_256';
procedure BBitmap_set_bits_24_24(AObject : TCPlusObject; offset : integer; data : PChar; length : integer; big_endian_dst : Boolean); cdecl; external BePascalLibName name 'BBitmap_set_bits_24_24';
procedure BBitmap_set_bits_8_24(AObject : TCPlusObject; offset : integer; data : PChar; length : integer; big_endian_dst : Boolean); cdecl; external BePascalLibName name 'BBitmap_set_bits_8_24';
procedure BBitmap_set_bits_gray_24(AObject : TCPlusObject; offset : integer; data : PChar; length : integer; big_endian_dst : Boolean); cdecl; external BePascalLibName name 'BBitmap_set_bits_gray_24';
function BBitmap_get_server_token(AObject : TCPlusObject) : integer; cdecl; external BePascalLibName name 'BBitmap_get_server_token';
procedure BBitmap_InitObject(AObject : TCPlusObject; frame : TCPlusObject; depth : TColor_Space; flags : Cardinal; bytesPerRow : integer; screenID : TScreenID); cdecl; external BePascalLibName name 'BBitmap_InitObject';
procedure BBitmap_AssertPtr(AObject : TCPlusObject); cdecl; external BePascalLibName name 'BBitmap_AssertPtr';
procedure BBitmap_void *fBasePtr(AObject : TCPlusObject); cdecl; external BePascalLibName name 'BBitmap_void *fBasePtr';
procedure BBitmap_int32 fSize(AObject : TCPlusObject); cdecl; external BePascalLibName name 'BBitmap_int32 fSize';
procedure BBitmap_color_space fType(AObject : TCPlusObject); cdecl; external BePascalLibName name 'BBitmap_color_space fType';
procedure BBitmap_BRect fBound(AObject : TCPlusObject); cdecl; external BePascalLibName name 'BBitmap_BRect fBound';
procedure BBitmap_int32 fRowBytes(AObject : TCPlusObject); cdecl; external BePascalLibName name 'BBitmap_int32 fRowBytes';
procedure BBitmap_BWindow *fWindow(AObject : TCPlusObject); cdecl; external BePascalLibName name 'BBitmap_BWindow *fWindow';
procedure BBitmap_int32 fServerToken(AObject : TCPlusObject); cdecl; external BePascalLibName name 'BBitmap_int32 fServerToken';
procedure BBitmap_int32 fToken(AObject : TCPlusObject); cdecl; external BePascalLibName name 'BBitmap_int32 fToken';
procedure BBitmap_uint8 unused(AObject : TCPlusObject); cdecl; external BePascalLibName name 'BBitmap_uint8 unused';
procedure BBitmap_area_id fArea(AObject : TCPlusObject); cdecl; external BePascalLibName name 'BBitmap_area_id fArea';
procedure BBitmap_area_id fOrigArea(AObject : TCPlusObject); cdecl; external BePascalLibName name 'BBitmap_area_id fOrigArea';
procedure BBitmap_uint32 fFlags(AObject : TCPlusObject); cdecl; external BePascalLibName name 'BBitmap_uint32 fFlags';
procedure BBitmap_status_t fInitError(AObject : TCPlusObject); cdecl; external BePascalLibName name 'BBitmap_status_t fInitError';
}
implementation implementation
{ -- NOTE! { -- NOTE!
@@ -275,8 +212,8 @@ end;
constructor BBitmap.Create(source : BBitmap; accepts_views : Boolean; constructor BBitmap.Create(source : BBitmap; accepts_views : Boolean;
need_contiguous : Boolean); need_contiguous : Boolean);
begin begin
CreatePas; CreatePas;
CPlusObject := BBitmap_Create_2(Self, source, accepts_views, need_contiguous); CPlusObject := BBitmap_Create_2(Self, source, accepts_views, need_contiguous);
end; end;
constructor BBitmap.Create(data : BMessage); constructor BBitmap.Create(data : BMessage);
@@ -361,7 +298,7 @@ begin
Result := BBitmap_GetOverlayRestrictions(CPlusObject, restrict); Result := BBitmap_GetOverlayRestrictions(CPlusObject, restrict);
end; end;
(*procedure BBitmap.AddChild(view : BView); procedure BBitmap.AddChild(view : BView);
begin begin
BBitmap_AddChild(CPlusObject, view.CPlusObject); BBitmap_AddChild(CPlusObject, view.CPlusObject);
end; end;
@@ -370,14 +307,13 @@ function BBitmap.RemoveChild(view : BView) : Boolean;
begin begin
Result := BBitmap_RemoveChild(CPlusObject, view.CPlusObject); Result := BBitmap_RemoveChild(CPlusObject, view.CPlusObject);
end; end;
*)
function BBitmap.CountChildren : Integer; function BBitmap.CountChildren : Integer;
begin begin
Result := BBitmap_CountChildren(CPlusObject); Result := BBitmap_CountChildren(CPlusObject);
end; end;
(*function BBitmap.ChildAt(index : Integer) : BView; function BBitmap.ChildAt(index : Integer) : BView;
begin begin
Result := BBitmap_ChildAt(CPlusObject, index); Result := BBitmap_ChildAt(CPlusObject, index);
end; end;
@@ -391,7 +327,6 @@ function BBitmap.FindView(point : BPoint) : BView;
begin begin
Result := BBitmap_FindView(CPlusObject, point.CPlusObject); Result := BBitmap_FindView(CPlusObject, point.CPlusObject);
end; end;
*)
function BBitmap.Lock : Boolean; function BBitmap.Lock : Boolean;
begin begin
@@ -413,151 +348,4 @@ begin
Result := BBitmap_Perform(CPlusObject, d, arg); Result := BBitmap_Perform(CPlusObject, d, arg);
end; end;
{ end.
procedure TBitmap._ReservedBitmap1;
begin
BBitmap__ReservedBitmap1(CPlusObject);
end;
procedure TBitmap._ReservedBitmap2;
begin
BBitmap__ReservedBitmap2(CPlusObject);
end;
procedure TBitmap._ReservedBitmap3;
begin
BBitmap__ReservedBitmap3(CPlusObject);
end;
constructor TBitmap.Create( : TBitmap);
begin
CPlusObject := BBitmap_Create(Self, );
end;
function TBitmap.operator=( : TBitmap) : TBitmap;
begin
Result := BBitmap_operator=(CPlusObject, );
end;
function TBitmap.get_shared_pointer : PChar;
begin
Result := BBitmap_get_shared_pointer(CPlusObject);
end;
procedure TBitmap.set_bits(offset : integer; data : PChar; length : integer);
begin
BBitmap_set_bits(CPlusObject, offset, data, length);
end;
procedure TBitmap.set_bits_24(offset : integer; data : PChar; length : integer);
begin
BBitmap_set_bits_24(CPlusObject, offset, data, length);
end;
procedure TBitmap.set_bits_24_local_gray(offset : integer; data : PChar; len : integer);
begin
BBitmap_set_bits_24_local_gray(CPlusObject, offset, data, len);
end;
procedure TBitmap.set_bits_24_local_256(offset : integer; data : PByte; len : integer);
begin
BBitmap_set_bits_24_local_256(CPlusObject, offset, data, len);
end;
procedure TBitmap.set_bits_24_24(offset : integer; data : PChar; length : integer; big_endian_dst : Boolean);
begin
BBitmap_set_bits_24_24(CPlusObject, offset, data, length, big_endian_dst);
end;
procedure TBitmap.set_bits_8_24(offset : integer; data : PChar; length : integer; big_endian_dst : Boolean);
begin
BBitmap_set_bits_8_24(CPlusObject, offset, data, length, big_endian_dst);
end;
procedure TBitmap.set_bits_gray_24(offset : integer; data : PChar; length : integer; big_endian_dst : Boolean);
begin
BBitmap_set_bits_gray_24(CPlusObject, offset, data, length, big_endian_dst);
end;
function TBitmap.get_server_token : integer;
begin
Result := BBitmap_get_server_token(CPlusObject);
end;
procedure TBitmap.InitObject(frame : TRect; depth : TColor_Space; flags : Cardinal; bytesPerRow : integer; screenID : TScreenID);
begin
BBitmap_InitObject(CPlusObject, frame.CPlusObject, depth, flags, bytesPerRow, screenID);
end;
procedure TBitmap.AssertPtr;
begin
BBitmap_AssertPtr(CPlusObject);
end;
procedure TBitmap.void *fBasePtr;
begin
BBitmap_void *fBasePtr(CPlusObject);
end;
procedure TBitmap.int32 fSize;
begin
BBitmap_int32 fSize(CPlusObject);
end;
procedure TBitmap.color_space fType;
begin
BBitmap_color_space fType(CPlusObject);
end;
procedure TBitmap.BRect fBound;
begin
BBitmap_BRect fBound(CPlusObject);
end;
procedure TBitmap.int32 fRowBytes;
begin
BBitmap_int32 fRowBytes(CPlusObject);
end;
procedure TBitmap.BWindow *fWindow;
begin
BBitmap_BWindow *fWindow(CPlusObject);
end;
procedure TBitmap.int32 fServerToken;
begin
BBitmap_int32 fServerToken(CPlusObject);
end;
procedure TBitmap.int32 fToken;
begin
BBitmap_int32 fToken(CPlusObject);
end;
procedure TBitmap.uint8 unused;
begin
BBitmap_uint8 unused(CPlusObject);
end;
procedure TBitmap.area_id fArea;
begin
BBitmap_area_id fArea(CPlusObject);
end;
procedure TBitmap.area_id fOrigArea;
begin
BBitmap_area_id fOrigArea(CPlusObject);
end;
procedure TBitmap.uint32 fFlags;
begin
BBitmap_uint32 fFlags(CPlusObject);
end;
procedure TBitmap.status_t fInitError;
begin
BBitmap_status_t fInitError(CPlusObject);
end;
}
end.

View File

@@ -1,6 +1,7 @@
{ BePascal - A pascal wrapper around the BeOS API { BePascal - A pascal wrapper around the BeOS API
Copyright (C) 2002 Olivier Coursiere Copyright (C) 2002-2003 Olivier Coursiere
Eric Jourde Eric Jourde
Oscar Lesta
This library is free software; you can redistribute it and/or This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public modify it under the terms of the GNU Library General Public
@@ -16,124 +17,170 @@
License along with this library; if not, write to the Free License along with this library; if not, write to the Free
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
} }
unit font; unit Font;
interface interface
uses uses
beobj,flattenable,interfacedefs,supportdefs,rect,bstring; BeObj, Flattenable, InterfaceDefs, Rect, _String, SupportDefs;
type
font_which= (
font_which_nil,
B_PLAIN_FONT,
B_BOLD_FONT,
B_FIXED_FONT,
B_SYMBOL_FONT,
B_SERIF_FONT
);
const const
B__NUM_FONT = 5; B_FONT_FAMILY_LENGTH = 63;
// Attention this is hexadecimal; need conversion !!!! B_FONT_STYLE_LENGTH = 63;
B_ITALIC_FACE = $0001;
B_UNDERSCORE_FACE = $0002;
B_NEGATIVE_FACE = $0004;
B_OUTLINED_FACE = $0008;
B_STRIKEOUT_FACE = $0010;
B_BOLD_FACE = $0020;
B_REGULAR_FACE = $0040;
type type
font_family = string[B_FONT_FAMILY_LENGTH + 1]; //array[0..B_FONT_FAMILY_LENGTH] of char;
font_style = string[B_FONT_STYLE_LENGTH + 1]; //array[0..B_FONT_STYLE_LENGTH] of char;
font_metric_mode = ( const
B_SCREEN_METRIC, B_CHAR_SPACING = 0;
B_PRINTING_METRIC); B_STRING_SPACING = 1;
B_BITMAP_SPACING = 2;
font_file_format =( B_FIXED_SPACING = 3;
B_TRUETYPE_WINDOWS ,
B_POSTSCRIPT_TYPE1_WINDOWS);
const B_FONT_FAMILY_LENGTH= 63;
type FONT_FAMILY = array[0..B_FONT_FAMILY_LENGTH] of char;
const B_FONT_STYLE_LENGTH= 63;
type font_style = array[0..B_FONT_STYLE_LENGTH ] of char;
type type
escapement_delta = record font_direction = (
nonspace : real; B_FONT_LEFT_TO_RIGHT,
space: real; B_FONT_RIGHT_TO_LEFT
end; );
edge_info = record
left: real; const
right: real; B_DISABLE_ANTIALIASING = $00000001;
end; B_FORCE_ANTIALIASING = $00000002;
tuned_font_info = record
size : real;
shear: real ;
rotation : real;
flags: cardinal;
face : integer;
end;
B_TRUNCATE_END = 0;
font_height = record B_TRUNCATE_BEGINNING = 1;
ascent: real; B_TRUNCATE_MIDDLE = 2;
descent: real; B_TRUNCATE_SMART = 3;
leading: real;
end;
font_direction =(
B_FONT_LEFT_TO_RIGHT ,
B_FONT_RIGHT_TO_LEFT
);
B_UNICODE_UTF8 = 0;
B_ISO_8859_1 = 1;
B_ISO_8859_2 = 2;
B_ISO_8859_3 = 3;
B_ISO_8859_4 = 4;
B_ISO_8859_5 = 5;
B_ISO_8859_6 = 6;
B_ISO_8859_7 = 7;
B_ISO_8859_8 = 8;
B_ISO_8859_9 = 9;
B_ISO_8859_10 = 10;
B_MACINTOSH_ROMAN = 11;
B_SCREEN_FONT_CACHE = $0001;
B_PRINTING_FONT_CACHE = $0002;
B_DEFAULT_CACHE_SETTING = $0004;
B_APP_CACHE_SETTING = $0008;
B_HAS_TUNED_FONT = $0001;
B_IS_FIXED = $0002;
// B__NUM_FONT = 5;
B_ITALIC_FACE = $0001;
B_UNDERSCORE_FACE = $0002;
B_NEGATIVE_FACE = $0004;
B_OUTLINED_FACE = $0008;
B_STRIKEOUT_FACE = $0010;
B_BOLD_FACE = $0020;
B_REGULAR_FACE = $0040;
type type
BFont = class(TBeObject) font_metric_mode = (
private B_SCREEN_METRIC,
B_PRINTING_METRIC
);
font_file_format = (
B_TRUETYPE_WINDOWS,
B_POSTSCRIPT_TYPE1_WINDOWS
);
{
font_which = (font_which_nil,
B_PLAIN_FONT,
B_BOLD_FONT,
B_FIXED_FONT,
B_SYMBOL_FONT,
B_SERIF_FONT
);
}
type
edge_info = record
left,
right : Single;
end;
font_height = record
ascent,
descent,
leading: Single;
end;
escapement_delta = record
nonspace,
space : Single;
end;
font_cache_info = record
sheared_font_penalty,
rotated_font_penalty : Longint;
oversize_threshold : Single;
oversize_penalty,
cache_size : Longint;
spacing_size_threshold : Single;
end;
tuned_font_info = record
size,
shear,
rotation : Single;
flags : Longword;
face : Word;
end;
type
BFont = class(TBeObject)
public public
constructor Create; constructor Create;
constructor Create(font : BFont);virtual; constructor Create(font : BFont); virtual;
destructor Destroy;override; destructor Destroy;override;
function SetFamilyAndStyle(family : Font_FAMILY; style : Font_style) : Status_t; function SetFamilyAndStyle(family : Font_FAMILY; style : font_style) : status_t;
procedure SetFamilyAndStyle(code : Cardinal); procedure SetFamilyAndStyle(code : Longword);
function SetFamilyAndFace(family : Font_FAMILY; aface : integer) : Status_t; function SetFamilyAndFace(family : Font_FAMILY; aface : Word) : status_t;
procedure SetSize(asize : single); procedure SetSize(asize : Single);
procedure SetShear(ashear : single); procedure SetShear(ashear : Single);
procedure SetRotation(arotation : single); procedure SetRotation(arotation : Single);
procedure SetSpacing(aspacing : integer); procedure SetSpacing(aspacing : Byte);
procedure SetEncoding(aencoding : integer); procedure SetEncoding(aencoding : Byte);
procedure SetFace(aface :integer ); procedure SetFace(aface : Word);
procedure SetFlags(aflags : Cardinal); procedure SetFlags(aflags : Longword);
procedure GetFamilyAndStyle(family : Font_FAMILY; style : Font_style); procedure GetFamilyAndStyle(family : font_family; style : font_style);
function FamilyAndStyle : Cardinal; function FamilyAndStyle : Longword;
function Size : single; function Size : Single;
function Shear : single; function Shear : Single;
function Rotation : single; function Rotation : Single;
function Spacing : integer; function Spacing : Byte;
function Encoding : integer; function Encoding : Byte;
function Face : integer; function Face : Word;
function Flags : Cardinal; function Flags : Longword;
function Direction : Font_direction; function Direction : Font_direction;
function IsFixed : boolean; function IsFixed : Boolean;
function IsFullAndHalfFixed : boolean; function IsFullAndHalfFixed : Boolean;
function BoundingBox : BRect; function BoundingBox : BRect;
// function Blocks : ; // function Blocks : ;
function FileFormat : Font_file_format; function FileFormat : Font_file_format;
function CountTuned : integer; function CountTuned : Longint;
procedure GetTunedInfo(index : integer; info : tuned_font_info); procedure GetTunedInfo(index : Longint; info : tuned_font_info);
procedure TruncateString(in_out : TString; mode : Cardinal; width : single); procedure TruncateString(in_out : BString; mode : Longword; width : Single);
// procedure GetTruncatedStrings(stringArray : PChar; numStrings : integer; mode : Cardinal; width : single; resultArray : Pchar); // procedure GetTruncatedStrings(stringArray : PChar; numStrings : integer; mode : Cardinal; width : single; resultArray : Pchar);
// procedure GetTruncatedStrings(stringArray : PChar; numStrings : integer; mode : Cardinal; width : single; resultArray : PChar); // procedure GetTruncatedStrings(stringArray : PChar; numStrings : integer; mode : Cardinal; width : single; resultArray : PChar);
function StringWidth(astring : PChar) : single; function StringWidth(astring : PChar) : Single;
function StringWidth(astring : PChar; length : integer) : single; function StringWidth(astring : PChar; length : Longint) : Single;
// procedure GetStringWidths(stringArray : PChar; lengthArray : integer; numStrings : integer; widthArray : single); // procedure GetStringWidths(stringArray : PChar; lengthArray : integer; numStrings : integer; widthArray : single);
// procedure GetEscapements(charArray : ; numChars : integer; escapementArray : single); // procedure GetEscapements(charArray : ; numChars : integer; escapementArray : single);
// procedure GetEscapements(charArray : ; numChars : integer; delta : ; escapementArray : single); // procedure GetEscapements(charArray : ; numChars : integer; delta : ; escapementArray : single);
@@ -169,48 +216,85 @@ procedure tuned_font_info_uint32 flags(AObject : TCPlusObject); cdecl; external
procedure tuned_font_info_uint16 face(AObject : TCPlusObject); cdecl; external BePascalLibName name 'tuned_font_info_uint16 face'; procedure tuned_font_info_uint16 face(AObject : TCPlusObject); cdecl; external BePascalLibName name 'tuned_font_info_uint16 face';
} }
function BFont_Create(AObject : TBeObject): TCPlusObject; cdecl; external BePascalLibName name 'BFont_Create'; function BFont_Create(AObject : TBeObject) : TCPlusObject;
function BFont_Create(AObject : TBeObject; font : BFont): TCPlusObject; cdecl; external BePascalLibName name 'BFont_Create_1'; cdecl; external BePascalLibName name 'BFont_Create';
procedure BFont_Free(AObject : TCPlusObject); cdecl; external BePascalLibName name 'BFont_Free'; function BFont_Create(AObject : TBeObject; font : BFont) : TCPlusObject;
function BFont_SetFamilyAndStyle(AObject : TCPlusObject; family : Font_family; style : Font_style) : Status_t; cdecl; external BePascalLibName name 'BFont_SetFamilyAndStyle'; cdecl; external BePascalLibName name 'BFont_Create_1';
procedure BFont_SetFamilyAndStyle(AObject : TCPlusObject; code : Cardinal); cdecl; external BePascalLibName name 'BFont_SetFamilyAndStyle'; procedure BFont_Free(AObject : TCPlusObject);
function BFont_SetFamilyAndFace(AObject : TCPlusObject; family : Font_family; face : integer) : Status_t; cdecl; external BePascalLibName name 'BFont_SetFamilyAndFace'; cdecl; external BePascalLibName name 'BFont_Free';
procedure BFont_SetSize(AObject : TCPlusObject; size : single); cdecl; external BePascalLibName name 'BFont_SetSize'; function BFont_SetFamilyAndStyle(AObject : TCPlusObject; family : font_family;
procedure BFont_SetShear(AObject : TCPlusObject; shear : single); cdecl; external BePascalLibName name 'BFont_SetShear'; style : font_style) : status_t;
procedure BFont_SetRotation(AObject : TCPlusObject; rotation : single); cdecl; external BePascalLibName name 'BFont_SetRotation'; cdecl; external BePascalLibName name 'BFont_SetFamilyAndStyle';
procedure BFont_SetSpacing(AObject : TCPlusObject; spacing : integer); cdecl; external BePascalLibName name 'BFont_SetSpacing'; procedure BFont_SetFamilyAndStyle(AObject : TCPlusObject; code : Longword);
procedure BFont_SetEncoding(AObject : TCPlusObject; encoding : integer); cdecl; external BePascalLibName name 'BFont_SetEncoding'; cdecl; external BePascalLibName name 'BFont_SetFamilyAndStyle';
procedure BFont_SetFace(AObject : TCPlusObject; face :integer ); cdecl; external BePascalLibName name 'BFont_SetFace'; function BFont_SetFamilyAndFace(AObject : TCPlusObject; family : font_family;
procedure BFont_SetFlags(AObject : TCPlusObject; flags : Cardinal); cdecl; external BePascalLibName name 'BFont_SetFlags'; face : Word) : status_t;
procedure BFont_GetFamilyAndStyle(AObject : TCPlusObject; family : Font_family; style : Font_style); cdecl; external BePascalLibName name 'BFont_GetFamilyAndStyle'; cdecl; external BePascalLibName name 'BFont_SetFamilyAndFace';
function BFont_FamilyAndStyle(AObject : TCPlusObject) : Cardinal; cdecl; external BePascalLibName name 'BFont_FamilyAndStyle'; procedure BFont_SetSize(AObject : TCPlusObject; size : Single);
function BFont_Size(AObject : TCPlusObject) : single; cdecl; external BePascalLibName name 'BFont_Size'; cdecl; external BePascalLibName name 'BFont_SetSize';
function BFont_Shear(AObject : TCPlusObject) : single; cdecl; external BePascalLibName name 'BFont_Shear'; procedure BFont_SetShear(AObject : TCPlusObject; shear : Single);
function BFont_Rotation(AObject : TCPlusObject) : single; cdecl; external BePascalLibName name 'BFont_Rotation'; cdecl; external BePascalLibName name 'BFont_SetShear';
function BFont_Spacing(AObject : TCPlusObject) : integer; cdecl; external BePascalLibName name 'BFont_Spacing'; procedure BFont_SetRotation(AObject : TCPlusObject; rotation : Single);
function BFont_Encoding(AObject : TCPlusObject) : integer; cdecl; external BePascalLibName name 'BFont_Encoding'; cdecl; external BePascalLibName name 'BFont_SetRotation';
function BFont_Face(AObject : TCPlusObject) : integer; cdecl; external BePascalLibName name 'BFont_Face'; procedure BFont_SetSpacing(AObject : TCPlusObject; spacing : Byte);
function BFont_Flags(AObject : TCPlusObject) : Cardinal; cdecl; external BePascalLibName name 'BFont_Flags'; cdecl; external BePascalLibName name 'BFont_SetSpacing';
procedure BFont_SetEncoding(AObject : TCPlusObject; encoding : Byte);
cdecl; external BePascalLibName name 'BFont_SetEncoding';
procedure BFont_SetFace(AObject : TCPlusObject; face : Word);
cdecl; external BePascalLibName name 'BFont_SetFace';
procedure BFont_SetFlags(AObject : TCPlusObject; flags : Longword);
cdecl; external BePascalLibName name 'BFont_SetFlags';
procedure BFont_GetFamilyAndStyle(AObject : TCPlusObject; family : font_family;
style : font_style);
cdecl; external BePascalLibName name 'BFont_GetFamilyAndStyle';
function BFont_FamilyAndStyle(AObject : TCPlusObject) : Longword;
cdecl; external BePascalLibName name 'BFont_FamilyAndStyle';
function BFont_Size(AObject : TCPlusObject) : Single;
cdecl; external BePascalLibName name 'BFont_Size';
function BFont_Shear(AObject : TCPlusObject) : Single;
cdecl; external BePascalLibName name 'BFont_Shear';
function BFont_Rotation(AObject : TCPlusObject) : Single;
cdecl; external BePascalLibName name 'BFont_Rotation';
function BFont_Spacing(AObject : TCPlusObject) : Byte;
cdecl; external BePascalLibName name 'BFont_Spacing';
function BFont_Encoding(AObject : TCPlusObject) : Byte;
cdecl; external BePascalLibName name 'BFont_Encoding';
function BFont_Face(AObject : TCPlusObject) : Word;
cdecl; external BePascalLibName name 'BFont_Face';
function BFont_Flags(AObject : TCPlusObject) : Longword;
cdecl; external BePascalLibName name 'BFont_Flags';
function BFont_Direction(AObject : TCPlusObject) : Font_direction; cdecl; external BePascalLibName name 'BFont_Direction'; function BFont_Direction(AObject : TCPlusObject) : Font_direction; cdecl; external BePascalLibName name 'BFont_Direction';
function BFont_IsFixed(AObject : TCPlusObject) : boolean; cdecl; external BePascalLibName name 'BFont_IsFixed'; function BFont_IsFixed(AObject : TCPlusObject) : Boolean; cdecl; external BePascalLibName name 'BFont_IsFixed';
function BFont_IsFullAndHalfFixed(AObject : TCPlusObject) : boolean; cdecl; external BePascalLibName name 'BFont_IsFullAndHalfFixed'; function BFont_IsFullAndHalfFixed(AObject : TCPlusObject) : Boolean;
function BFont_BoundingBox(AObject : TCPlusObject) : BRect; cdecl; external BePascalLibName name 'BFont_BoundingBox'; cdecl; external BePascalLibName name 'BFont_IsFullAndHalfFixed';
function BFont_BoundingBox(AObject : TCPlusObject) : BRect;
cdecl; external BePascalLibName name 'BFont_BoundingBox';
//function BFont_Blocks(AObject : TCPlusObject) : ; cdecl; external BePascalLibName name 'BFont_Blocks'; //function BFont_Blocks(AObject : TCPlusObject) : ; cdecl; external BePascalLibName name 'BFont_Blocks';
function BFont_FileFormat(AObject : TCPlusObject) :Font_file_format ; cdecl; external BePascalLibName name 'BFont_FileFormat'; function BFont_FileFormat(AObject : TCPlusObject) : font_file_format;
function BFont_CountTuned(AObject : TCPlusObject) : integer; cdecl; external BePascalLibName name 'BFont_CountTuned'; cdecl; external BePascalLibName name 'BFont_FileFormat';
procedure BFont_GetTunedInfo(AObject : TCPlusObject; index : integer; info : tuned_font_info); cdecl; external BePascalLibName name 'BFont_GetTunedInfo'; function BFont_CountTuned(AObject : TCPlusObject) : Longint;
procedure BFont_TruncateString(AObject : TCPlusObject; in_out : TCPlusObject; mode : Cardinal; width : single); cdecl; external BePascalLibName name 'BFont_TruncateString'; cdecl; external BePascalLibName name 'BFont_CountTuned';
procedure BFont_GetTunedInfo(AObject : TCPlusObject; index : Longint;
info : tuned_font_info);
cdecl; external BePascalLibName name 'BFont_GetTunedInfo';
procedure BFont_TruncateString(AObject : TCPlusObject; in_out : TCPlusObject;
mode : Longword; width : Single);
cdecl; external BePascalLibName name 'BFont_TruncateString';
//procedure BFont_GetTruncatedStrings(AObject : TCPlusObject; stringArray : PChar; numStrings : integer; mode : Cardinal; width : single; resultArray : ); cdecl; external BePascalLibName name 'BFont_GetTruncatedStrings'; //procedure BFont_GetTruncatedStrings(AObject : TCPlusObject; stringArray : PChar; numStrings : integer; mode : Cardinal; width : single; resultArray : ); cdecl; external BePascalLibName name 'BFont_GetTruncatedStrings';
//procedure BFont_GetTruncatedStrings(AObject : TCPlusObject; stringArray : PChar; numStrings : integer; mode : Cardinal; width : single; resultArray : PChar); cdecl; external BePascalLibName name 'BFont_GetTruncatedStrings'; //procedure BFont_GetTruncatedStrings(AObject : TCPlusObject; stringArray : PChar; numStrings : integer; mode : Cardinal; width : single; resultArray : PChar); cdecl; external BePascalLibName name 'BFont_GetTruncatedStrings';
function BFont_StringWidth(AObject : TCPlusObject; astring : PChar) : single; cdecl; external BePascalLibName name 'BFont_StringWidth'; function BFont_StringWidth(AObject : TCPlusObject; astring : PChar) : Single;
function BFont_StringWidth(AObject : TCPlusObject; astring : PChar; length : integer) : single; cdecl; external BePascalLibName name 'BFont_StringWidth'; cdecl; external BePascalLibName name 'BFont_StringWidth';
function BFont_StringWidth(AObject : TCPlusObject; astring : PChar;
length : Longint) : Single;
cdecl; external BePascalLibName name 'BFont_StringWidth';
//procedure BFont_GetStringWidths(AObject : TCPlusObject; stringArray : PChar; lengthArray : ; numStrings : integer; widthArray : single); cdecl; external BePascalLibName name 'BFont_GetStringWidths'; //procedure BFont_GetStringWidths(AObject : TCPlusObject; stringArray : PChar; lengthArray : ; numStrings : integer; widthArray : single); cdecl; external BePascalLibName name 'BFont_GetStringWidths';
//procedure BFont_GetEscapements(AObject : TCPlusObject; charArray : ; numChars : integer; escapementArray : single); cdecl; external BePascalLibName name 'BFont_GetEscapements'; //procedure BFont_GetEscapements(AObject : TCPlusObject; charArray : ; numChars : integer; escapementArray : single); cdecl; external BePascalLibName name 'BFont_GetEscapements';
//procedure BFont_GetEscapements(AObject : TCPlusObject; charArray : ; numChars : integer; delta : ; escapementArray : single); cdecl; external BePascalLibName name 'BFont_GetEscapements'; //procedure BFont_GetEscapements(AObject : TCPlusObject; charArray : ; numChars : integer; delta : ; escapementArray : single); cdecl; external BePascalLibName name 'BFont_GetEscapements';
//procedure BFont_GetEscapements(AObject : TCPlusObject; charArray : ; numChars : integer; delta : ; escapementArray : TPoint); cdecl; external BePascalLibName name 'BFont_GetEscapements'; //procedure BFont_GetEscapements(AObject : TCPlusObject; charArray : ; numChars : integer; delta : ; escapementArray : TPoint); cdecl; external BePascalLibName name 'BFont_GetEscapements';
//procedure BFont_GetEscapements(AObject : TCPlusObject; charArray : ; numChars : integer; delta : ; escapementArray : TPoint; offsetArray : TPoint); cdecl; external BePascalLibName name 'BFont_GetEscapements'; //procedure BFont_GetEscapements(AObject : TCPlusObject; charArray : ; numChars : integer; delta : ; escapementArray : TPoint; offsetArray : TPoint); cdecl; external BePascalLibName name 'BFont_GetEscapements';
//procedure BFont_GetEdges(AObject : TCPlusObject; charArray : ; numBytes : integer; edgeArray : ); cdecl; external BePascalLibName name 'BFont_GetEdges'; //procedure BFont_GetEdges(AObject : TCPlusObject; charArray : ; numBytes : integer; edgeArray : ); cdecl; external BePascalLibName name 'BFont_GetEdges';
procedure BFont_GetHeight(AObject : TCPlusObject; height :Font_height ); cdecl; external BePascalLibName name 'BFont_GetHeight'; procedure BFont_GetHeight(AObject : TCPlusObject; height : font_height );
cdecl; external BePascalLibName name 'BFont_GetHeight';
{procedure BFont_GetBoundingBoxesAsGlyphs(AObject : TCPlusObject; charArray : ; numChars : integer; mode : ; boundingBoxArray : BRect); cdecl; external BePascalLibName name 'BFont_GetBoundingBoxesAsGlyphs'; {procedure BFont_GetBoundingBoxesAsGlyphs(AObject : TCPlusObject; charArray : ; numChars : integer; mode : ; boundingBoxArray : BRect); cdecl; external BePascalLibName name 'BFont_GetBoundingBoxesAsGlyphs';
procedure BFont_GetBoundingBoxesAsString(AObject : TCPlusObject; charArray : ; numChars : integer; mode : ; delta : ; boundingBoxArray : BRect); cdecl; external BePascalLibName name 'BFont_GetBoundingBoxesAsString'; procedure BFont_GetBoundingBoxesAsString(AObject : TCPlusObject; charArray : ; numChars : integer; mode : ; delta : ; boundingBoxArray : BRect); cdecl; external BePascalLibName name 'BFont_GetBoundingBoxesAsString';
@@ -221,7 +305,8 @@ function BFont_operator=(AObject : TCPlusObject; font : ) : ; cdecl; external Be
function BFont_operator==(AObject : TCPlusObject; font : ) : boolean; cdecl; external BePascalLibName name 'BFont_operator=='; function BFont_operator==(AObject : TCPlusObject; font : ) : boolean; cdecl; external BePascalLibName name 'BFont_operator==';
function BFont_operator!=(AObject : TCPlusObject; font : ) : boolean; cdecl; external BePascalLibName name 'BFont_operator!='; function BFont_operator!=(AObject : TCPlusObject; font : ) : boolean; cdecl; external BePascalLibName name 'BFont_operator!=';
} }
procedure BFont_PrintToStream(AObject : TCPlusObject); cdecl; external BePascalLibName name 'BFont_PrintToStream'; procedure BFont_PrintToStream(AObject : TCPlusObject);
cdecl; external BePascalLibName name 'BFont_PrintToStream';
{procedure BFont_uint16 fFamilyID(AObject : TCPlusObject); cdecl; external BePascalLibName name 'BFont_uint16 fFamilyID'; {procedure BFont_uint16 fFamilyID(AObject : TCPlusObject); cdecl; external BePascalLibName name 'BFont_uint16 fFamilyID';
procedure BFont_uint16 fStyleID(AObject : TCPlusObject); cdecl; external BePascalLibName name 'BFont_uint16 fStyleID'; procedure BFont_uint16 fStyleID(AObject : TCPlusObject); cdecl; external BePascalLibName name 'BFont_uint16 fStyleID';
procedure BFont_float fSize(AObject : TCPlusObject); cdecl; external BePascalLibName name 'BFont_float fSize'; procedure BFont_float fSize(AObject : TCPlusObject); cdecl; external BePascalLibName name 'BFont_float fSize';
@@ -240,8 +325,40 @@ procedure BFont_GetTruncatedStrings64(AObject : TCPlusObject; stringArray : PCha
procedure BFont__GetEscapements_(AObject : TCPlusObject; charArray : ; numChars : integer; delta : ; mode : ; escapements : single; offsets : single); cdecl; external BePascalLibName name 'BFont__GetEscapements_'; procedure BFont__GetEscapements_(AObject : TCPlusObject; charArray : ; numChars : integer; delta : ; mode : ; escapements : single; offsets : single); cdecl; external BePascalLibName name 'BFont__GetEscapements_';
procedure BFont__GetBoundingBoxes_(AObject : TCPlusObject; charArray : ; numChars : integer; mode : ; string_escapement : boolean; delta : ; boundingBoxArray : BRect); cdecl; external BePascalLibName name 'BFont__GetBoundingBoxes_'; procedure BFont__GetBoundingBoxes_(AObject : TCPlusObject; charArray : ; numChars : integer; mode : ; string_escapement : boolean; delta : ; boundingBoxArray : BRect); cdecl; external BePascalLibName name 'BFont__GetBoundingBoxes_';
} }
implementation
//----- BFont related declarations -------------------------------
var
be_plain_font : BFont; cvar; external;
be_bold_font : BFont; cvar; external;
be_fixed_font : BFont; cvar; external;
function count_font_families : Longint;
cdecl; external 'be' name 'count_font_families__Fv';
function get_font_family(index : Longint; var name : font_family;
var flags : Longword {$ifndef VER1_0}= nil{$endif})
: status_t; cdecl; external 'be' name 'get_font_family__FlPA64_cPUl';
function count_font_styles(name : font_family) : Longint;
cdecl; external 'be' name 'count_font_styles__FPc';
function get_font_style(family : font_family; index : Longint;
var name : font_style; var flags : Longword {$ifndef VER1_0}= nil{$endif})
: status_t; cdecl; external 'be' name 'get_font_style__FPclPA64_cPUl';
function get_font_style(family : font_family; index : Longint;
var name : font_style; var face : Word;
var flags : Longword {$ifndef VER1_0}= nil{$endif})
: status_t; cdecl; external 'be' name 'get_font_style__FPclPA64_cPUsPUl';
function update_font_families(check_only : Boolean) : Boolean;
cdecl; external 'be' name 'update_font_families__Fb';
function get_font_cache_info(id : Longword; var _set : Pointer) : status_t;
cdecl; external 'be' name 'get_font_cache_info__FUlPv';
function set_font_cache_info(id : Longword; var _set : Pointer) : status_t;
cdecl; external 'be' name 'set_font_cache_info__FUlPv';
implementation
constructor BFont.Create; constructor BFont.Create;
begin begin
@@ -262,112 +379,112 @@ begin
inherited; inherited;
end; end;
function BFont.SetFamilyAndStyle(family : Font_family; style :Font_style ) : Status_t; function BFont.SetFamilyAndStyle(family : font_family; style : font_style) : status_t;
begin begin
Result := BFont_SetFamilyAndStyle(CPlusObject, family, style); Result := BFont_SetFamilyAndStyle(CPlusObject, family, style);
end; end;
procedure BFont.SetFamilyAndStyle(code : Cardinal); procedure BFont.SetFamilyAndStyle(code : Longword);
begin begin
BFont_SetFamilyAndStyle(CPlusObject, code); BFont_SetFamilyAndStyle(CPlusObject, code);
end; end;
function BFont.SetFamilyAndFace(family : Font_family; aface : integer) : Status_t; function BFont.SetFamilyAndFace(family : Font_family; aface : Word) : status_t;
begin begin
Result := BFont_SetFamilyAndFace(CPlusObject, family, aface); Result := BFont_SetFamilyAndFace(CPlusObject, family, aface);
end; end;
procedure BFont.SetSize(asize : single); procedure BFont.SetSize(asize : Single);
begin begin
BFont_SetSize(CPlusObject, asize); BFont_SetSize(CPlusObject, asize);
end; end;
procedure BFont.SetShear(ashear : single); procedure BFont.SetShear(ashear : Single);
begin begin
BFont_SetShear(CPlusObject, ashear); BFont_SetShear(CPlusObject, ashear);
end; end;
procedure BFont.SetRotation(arotation : single); procedure BFont.SetRotation(arotation : Single);
begin begin
BFont_SetRotation(CPlusObject, arotation); BFont_SetRotation(CPlusObject, arotation);
end; end;
procedure BFont.SetSpacing(aspacing : integer); procedure BFont.SetSpacing(aspacing : Byte);
begin begin
BFont_SetSpacing(CPlusObject, aspacing); BFont_SetSpacing(CPlusObject, aspacing);
end; end;
procedure BFont.SetEncoding(aencoding : integer); procedure BFont.SetEncoding(aencoding : Byte);
begin begin
BFont_SetEncoding(CPlusObject, aencoding); BFont_SetEncoding(CPlusObject, aencoding);
end; end;
procedure BFont.SetFace(aface : integer); procedure BFont.SetFace(aface : Word);
begin begin
BFont_SetFace(CPlusObject, aface); BFont_SetFace(CPlusObject, aface);
end; end;
procedure BFont.SetFlags(aflags : Cardinal); procedure BFont.SetFlags(aflags : Longword);
begin begin
BFont_SetFlags(CPlusObject, aflags); BFont_SetFlags(CPlusObject, aflags);
end; end;
procedure BFont.GetFamilyAndStyle(family : Font_family; style :Font_style ); procedure BFont.GetFamilyAndStyle(family : font_family; style : font_style);
begin begin
BFont_GetFamilyAndStyle(CPlusObject, family, style); BFont_GetFamilyAndStyle(CPlusObject, family, style);
end; end;
function BFont.FamilyAndStyle : Cardinal; function BFont.FamilyAndStyle : Longword;
begin begin
Result := BFont_FamilyAndStyle(CPlusObject); Result := BFont_FamilyAndStyle(CPlusObject);
end; end;
function BFont.Size : single; function BFont.Size : Single;
begin begin
Result := BFont_Size(CPlusObject); Result := BFont_Size(CPlusObject);
end; end;
function BFont.Shear : single; function BFont.Shear : Single;
begin begin
Result := BFont_Shear(CPlusObject); Result := BFont_Shear(CPlusObject);
end; end;
function BFont.Rotation : single; function BFont.Rotation : Single;
begin begin
Result := BFont_Rotation(CPlusObject); Result := BFont_Rotation(CPlusObject);
end; end;
function BFont.Spacing : integer; function BFont.Spacing : Byte;
begin begin
Result := BFont_Spacing(CPlusObject); Result := BFont_Spacing(CPlusObject);
end; end;
function BFont.Encoding : integer; function BFont.Encoding : Byte;
begin begin
Result := BFont_Encoding(CPlusObject); Result := BFont_Encoding(CPlusObject);
end; end;
function BFont.Face : integer; function BFont.Face : Word;
begin begin
Result := BFont_Face(CPlusObject); Result := BFont_Face(CPlusObject);
end; end;
function BFont.Flags : Cardinal; function BFont.Flags : Longword;
begin begin
Result := BFont_Flags(CPlusObject); Result := BFont_Flags(CPlusObject);
end; end;
function BFont.Direction : Font_direction; function BFont.Direction : font_direction;
begin begin
Result := BFont_Direction(CPlusObject); Result := BFont_Direction(CPlusObject);
end; end;
function BFont.IsFixed : boolean; function BFont.IsFixed : Boolean;
begin begin
Result := BFont_IsFixed(CPlusObject); Result := BFont_IsFixed(CPlusObject);
end; end;
function BFont.IsFullAndHalfFixed : boolean; function BFont.IsFullAndHalfFixed : Boolean;
begin begin
Result := BFont_IsFullAndHalfFixed(CPlusObject); Result := BFont_IsFullAndHalfFixed(CPlusObject);
end; end;
@@ -377,27 +494,29 @@ begin
Result := BFont_BoundingBox(CPlusObject); Result := BFont_BoundingBox(CPlusObject);
end; end;
{function BFont.Blocks : ; {
function BFont.Blocks : ;
begin begin
Result := BFont_Blocks(CPlusObject); Result := BFont_Blocks(CPlusObject);
end; end;
} }
function BFont.FileFormat : Font_file_format;
function BFont.FileFormat : font_file_format;
begin begin
Result := BFont_FileFormat(CPlusObject); Result := BFont_FileFormat(CPlusObject);
end; end;
function BFont.CountTuned : integer; function BFont.CountTuned : Integer;
begin begin
Result := BFont_CountTuned(CPlusObject); Result := BFont_CountTuned(CPlusObject);
end; end;
procedure BFont.GetTunedInfo(index : integer; info : tuned_font_info); procedure BFont.GetTunedInfo(index : Longint; info : tuned_font_info);
begin begin
BFont_GetTunedInfo(CPlusObject, index, info); BFont_GetTunedInfo(CPlusObject, index, info);
end; end;
procedure BFont.TruncateString(in_out : TString; mode : Cardinal; width : single); procedure BFont.TruncateString(in_out : BString; mode : Longword; width : Single);
begin begin
BFont_TruncateString(CPlusObject, in_out.CPlusObject, mode, width); BFont_TruncateString(CPlusObject, in_out.CPlusObject, mode, width);
end; end;
@@ -413,12 +532,12 @@ begin
end; end;
} }
function BFont.StringWidth(astring : PChar) : single; function BFont.StringWidth(astring : PChar) : Single;
begin begin
Result := BFont_StringWidth(CPlusObject, astring); Result := BFont_StringWidth(CPlusObject, astring);
end; end;
function BFont.StringWidth(astring : PChar; length : integer) : single; function BFont.StringWidth(astring : PChar; length : Longint) : Single;
begin begin
Result := BFont_StringWidth(CPlusObject, astring, length); Result := BFont_StringWidth(CPlusObject, astring, length);
end; end;
@@ -453,7 +572,8 @@ begin
BFont_GetEdges(CPlusObject, charArray, numBytes, edgeArray); BFont_GetEdges(CPlusObject, charArray, numBytes, edgeArray);
end; end;
} }
procedure BFont.GetHeight(height :Font_height );
procedure BFont.GetHeight(height : font_height);
begin begin
BFont_GetHeight(CPlusObject, height); BFont_GetHeight(CPlusObject, height);
end; end;
@@ -489,5 +609,4 @@ begin
BFont_PrintToStream(CPlusObject); BFont_PrintToStream(CPlusObject);
end; end;
end.
end.