Lancelotbronner / swift-raylib

13 stars 0 forks source link

Remove deprecated GenImageGradientV & GenImageGradientH #3

Closed Its-Kenta closed 1 year ago

Its-Kenta commented 1 year ago

Functions GenImageGradientV & GenImageGradientH are deprecated from Raylib 4.5 (Which I believe this binding aims to support?) as it provides compilation errors.

swift-raylib/Sources/Raylib/Textures/Image/Image Generation.swift:19:3: error: cannot find 'GenImageGradientV' in scope
                GenImageGradientV(width.toInt32, height.toInt32, top.toRaylib, bottom.toRaylib).toSwift
                ^~~~~~~~~~~~~~~~~
swift-raylib/Sources/Raylib/Textures/Image/Image Generation.swift:23:3: error: cannot find 'GenImageGradientH' in scope
                GenImageGradientH(width.toInt32, height.toInt32, left.toRaylib, right.toRaylib).toSwift
    @inlinable public static func gradientV(size width: Int, by height: Int, from top: Color, to bottom: Color) -> Image {
        GenImageGradientV(width.toInt32, height.toInt32, top.toRaylib, bottom.toRaylib).toSwift
    }

    @inlinable public static func gradientH(size width: Int, by height: Int, from left: Color, to right: Color) -> Image {
        GenImageGradientH(width.toInt32, height.toInt32, left.toRaylib, right.toRaylib).toSwift
    }
Lancelotbronner commented 1 year ago

I'm not getting any errors so I must have an older version of the library somewhere, I'll check my system and ensure compatibility with the latest tagged version. I'd like to setup a branch for stable and one which stays up-to-date with main.

Its-Kenta commented 1 year ago

My bad. It seems to be the case in 4.6-dev. It looks like I managed to mess up my install.

No problem here.