Skip to content

Add missing Bgra32 constructors - #3248

Merged
JimBobSquarePants merged 1 commit into
release/4.1.xfrom
fix/bgra32-packed-constructor-v4
Oct 21, 2026
Merged

JimBobSquarePants merged 1 commit into
release/4.1.xfrom
fix/bgra32-packed-constructor-v4

Conversation

@JimBobSquarePants

Copy link
Copy Markdown
Member

Prerequisites

  • I have written a descriptive pull-request title
  • I have verified that there are no overlapping pull-requests open
  • I have verified that I am following the existing coding patterns and practice as demonstrated in the repository. These follow strict Stylecop rules 👮.
  • I have provided test coverage for my change (where applicable)

Description

Adds the missing Bgra32 constructors to match Rgba32, Argb32, and Abgr32:

  • A packed uint value.
  • Normalized float RGB components, with optional alpha.
  • A Vector3, with opaque alpha.
  • A Vector4.

The packed constructor copies the stored BGRA bits without color conversion. Its documentation explains memory order and the little-endian 0xAARRGGBB integer layout. The float and vector constructors reuse the existing packer.

Extends Bgra32Tests to check packed bits, channel order, normalized component conversion, bounds, and implicit opaque alpha.

Release validation on .NET 8: all 25 Bgra32Tests pass.

Addresses the constructor gap identified in discussion #3184.

@JimBobSquarePants
JimBobSquarePants merged commit c6ce6bb into release/4.1.x Oct 21, 2026
11 checks passed
@JimBobSquarePants
JimBobSquarePants deleted the fix/bgra32-packed-constructor-v4 branch October 21, 2026 08:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant