Skip to content

Commit

Permalink
Regenerate methods/enums for libvips 8.16
Browse files Browse the repository at this point in the history
  • Loading branch information
kleisauke committed Oct 14, 2024
1 parent 089cf69 commit 92572de
Show file tree
Hide file tree
Showing 6 changed files with 256 additions and 86 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
- Add support for a single shared libvips binary on Windows ([#211](https://github.com/kleisauke/net-vips/issues/211)).
- Add `ReadOnlySpan<T>` / `ReadOnlyMemory<T>` overloads ([#225](https://github.com/kleisauke/net-vips/issues/225)).

### Changed
- Update methods/enums for libvips 8.16.

### Removed
- Drop support for .NET Standard 2.0 and Mono. NetVips now targets .NET 6 (`net6.0`) and .NET Framework 4.5.2 (`net452`) moving forward.
See https://devblogs.microsoft.com/dotnet/the-future-of-net-standard/ for more information.
Expand Down
5 changes: 5 additions & 0 deletions samples/NetVips.Samples/Samples/GenerateImageClass.cs
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,11 @@ public GenerateImageClass()
_gTypeToCSharpDict.Add(NetVips.TypeFromName("VipsForeignHeifEncoder"), "Enums.ForeignHeifEncoder");
}

if (NetVips.AtLeastLibvips(8, 16))
{
_gTypeToCSharpDict.Add(NetVips.TypeFromName("VipsSdfShape"), "Enums.SdfShape");
}

// Flags
_gTypeToCSharpDict.Add(NetVips.TypeFromName("VipsForeignFlags"), "Enums.ForeignFlags");
_gTypeToCSharpDict.Add(NetVips.TypeFromName("VipsForeignPngFilter"), "Enums.ForeignPngFilter");
Expand Down
18 changes: 18 additions & 0 deletions src/NetVips/Enums.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1084,6 +1084,24 @@ public enum RegionShrink
Nearest = 5 // "nearest"
}

/// <summary>
/// The SDF to generate.
/// </summary>
/// <remarks>
/// See for example <see cref="Image.Sdf"/>.
/// </remarks>
public enum SdfShape
{
/// <summary>A circle at @a, radius @r.</summary>
Circle = 0, // "circle"
/// <summary>A box from @a to @b.</summary>
Box = 1, // "box"
/// <summary>A box with rounded @corners from @a to @b.</summary>
RoundedBox = 2, // "rounded-box"
/// <summary> A line from @a to @b.</summary>
Line = 3 // "line"
}

/// <summary>
/// Controls whether an operation should upsize, downsize, both up and downsize, or force a size.
/// </summary>
Expand Down
Loading

0 comments on commit 92572de

Please sign in to comment.