procedure FlipFont(Font: TFont; Degree: Integer); const CardinalBool: array[Boolean] of Cardinal = (0, 1); PitchVal: array[TFontPitch] of Cardinal = (DEFAULT_PITCH, VARIABLE_PITCH, FIXED_PITCH); var Weight: Integer; Italic, Underline, StrikeOut: Cardinal; begin with Font do begin if fsBold in Style then Weight := FW_BOLD else Weight := FW_NORMAL; Italic := CardinalBool[fsItalic in Style]; Underline := CardinalBool[fsUnderline in Style]; StrikeOut := CardinalBool[fsStrikeOut in Style]; Handle:=CreateFont(Height, 0, Degree*10, Degree*10, Weight, Italic, Underline, StrikeOut, Charset, Out_TT_Precis, Clip_Default_Precis, Default_Quality, PitchVal[Pitch], PChar(Name)); end; end; |