Graphics

详细描述

Namespaces

  maxon::IMAGEPROPERTIES
  maxon::ImageBaseClasses
  maxon::ImageTextureClasses
  maxon::ImageClasses
  maxon::ImageLayerClasses
  maxon::ImagePixelBlends
  maxon::ImagePixelBlendsInternal
  maxon::PixelFormats

Classes

struct   ImageHierarchy
class   ImageBaseInterface
class   ImageTextureInterface
class   ImageInterface
class   ImageLayerInterface
class   ImageFunctionsInterface
class   ImageChannelTypeInterface
class   ImageChannelInterface
struct   BlendPixelHandlerStruct
class   ImagePixelBlendInterface
struct   IsZeroInitialized< PixelFormatGroup >
struct   PixelConstBuffer
struct   PixelMutableBuffer
struct   ImageBufferTemplate< BASECLASS >
struct   ConvertFuncChannelHelper
class   PixelFormatInterface
class   PixelFormatsInterface
class   PixelFormatDynamicInterface
class   PixelFormatGroupInterface
class   PixelFormatIterator
class   PixelFormatIndexedColorInterface

Macros

#define  MAXON_REGISTER_PIXELFORMAT (group, name, className)
#define  MAXON_REGISTER_PIXELFORMAT_X (group, name, className)
#define  MAXON_REGISTER_PIXELFORMAT_TEMPLATE (group, name, className)
#define  MAXON_REGISTER_PIXELFORMAT_TEMPLATE_X (group, name, className)
#define  REGISTER_PIXELFORMATGROUP (name)

Typedefs

using  Pix = UChar
using  Pix8u = UChar
using  Pix8s = Char
using  Pix16u = UInt16
using  Pix16s = Int16
using  Pix32u = UInt32
using  Pix32s = Int32
using  Pix32f = Float32
using  Pix64f = Float64
using  Pix16f = HalfFloat < Pix32f >
using  BlendPixelHandlerRef = StrongRef < BlendPixelHandlerStruct >
using  ChannelOffsets = Block < const BITS >
using  ImageConstBuffer = ImageBufferTemplate < PixelConstBuffer >
using  ImageMutableBuffer = ImageBufferTemplate < PixelMutableBuffer >
using  CONVERTPIXELFUNC = Delegate < Result < void >(const PixelMutableBuffer &dst, Int count, const PixelConstBuffer & src , GETPIXELFLAGS flags)>
using  CONVERTPIXELFUNCSTATIC = Result < void >(*)(const PixelMutableBuffer &dst, Int count, const PixelConstBuffer & src , GETPIXELFLAGS flags, const ChannelOffsets &dstChannelOffset, const ChannelOffsets &srcChannelOffset)
using  ConvertFuncChannelHelperRef = StrongRef < ConvertFuncChannelHelper >

Enumerations

enum   IMAGEHIERARCHY {
   TEXTURE ,
   IMAGE ,
   ALPHA ,
   LAYER ,
   MASK ,
   DEEPIMAGEDATA ,
   MAX_ELEMENTS
}
enum   BLENDPIXELFLAGS { NONE }
enum   CONVERTPIXELFLAGS {
   NONE ,
   FORCECOLORPROFILECONVERSION
}
enum   GETPIXELHANDLERFLAGS {
   NONE ,
   FORCECOLORPROFILECONVERSION ,
   DEEPIMAGE ,
   DONTAPPLYMASK
}
enum   GETPIXELFLAGS {
   NONE ,
   DEEPIMAGE
}
enum   SETPIXELHANDLERFLAGS {
   NONE ,
   FORCECOLORPROFILECONVERSION ,
   DEEPIMAGE
}
enum   SETPIXELFLAGS {
   NONE ,
   DEEPIMAGE
}

函数

