odin-blend2d

Odin bindings to Blend2D
Log | Files | Refs | README | LICENSE

rgba.odin (886B)


      1 // This file is part of Blend2D project <https://blend2d.com>
      2 //
      3 // See blend2d.h or LICENSE.md for license and copyright information
      4 // SPDX-License-Identifier: Zlib
      5 package blend2d
      6 
      7 when ODIN_OS == .Windows {
      8 	foreign import lib "blend2d.lib"
      9 } else when ODIN_OS == .Darwin {
     10 	foreign import lib "libblend2d.a"
     11 } else when ODIN_OS == .Linux {
     12 	foreign import lib "libblend2d.a"
     13 }
     14 
     15 
     16 //! 32-bit RGBA color (8-bit per component) stored as `0xAARRGGBB`.
     17 Rgba32 :: struct {
     18 	//! Packed 32-bit RGBA value.
     19 	value: u32,
     20 }
     21 
     22 //! 64-bit RGBA color (16-bit per component) stored as `0xAAAARRRRGGGGBBBB`.
     23 Rgba64 :: struct {
     24 	//! Packed 64-bit RGBA value.
     25 	value: u64,
     26 }
     27 
     28 //! 128-bit RGBA color stored as 4 32-bit floating point values in [RGBA] order.
     29 Rgba :: struct {
     30 	//! Red component.
     31 	r: f32,
     32 
     33 	//! Green component.
     34 	g: f32,
     35 
     36 	//! Blur component.
     37 	b: f32,
     38 
     39 	//! Alpha component.
     40 	a: f32,
     41 }
     42