Skip to content

Commit a754910

Browse files
committed
Update to Raylib-5.5
1 parent ab329d8 commit a754910

File tree

7 files changed

+26
-11
lines changed

7 files changed

+26
-11
lines changed

.github/workflows/build.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ on:
99
branches: [ "main" ]
1010

1111
env:
12-
raylib_version: 'a3ef381b3e55cd2a7cf2a521f136330a295c5a9d'
12+
raylib_version: 'a8240722c61d216d96c3f2cab27426ee7b7a3919'
1313

1414
jobs:
1515

src/Raylib-CSharp.Samples/CMake.props

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<Project>
22
<PropertyGroup>
3-
<RlVersion>a3ef381b3e55cd2a7cf2a521f136330a295c5a9d</RlVersion>
3+
<RlVersion>a8240722c61d216d96c3f2cab27426ee7b7a3919</RlVersion>
44
</PropertyGroup>
55

66
<PropertyGroup Condition="$([MSBuild]::IsOSPlatform('Windows'))">

src/Raylib-CSharp.Test/CMake.props

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<Project>
22
<PropertyGroup>
3-
<RlVersion>a3ef381b3e55cd2a7cf2a521f136330a295c5a9d</RlVersion>
3+
<RlVersion>a8240722c61d216d96c3f2cab27426ee7b7a3919</RlVersion>
44
</PropertyGroup>
55

66
<PropertyGroup Condition="$([MSBuild]::IsOSPlatform('Windows'))">

src/Raylib-CSharp/Apis/RaylibApi.cs

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4013,6 +4013,16 @@ internal static partial class RaylibApi {
40134013
[UnmanagedCallConv(CallConvs = [typeof(CallConvCdecl)])]
40144014
internal static partial Image ImageTextEx(Font font, string text, float fontSize, float spacing, Color tint);
40154015

4016+
/// <summary>
4017+
/// Create an image from a selected channel of another image (GRAYSCALE).
4018+
/// </summary>
4019+
/// <param name="image">The input Image.</param>
4020+
/// <param name="selectedChannel">The index of the channel to extract (0 for red, 1 for green, 2 for blue, 3 for alpha).</param>
4021+
/// <returns>The Image containing only the selected channel.</returns>
4022+
[LibraryImport(Raylib.Name)]
4023+
[UnmanagedCallConv(CallConvs = [typeof(CallConvCdecl)])]
4024+
internal static partial Image ImageFromChannel(Image image, int selectedChannel);
4025+
40164026
/// <summary>
40174027
/// Unload color data loaded with LoadImageColors().
40184028
/// </summary>

src/Raylib-CSharp/Images/Image.cs

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -125,6 +125,11 @@ public static Image GenText(int width, int height, string text) {
125125
return RaylibApi.GenImageText(width, height, text);
126126
}
127127

128+
/// <inheritdoc cref="RaylibApi.ImageFromImage" />
129+
public static Image FromImage(Image image, Rectangle rec) {
130+
return RaylibApi.ImageFromImage(image, rec);
131+
}
132+
128133
/// <inheritdoc cref="RaylibApi.ImageText" />
129134
public static Image FromText(string text, int fontSize, Color color) {
130135
return RaylibApi.ImageText(text, fontSize, color);
@@ -135,6 +140,11 @@ public static Image FromTextEx(Font font, string text, float fontSize, float spa
135140
return RaylibApi.ImageTextEx(font, text, fontSize, spacing, tint);
136141
}
137142

143+
/// <inheritdoc cref="RaylibApi.ImageFromChannel" />
144+
public static Image FromChannel(Image image, int selectedChannel) {
145+
return RaylibApi.ImageFromChannel(image, selectedChannel);
146+
}
147+
138148
/// <inheritdoc cref="RaylibApi.UnloadImageColors" />
139149
public static unsafe void UnloadColors(ReadOnlySpan<Color> colors) {
140150
fixed (Color* colorPtr = colors) {
@@ -179,11 +189,6 @@ public Image Copy() {
179189
return RaylibApi.ImageCopy(this);
180190
}
181191

182-
/// <inheritdoc cref="RaylibApi.ImageFromImage" />
183-
public Image FromImage(Rectangle rec) {
184-
return RaylibApi.ImageFromImage(this, rec);
185-
}
186-
187192
/// <inheritdoc cref="RaylibApi.ImageFormat" />
188193
public void FromFormat(PixelFormat newFormat) {
189194
RaylibApi.ImageFormat(ref this, newFormat);

src/Raylib-CSharp/Raylib-CSharp.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
<PropertyGroup>
1414
<Title>Raylib-CSharp</Title>
1515
<Authors>MrScautHD</Authors>
16-
<Version>4.1.4</Version>
16+
<Version>4.1.6</Version>
1717
<PackageRequireLicenseAcceptance>true</PackageRequireLicenseAcceptance>
1818
<GenerateDocumentationFile>true</GenerateDocumentationFile>
1919
<NoWarn>$(NoWarn);1591</NoWarn>

src/Raylib-CSharp/Raylib.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@ public static class Raylib {
1010

1111
public const string Name = "raylib";
1212

13-
public static readonly Version Version = new(4, 1, 4);
14-
public static readonly Version RlVersion = new(5, 1, 0);
13+
public static readonly Version Version = new(4, 1, 6);
14+
public static readonly Version RlVersion = new(5, 5, 0);
1515

1616
/// <inheritdoc cref="RaylibApi.TakeScreenshot" />
1717
public static void TakeScreenshot(string path) {

0 commit comments

Comments
 (0)