enum maxon::IMAGEHIERARCHY   MAXON_ENUM_LIST ( IMAGEHIERARCHY )
const Class < ImagePixelStorage > &  GetNormalPixelStorageClass ()
  MAXON_REGISTRY ( Class < ImageBaseRef >, ImageBaseClasses, "net.maxon.image.registry.imagebaseclasses")
  MAXON_REGISTRY ( Class < ImageTextureRef >, ImageTextureClasses, "net.maxon.image.registry.imagetextureclasses")
  MAXON_REGISTRY ( Class < ImageRef >, ImageClasses, "net.maxon.image.registry.imageclasses")
  MAXON_REGISTRY ( Class < ImageLayerRef >, ImageLayerClasses, "net.maxon.image.registry.imagelayerclasses")
ImageRef  GetImageOf (const ImageBaseRef &bmp)
ImageLayerRef  GetFirstAlphaOf (const ImageBaseRef &bmp)
  MAXON_DATATYPE ( Pix16f , "net.maxon.image.pix16f")
enum maxon::BLENDPIXELFLAGS   MAXON_ENUM_FLAGS ( BLENDPIXELFLAGS )
  MAXON_DATATYPE ( BlendPixelHandlerRef , "net.maxon.datatype.blendpixelhandlerref")
  MAXON_REGISTRY (ImagePixelBlend, ImagePixelBlends, "net.maxon.render.registry.blendmodeclasses")
enum maxon::CONVERTPIXELFLAGS   MAXON_ENUM_FLAGS ( CONVERTPIXELFLAGS )
enum maxon::GETPIXELHANDLERFLAGS   MAXON_ENUM_FLAGS ( GETPIXELHANDLERFLAGS )
enum maxon::GETPIXELFLAGS   MAXON_ENUM_FLAGS ( GETPIXELFLAGS )
enum maxon::SETPIXELHANDLERFLAGS   MAXON_ENUM_FLAGS ( SETPIXELHANDLERFLAGS )
enum maxon::SETPIXELFLAGS   MAXON_ENUM_FLAGS ( SETPIXELFLAGS )
Result < CONVERTPIXELFUNC LambdaWrapper ( CONVERTPIXELFUNCSTATIC func, const ChannelOffsets &dstChannelOffsets, const ChannelOffsets &srcChannelOffsets)
  MAXON_DECLARATION ( Class < PixelFormat >, PixelFormatBaseClass, "net.maxon.image.class.pixelformatbase")
Result < PixelFormat >  JoinPixelFormats (const PixelFormat &format1, const PixelFormat &format2)
  MAXON_REGISTRY (PixelFormatGroup, PixelFormats, "net.maxon.image.registry.pixelformats")
MAXON_ATTRIBUTE_FORCE_INLINE PixelFormat  GetNativeFloatColorAlphaFormat ()
MAXON_ATTRIBUTE_FORCE_INLINE PixelFormat  GetNativeFloatColorFormat ()
template<typename PIXELDEPTH >
ImageChannel  GetChannel () const
static MAXON_FUNCTION Result < PixelFormat >  FindOrCreatePixelFormat (const DataType &pixelType, const Block < const ImageChannelType > &imageChannelTypes)
template<typename PIXELTYPE >
Result < PixelFormat >  FindOrCreatePixelFormat (const Block < const ImageChannelType > &imageChannelTypes)
template<typename PIXELTYPE , typename... CHANNELS>
Result < PixelFormat >  FindOrCreatePixelFormat ()

Macro Definition Documentation

◆  MAXON_REGISTER_PIXELFORMAT

#define MAXON_REGISTER_PIXELFORMAT (   group,
  name,
  className 
)

Use this macro to define a new pixel format, e.g.: MAXON_REGISTER_PIXELFORMAT("rgb8i", PixelFormat::RGB::U8);

◆  MAXON_REGISTER_PIXELFORMAT_X

#define MAXON_REGISTER_PIXELFORMAT_X (   group,
  name,
  className 
)

◆  MAXON_REGISTER_PIXELFORMAT_TEMPLATE

#define MAXON_REGISTER_PIXELFORMAT_TEMPLATE (   group,
  name,
  className 
)

◆  MAXON_REGISTER_PIXELFORMAT_TEMPLATE_X

#define MAXON_REGISTER_PIXELFORMAT_TEMPLATE_X (   group,
  name,
  className 
)

◆  REGISTER_PIXELFORMATGROUP

