added QDStyleToFontStyle function

git-svn-id: trunk@20469 -
This commit is contained in:
dmitry 2009-06-06 11:00:42 +00:00
parent 4454110a0b
commit 06b4501395

View File

@ -73,6 +73,7 @@ function FindCarbonFontID(const FontName: String): ATSUFontID;
function CarbonFontIDToFontName(ID: ATSUFontID): String;
function FontStyleToQDStyle(const AStyle: TFontStyles): MacOSAll.Style;
function QDStyleToFontStyle(QDStyle: Integer): TFontStyles;
procedure FillStandardDescription(out Desc: TRawImageDescription);
@ -540,6 +541,19 @@ begin
// fsStrikeOut has no counterpart?
end;
{------------------------------------------------------------------------------
Name: QDStyleToFontStyle
Params: QDStyle - Quick Draw font style
Returns: LCL Font Style
------------------------------------------------------------------------------}
function QDStyleToFontStyle(QDStyle: Integer): TFontStyles;
begin
Result := [];
if QDStyle and MacOSAll.bold > 0 then Include(Result, fsBold);
if QDStyle and MacOSAll.italic > 0 then Include(Result, fsItalic);
if QDStyle and MacOSAll.underline > 0 then Include(Result, fsUnderline);
end;
{------------------------------------------------------------------------------
Name: FillStandardDescription
Params: Desc - Raw image description