Skip to content

Commit

Permalink
Explicit delegate types (#5954)
Browse files Browse the repository at this point in the history
This is done to please AOT compilers.

Removed not used MilGlyphCache_SetCreateGlyphBitmapsCallback

Technically NativeAOT would handle that after dotnet/runtime#63219 but want to cleanup just in case

overall I think using untyped delegates in C# is wrong
  • Loading branch information
kant2002 authored May 9, 2022
1 parent 48165a1 commit 5c57653
Showing 1 changed file with 4 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ internal unsafe static extern int MilUtility_PathGeometryCombine(
UInt32 nSize2,
double rTolerance,
bool fRelative,
Delegate addFigureCallback,
PathGeometry.AddFigureToListDelegate addFigureCallback,
GeometryCombineMode combineMode,
out FillRule resultFillRule);

Expand All @@ -126,7 +126,7 @@ internal unsafe static extern int MilUtility_PathGeometryWiden(
UInt32 nSize,
double rTolerance,
bool fRelative,
Delegate addFigureCallback,
PathGeometry.AddFigureToListDelegate addFigureCallback,
out FillRule widenedFillRule);

[DllImport(DllImport.MilCore)]
Expand All @@ -137,7 +137,7 @@ internal unsafe static extern int MilUtility_PathGeometryOutline(
UInt32 nSize,
double rTolerance,
bool fRelative,
Delegate addFigureCallback,
PathGeometry.AddFigureToListDelegate addFigureCallback,
out FillRule outlinedFillRule);

[DllImport(DllImport.MilCore)]
Expand All @@ -148,14 +148,9 @@ internal unsafe static extern int MilUtility_PathGeometryFlatten(
UInt32 nSize,
double rTolerance,
bool fRelative,
Delegate addFigureCallback,
PathGeometry.AddFigureToListDelegate addFigureCallback,
out FillRule resultFillRule);

[DllImport(DllImport.MilCore)]
internal unsafe static extern int /* HRESULT */ MilGlyphCache_SetCreateGlyphBitmapsCallback(
MulticastDelegate del
);

[DllImport(DllImport.MilCore)]
internal unsafe static extern int MilGlyphCache_BeginCommandAtRenderTime(
IntPtr pMilSlaveGlyphCacheTarget,
Expand Down

0 comments on commit 5c57653

Please sign in to comment.