#define REGISTER_PIXELFORMATGROUP (   name )

This macro allows to register a new pixel format group with a single line:

REGISTER_PIXELFORMATGROUP (MyGroup);

Typedef Documentation

◆  Pix

using Pix = UChar

unspecified pixel format depth.

◆  Pix8u

using Pix8u = UChar

pixel format with 8 bit unsigned integer values (0..255).

◆  Pix8s

using Pix8s = Char

pixel format with 8 bit signed integer values (-128..127).

◆  Pix16u

using Pix16u = UInt16

pixel format with 16 bit unsigned integer values (0..65535).

◆  Pix16s

using Pix16s = Int16

pixel format with 16 bit signed integer values (-32768..32767).

◆  Pix32u

using Pix32u = UInt32

pixel format with 32 bit unsigned integer values (0..0xFFFFFFFF).

◆  Pix32s

using Pix32s = Int32

pixel format with 32 bit signed integer values (-0x7FFFFFFF..0x7FFFFFFF).

◆  Pix32f

using Pix32f = Float32

pixel format with 32 bit floating point values.

◆  Pix64f

using Pix64f = Float64

pixel format with 64 bit floating point values.

◆  Pix16f

using Pix16f = HalfFloat < Pix32f >

pixel format with 16 bit floating point values (half float).

◆  BlendPixelHandlerRef

using BlendPixelHandlerRef = StrongRef < BlendPixelHandlerStruct >

◆  ChannelOffsets

using ChannelOffsets = Block <const BITS >

ChannelOffsets describe the offset of each channel of a pixel format. There is always one channel more than the channel count. This last value contains usually the total size.

◆  ImageConstBuffer

using ImageConstBuffer = ImageBufferTemplate < PixelConstBuffer >

◆  ImageMutableBuffer

using ImageMutableBuffer = ImageBufferTemplate < PixelMutableBuffer >

◆  CONVERTPIXELFUNC

using CONVERTPIXELFUNC = Delegate < Result <void>(const PixelMutableBuffer & dst, Int count, const PixelConstBuffer & src , GETPIXELFLAGS flags)>

◆  CONVERTPIXELFUNCSTATIC

using CONVERTPIXELFUNCSTATIC = Result <void>(*)(const PixelMutableBuffer & dst, Int count, const PixelConstBuffer & src , GETPIXELFLAGS flags, const ChannelOffsets & dstChannelOffset, const ChannelOffsets & srcChannelOffset)

◆  ConvertFuncChannelHelperRef

using ConvertFuncChannelHelperRef = StrongRef < ConvertFuncChannelHelper >

Enumeration Type Documentation

◆  IMAGEHIERARCHY

enum IMAGEHIERARCHY
strong

used by ImageBaseInterface to add layers/alphas/images to the right sub tree in the hierarchy.

Enumerator
TEXTURE 

Root of everything. Must not be used with AddChildren.

IMAGE 

Adds a subImage to a texture. Images are only allowed under Textures.

ALPHA 

Adds an alpha to a image. Alphas are allowed to insert under images.

LAYER 

Adds an image layer to a image. Layers are only allowed under Images or other layers.

MASK 

Adds a layer mask to a layer. Layer masks are allowed to insert under layers (layer mask).

DEEPIMAGEDATA 

Adds deep image data to an image. Allowed to insert under images.

MAX_ELEMENTS 

◆  BLENDPIXELFLAGS

enum BLENDPIXELFLAGS
strong

Flags to control the BlendPixel functions.

Enumerator
NONE 

no options set.

◆  CONVERTPIXELFLAGS

enum CONVERTPIXELFLAGS
strong

Flags to control the GetPixel functions.

Enumerator
NONE 

no options set.

FORCECOLORPROFILECONVERSION 

if set it forces color profile conversion even if the color space are identical, otherwise the conversion will be performed only if the color spaces are different.

◆  GETPIXELHANDLERFLAGS

enum GETPIXELHANDLERFLAGS
strong

Flags to control the GetPixelHandler functions.

Enumerator
NONE 

no options set.

FORCECOLORPROFILECONVERSION 

