SceneColorConverter Class Reference

#include <lib_scene_color_converter.h>

Detailed Description

Class to convert color spaces in and between scenes.

Note
Has to be created with Alloc() and destroyed with Free(). Use AutoAlloc to automate the allocation and destruction based on scope.

Public Types

enum class  CONVERSION_FLAGS {
  NONE ,
  ADD_UNDO
}
 

Public Member Functions

enum SceneColorConverter::CONVERSION_FLAGS MAXON_ENUM_FLAGS_CLASS (CONVERSION_FLAGS)
 
maxon::Result< void > Init (BaseDocument *doc, const maxon::CString &inputColorSpaceLowName, const maxon::CString &inputColorSpaceHighName, const maxon::CString &renderColorSpaceName, CONVERSION_FLAGS flags=CONVERSION_FLAGS::ADD_UNDO)
 
maxon::Result< BoolConvertObject (BaseDocument *doc, BaseList2D *op, maxon::HashSet< BaseList2D * > &procesedObjects)
 
maxon::Result< BoolConvertObjects (BaseDocument *doc, maxon::Block< BaseList2D * > objects, maxon::HashSet< BaseList2D * > &procesedObjects)
 

Private Member Functions

 SceneColorConverter ()
 
 ~SceneColorConverter ()
 

Alloc/Free

static SceneColorConverterAlloc ()
 
static void Free (SceneColorConverter *&conv)
 

Member Enumeration Documentation

◆ CONVERSION_FLAGS

enum CONVERSION_FLAGS
strong

Conversion flags.

Enumerator
NONE 
ADD_UNDO 

Constructor & Destructor Documentation

◆ SceneColorConverter()

SceneColorConverter ( )
private

◆ ~SceneColorConverter()

~SceneColorConverter ( )
private

Member Function Documentation

◆ MAXON_ENUM_FLAGS_CLASS()

enum SceneColorConverter::CONVERSION_FLAGS MAXON_ENUM_FLAGS_CLASS ( CONVERSION_FLAGS  )

◆ Alloc()

static SceneColorConverter* Alloc ( )
static

Allocates a scene converter. Destroy the allocated scene converter with Free(). Use AutoAlloc to automate the allocation and destruction based on scope.

Returns
The allocated scene converter, or nullptr if the allocation failed.

◆ Free()

static void Free ( SceneColorConverter *&  conv)
static

Destructs scene converter allocated with Alloc(). Use AutoAlloc to automate the allocation and destruction based on scope.

Parameters
[in,out]convThe scene converter to destruct. If the pointer is nullptr nothing happens. The pointer is assigned nullptr afterwards.

◆ Init()

maxon::Result<void> Init ( BaseDocument doc,
const maxon::CString inputColorSpaceLowName,
const maxon::CString inputColorSpaceHighName,
const maxon::CString renderColorSpaceName,
CONVERSION_FLAGS  flags = CONVERSION_FLAGS::ADD_UNDO 
)

◆ ConvertObject()

maxon::Result<Bool> ConvertObject ( BaseDocument doc,
BaseList2D op,
maxon::HashSet< BaseList2D * > &  procesedObjects 
)

◆ ConvertObjects()

maxon::Result<Bool> ConvertObjects ( BaseDocument doc,
maxon::Block< BaseList2D * >  objects,
maxon::HashSet< BaseList2D * > &  procesedObjects 
)