/* Copyright (C) 2017-2020, Dirk Krause SPDX-License-Identifier: BSD-3-Clause */ /* WARNING: This file was generated by the dkct program (see http://dktools.sourceforge.net/ for details). Changes you make here will be lost if dkct is run again! You should modify the original source and run dkct on it. Original source: dk4pxbit.ctr */ #ifndef DK4PXBIT_H_INCLUDED /** Avoid multiple inclusions. */ #define DK4PXBIT_H_INCLUDED 1 #line 8 "dk4pxbit.ctr" /** @file dk4pxbit.h Bit constants for pixels. */ #ifndef DK4CONF_H_INCLUDED #if DK4_BUILDING_DKTOOLS4 #include "dk4conf.h" #else #include #endif #endif #ifndef DK4TYPES_H_INCLUDED #if DK4_BUILDING_DKTOOLS4 #include "dk4types.h" #else #include #endif #endif #ifndef DK4PX_H_INCLUDED #if DK4_BUILDING_DKTOOLS4 #include "dk4px.h" #else #include #endif #endif #ifdef __cplusplus extern "C" { #endif /** Retrieve bit for a given bit number. Least significant bit is 0, most significant is 15. @param bitno Bit number to retrieve bit value for. @return Positive bit value on success, 0 on error (out of range). */ dk4_px_t dk4pxbit_get_bit(size_t bitno); /** Retrieve maximum value for a given bit number. Least significant bit is 0, most significant is 15. @param bitno Bit number to retrieve bit value for. @return Positive maximum value on success, 0 on error (out of range). */ dk4_px_t dk4pxbit_get_max(size_t bitno); /** Find bit number to represent a maximum value. @param maxval Maximum value for a pixel component. @return Required bit number. */ size_t dk4pxbit_get_bitno(dk4_px_t maxval); #ifdef __cplusplus } #endif /* vim: set ai sw=4 ts=4 : */ #endif