if set it forces color profile conversion even if the color space are identical, otherwise the conversion will be performed only if the color spaces are different.

DEEPIMAGE 

request a deep image pixel handler.

DONTAPPLYMASK 

do not apply the alpha layer to the image data.

◆  GETPIXELFLAGS

enum GETPIXELFLAGS
strong

Flags to control the GetPixel functions.

Enumerator
NONE 

no options set.

DEEPIMAGE 

provided a DeepImageConst/MutableBuffer structure.

◆  SETPIXELHANDLERFLAGS

enum SETPIXELHANDLERFLAGS
strong

Flags to control the SetPixelHandler functions.

Enumerator
NONE 

No options set.

FORCECOLORPROFILECONVERSION 

if set it forces color profile conversion even if the color space are identical, otherwise the conversion will be performed only if the color spaces are different.

DEEPIMAGE 

request a deep image pixel handler.

◆  SETPIXELFLAGS

enum SETPIXELFLAGS
strong

Flags to control the SetPixel functions.

Enumerator
NONE 

No options set.

DEEPIMAGE 

provided a DeepImagePixelConst/MutableBuffer.

Function Documentation

◆  MAXON_ENUM_LIST()

enum maxon::IMAGEHIERARCHY maxon::MAXON_ENUM_LIST ( IMAGEHIERARCHY   )

◆  GetNormalPixelStorageClass()

const Class <ImagePixelStorage>& maxon::GetNormalPixelStorageClass ( )

GetNormalPixelStorageClass returns ImagePixelStorageClasses::Normal() without including gfx_pixelstorage.h

返回
Class<ImagePixelStorage> on success.

◆  MAXON_REGISTRY() [1/6]

maxon::MAXON_REGISTRY ( Class < ImageBaseRef >  ,
ImageBaseClasses  ,
"net.maxon.image.registry.imagebaseclasses"   
)

◆  MAXON_REGISTRY() [2/6]

maxon::MAXON_REGISTRY ( Class < ImageTextureRef >  ,
ImageTextureClasses  ,
"net.maxon.image.registry.imagetextureclasses"   
)

◆  MAXON_REGISTRY() [3/6]

maxon::MAXON_REGISTRY ( Class < ImageRef >  ,
ImageClasses  ,
"net.maxon.image.registry.imageclasses"   
)

◆  MAXON_REGISTRY() [4/6]

maxon::MAXON_REGISTRY ( Class < ImageLayerRef >  ,
ImageLayerClasses  ,
"net.maxon.image.registry.imagelayerclasses"   
)

◆  GetImageOf()

ImageRef maxon::GetImageOf ( const ImageBaseRef &  bmp )

GetImageOf extracts the first image in a texture or if bmp is already a bmp itself.

参数
[in] bmp ImageBaseRef of type texture or image.
返回
ImageRef pointing the the first image of a texture or itself if it was a texture.

◆  GetFirstAlphaOf()

ImageLayerRef maxon::GetFirstAlphaOf ( const ImageBaseRef &  bmp )

GetFirstAlphaOf returns the alpha channel of a texture or image.

参数
[in] bmp Texture or image.
返回
Alpha channel on success.

◆  MAXON_DATATYPE() [1/2]

maxon::MAXON_DATATYPE ( Pix16f   ,
"net.maxon.image.pix16f"   
)

◆  MAXON_ENUM_FLAGS() [1/6]

enum maxon::BLENDPIXELFLAGS maxon::MAXON_ENUM_FLAGS ( BLENDPIXELFLAGS   )

◆  MAXON_DATATYPE() [2/2]

maxon::MAXON_DATATYPE ( BlendPixelHandlerRef   ,
"net.maxon.datatype.blendpixelhandlerref"   
)

◆  MAXON_REGISTRY() [5/6]

maxon::MAXON_REGISTRY ( ImagePixelBlend  ,
ImagePixelBlends  ,
"net.maxon.render.registry.blendmodeclasses"   
)

◆  MAXON_ENUM_FLAGS() [2/6]

