Fix CA1802

This commit is contained in:
RoosterDragon
2023-03-12 15:46:31 +00:00
committed by abcdefg30
parent 0958197df2
commit a50e72f68d
8 changed files with 17 additions and 13 deletions

View File

@@ -24,15 +24,15 @@ namespace OpenRA.Platforms.Default
internal const uint OK = 0x00;
internal const int FT_LOAD_RENDER = 0x04;
internal const int MetricsWidthOffset = 0; // offsetof(FT_Glyph_Metrics, width)
internal const int BitmapPitchOffset = 8; // offsetof(FT_Bitmap, pitch)
internal static readonly int FaceRecGlyphOffset = IntPtr.Size == 8 ? 152 : 84; // offsetof(FT_FaceRec, glyph)
internal static readonly int GlyphSlotMetricsOffset = IntPtr.Size == 8 ? 48 : 24; // offsetof(FT_GlyphSlotRec, metrics)
internal static readonly int GlyphSlotBitmapOffset = IntPtr.Size == 8 ? 152 : 76; // offsetof(FT_GlyphSlotRec, bitmap)
internal static readonly int GlyphSlotBitmapLeftOffset = IntPtr.Size == 8 ? 192 : 100; // offsetof(FT_GlyphSlotRec, bitmap_left)
internal static readonly int GlyphSlotBitmapTopOffset = IntPtr.Size == 8 ? 196 : 104; // offsetof(FT_GlyphSlotRec, bitmap_top)
internal static readonly int MetricsWidthOffset = 0; // offsetof(FT_Glyph_Metrics, width)
internal static readonly int MetricsHeightOffset = IntPtr.Size == 8 ? 8 : 4; // offsetof(FT_Glyph_Metrics, height)
internal static readonly int MetricsAdvanceOffset = IntPtr.Size == 8 ? 32 : 16; // offsetof(FT_Glyph_Metrics, horiAdvance)
internal static readonly int BitmapPitchOffset = 8; // offsetof(FT_Bitmap, pitch)
internal static readonly int BitmapBufferOffset = IntPtr.Size == 8 ? 16 : 12; // offsetof(FT_Bitmap, buffer)
[DllImport("freetype6", CallingConvention = CallingConvention.Cdecl)]