Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 11 additions & 11 deletions IGDIPlus.pas
Original file line number Diff line number Diff line change
Expand Up @@ -2211,10 +2211,10 @@ function IsCanonicalPixelFormat( APixfmt : TIGPPixelFormat ) : Boolean;
// Shift count and bit mask for A, R, G, B components

function MakeARGBColor( AAlpha : Byte; AColor : TAlphaColor ) : TAlphaColor;
function MakeGrayScaleColor( AAlpha : Byte; AColor : Byte ) : TAlphaColor; overload;
function MakeGrayScaleColor( AGrayScale : Byte ) : TAlphaColor; overload;
function MakeColor( AAlpha : Byte; AColor : TColor ) : TAlphaColor; overload;
function MakeGrayScaleColor( AAlpha : Byte; AColor : Byte ) : TAlphaColor;
function MakeColor( AColor : TColor ) : TAlphaColor; overload;
function MakeColor( AGrayScale : Byte ) : TAlphaColor; overload;
function MakeColor( r, g, b : Byte ) : TAlphaColor; overload;
function MakeColor( a, r, g, b : Byte ) : TAlphaColor; overload;
function GetAlpha( AColor : TAlphaColor ) : Byte;
Expand Down Expand Up @@ -3526,7 +3526,7 @@ TIGPFont = class( TIGPBase, IGPFont )
constructor CreateObject( const AFamily : IGPFontFamily; emSize : Single; const AStyle : TFontStyles = []; AUnit : TIGPUnit = TIGPUnit.Point ); overload;
constructor CreateObject( const AFamilyName : WideString; emSize : Single; const AStyle : TFontStyles = []; AUnit : TIGPUnit = TIGPUnit.Point; AFontCollection : IGPFontCollection = NIL ); overload;
destructor Destroy(); override;

public
function GetLogFontA( const AGraphics : IGPGraphics ) : TLogFontA;
function GetLogFontW( const AGraphics : IGPGraphics ) : TLogFontW;
Expand Down Expand Up @@ -7367,7 +7367,7 @@ class function TIGPMatrixStore.Create( const ATransformable : IGPTransformable )
constructor TIGPStringFormat.CreateObject( const AFormatFlags : TIGPStringFormatFlags = []; ALanguage : LANGID = LANG_NEUTRAL );
begin
FNativeFormat := NIL;
ErrorCheck( GdipCreateStringFormat( PInteger( @AFormatFlags )^, ALanguage, FNativeFormat ));
ErrorCheck( GdipCreateStringFormat( SetToInt( AFormatFlags, SizeOf( AFormatFlags )), ALanguage, FNativeFormat ));
end;

class function TIGPStringFormat.GenericDefault() : IGPStringFormat;
Expand Down Expand Up @@ -7405,7 +7405,7 @@ constructor TIGPStringFormat.CreateObject( AFormat : TIGPStringFormat );

else
gpstf := NIL;

ErrorCheck( GdipCloneStringFormat( gpstf, FNativeFormat ));
end;

Expand All @@ -7424,19 +7424,19 @@ destructor TIGPStringFormat.Destroy();
function TIGPStringFormat.SetFormatFlags( const AFlags : TIGPStringFormatFlags ) : IGPStringFormat;
begin
Result := Self; // Keep alive!
ErrorCheck( GdipSetStringFormatFlags( FNativeFormat, PInteger( @AFlags )^ ));
ErrorCheck( GdipSetStringFormatFlags( FNativeFormat, SetToInt( AFlags, SizeOf( AFlags )) ));
end;

procedure TIGPStringFormat.SetFormatFlagsProp( const AFlags : TIGPStringFormatFlags );
begin
ErrorCheck( GdipSetStringFormatFlags( FNativeFormat, PInteger( @AFlags )^ ));
ErrorCheck( GdipSetStringFormatFlags( FNativeFormat, SetToInt( AFlags, SizeOf( AFlags )) ));
end;

function TIGPStringFormat.GetFormatFlags() : TIGPStringFormatFlags;
begin
var AIntResult : Integer;
ErrorCheck( GdipGetStringFormatFlags( FNativeFormat, AIntResult ));
Result := PIGPStringFormatFlags( @AIntResult )^;
IntToSet( AIntResult, SizeOf( Result ), Result );
end;

function TIGPStringFormat.SetAlignment( AAlign : TIGPStringAlignment ) : IGPStringFormat;
Expand Down Expand Up @@ -7918,7 +7918,7 @@ function TIGPMetafile.GetDownLevelRasterizationLimit : Cardinal;

function TIGPMetafile.EmfToWmfBits( hemf : HENHMETAFILE; cbData16 : Cardinal; pData16 : PBYTE; iMapMode : Integer = MM_ANISOTROPIC; eFlags : TIGPEmfToWmfBits = [] ) : Cardinal;
begin
Result := GdipEmfToWmfBits( hemf, cbData16, pData16, iMapMode, PInteger( @eFlags )^ );
Result := GdipEmfToWmfBits( hemf, cbData16, pData16, iMapMode, SetToInt( eFlags, SizeOf( eFlags )) );
end;

constructor TIGPMetafile.CreateObject();
Expand Down Expand Up @@ -15002,7 +15002,7 @@ constructor TIGPFont.CreateObject( const AFamilyName : WideString; emSize : Sing
ErrorCheck( GdipCreateFont(
nativeFamily,
emSize,
PInteger(@AStyle )^,
SetToInt( AStyle, SizeOf( AStyle )),
Integer( AUnit),
FNativeFont ));

Expand Down Expand Up @@ -17789,7 +17789,7 @@ function ARGBToColor( AColor : TAlphaColor ) : TColor;
Result := RGB( GetRed( AColor ), GetGreen( AColor ), GetBlue( AColor ));
end;

function MakeColor( AGrayScale : Byte ) : TAlphaColor;
function MakeGrayScaleColor( AGrayScale : Byte ) : TAlphaColor;
begin
Result := MakeColor( 255, AGrayScale, AGrayScale, AGrayScale );
end;
Expand Down