enum maxon::CONVERTPIXELFLAGS maxon::MAXON_ENUM_FLAGS ( CONVERTPIXELFLAGS   )

◆  MAXON_ENUM_FLAGS() [3/6]

enum maxon::GETPIXELHANDLERFLAGS maxon::MAXON_ENUM_FLAGS ( GETPIXELHANDLERFLAGS   )

◆  MAXON_ENUM_FLAGS() [4/6]

enum maxon::GETPIXELFLAGS maxon::MAXON_ENUM_FLAGS ( GETPIXELFLAGS   )

◆  MAXON_ENUM_FLAGS() [5/6]

enum maxon::SETPIXELHANDLERFLAGS maxon::MAXON_ENUM_FLAGS ( SETPIXELHANDLERFLAGS   )

◆  MAXON_ENUM_FLAGS() [6/6]

enum maxon::SETPIXELFLAGS maxon::MAXON_ENUM_FLAGS ( SETPIXELFLAGS   )

◆  LambdaWrapper()

Result < CONVERTPIXELFUNC > maxon::LambdaWrapper ( CONVERTPIXELFUNCSTATIC   func ,
const ChannelOffsets dstChannelOffsets ,
const ChannelOffsets srcChannelOffsets  
)

◆  MAXON_DECLARATION()

maxon::MAXON_DECLARATION ( Class < PixelFormat >  ,
PixelFormatBaseClass  ,
"net.maxon.image.class.pixelformatbase"   
)

Base channels which implements a bunch of default functions for all pixel formats.

◆  JoinPixelFormats()

Result <PixelFormat> maxon::JoinPixelFormats ( const PixelFormat &  format1 ,
const PixelFormat &  format2  
)

Joins 2 pixel formats together. The result pixel format will have all channels from the first format followed by the channels of the second format.

参数
[in] format1 First pixel format.
[in] format2 Second pixel format.
返回
Returns the new joined pixel format.

◆  MAXON_REGISTRY() [6/6]

maxon::MAXON_REGISTRY ( PixelFormatGroup  ,
PixelFormats  ,
"net.maxon.image.registry.pixelformats"   
)

◆  GetNativeFloatColorAlphaFormat()

MAXON_ATTRIBUTE_FORCE_INLINE PixelFormat maxon::GetNativeFloatColorAlphaFormat ( )

GetNativeFloatColorAlphaFormat returns the ColorA 32 or 64 PixelFormat depending on the system.

返回
PixelFormat on success.

◆  GetNativeFloatColorFormat()

MAXON_ATTRIBUTE_FORCE_INLINE PixelFormat maxon::GetNativeFloatColorFormat ( )

GetNativeFloatColorFormat returns the Color 32 or 64 PixelFormat depending on the system.

返回
PixelFormat on success.

◆  GetChannel()

ImageChannel GetChannel ( ) const

◆  FindOrCreatePixelFormat() [1/3]

Result < PixelFormat > FindOrCreatePixelFormat ( const DataType pixelType ,
const Block < const ImageChannelType > &  imageChannelTypes  
)
static

Create of find a pixel format. This function simplifies the usage without the need to create the array of channels on the stack:

参数
[in] pixelType Pixel data type e.g. GetDataType<Pix32f>() .
[in] imageChannelTypes Image Channel types. PixelFormat formatGBR32f = PixelFormatsInterface::FindOrCreatePixelFormat<ImageChannels::Green, ImageChannels::Blue, ImageChannels::Red>() iferr_return ;
返回
Pixel format on success.

◆  FindOrCreatePixelFormat() [2/3]

Result <PixelFormat> FindOrCreatePixelFormat ( const Block < const ImageChannelType > &  imageChannelTypes )

◆  FindOrCreatePixelFormat() [3/3]

Result <PixelFormat> FindOrCreatePixelFormat ( )
iferr_return
#define iferr_return
定义: resultbase.h:1434
REGISTER_PIXELFORMATGROUP
#define REGISTER_PIXELFORMATGROUP(name)
定义: gfx_image_pixelformats.h:268

Copyright  © 2014-2025 乐数软件    

工业和信息化部: 粤ICP备14079481号-1