ColorProfile Class Reference

#include <c4d_basebitmap.h>

Inheritance diagram for ColorProfile:

详细描述

Color Profile custom data type.

注意
Has to be created with Alloc() and destroyed with Free() 。使用 AutoAlloc to automate the allocation and destruction based on scope.

Public Types

enum   COLORPROFILEINFO {
   COLORPROFILEINFO_DESCRIPTION ,
   COLORPROFILEINFO_MANUFACTURER ,
   COLORPROFILEINFO_MODEL ,
   COLORPROFILEINFO_COPYRIGHT
}

私有成员函数

  ColorProfile ()
  ~ColorProfile ()
  ColorProfile (const ColorProfile &src)

Alloc/Free

static ColorProfile Alloc (void)
static void  Free ( ColorProfile *&profile)

运算符

ColorProfile operator= (const ColorProfile &src)
Bool   operator== (const ColorProfile &src) const
Bool   operator!= (const ColorProfile &src) const

Open/Write from File/Memory

Bool   OpenProfileFromFile (const Filename &fn)
Bool   OpenProfileFromMemory (const void *mem, Int64 memsize)
Bool   WriteProfileToFile (const Filename &fn) const
Bool   WriteProfileToMemory (void *&mem, Int64 &memsize) const

Monitor Color Profile

Bool   IsMonitorProfileMode () const
Bool   SetMonitorProfileMode ( Bool on)

杂项

Bool   CheckColorMode ( COLORMODE colormode) const
Bool   CreateDefaultWindow ( GeDialog *dlg)
String   GetInfo ( COLORPROFILEINFO info) const
Bool   HasProfile () const

Default Color Profiles

static const ColorProfile GetDefaultSRGB ()
static const ColorProfile GetDefaultLinearRGB ()
static const ColorProfile GetDefaultSGray ()
static const ColorProfile GetDefaultLinearGray ()
const void *  GetInternalProfile () const

构造函数 & 析构函数文档编制

◆  ColorProfile() [1/2]

ColorProfile () private

◆  ~ColorProfile()

~ ColorProfile () private

◆  ColorProfile() [2/2]

ColorProfile ( const ColorProfile src )
private

成员函数文档编制

◆  Alloc()

static ColorProfile * Alloc ( void  )
static

Allocates a color profile data. Destroy the allocated color profile data with Free() 。使用 AutoAlloc to automate the allocation and destruction based on scope.

返回
The allocated color profile data, or nullptr if the allocation failed.

◆  Free()

static void Free ( ColorProfile *&  profile )
static

Destructs color profile data allocated with Alloc() 。使用 AutoAlloc to automate the allocation and destruction based on scope.

参数
[in] profile The color profile data to destruct. If the pointer is nullptr nothing happens. The pointer is assigned nullptr afterwards.

◆  operator=()

ColorProfile & operator= ( const ColorProfile src )

Assigns src to the color profile.

参数
[in] src The source color profile.
返回
*this color profile.

◆  operator==()

Bool operator== ( const ColorProfile src ) const

Checks if *this and src color profiles are identical.

参数
[in] src The source color profile to compare with.
返回
true if the color profiles are identical, otherwise false .

◆  operator!=()

Bool operator!= ( const ColorProfile src ) const

Checks if *this and src color profiles are not identical.

参数
[in] src The source color profile to compare with.
返回
true if the color profiles are not identical, otherwise false .

◆  OpenProfileFromFile()

Bool OpenProfileFromFile ( const Filename fn )

Loads the color profile data from the given file.

参数
[in] fn The filename of the color profile file.
返回
true if successful, otherwise false .

◆  OpenProfileFromMemory()

Bool OpenProfileFromMemory ( const void *  mem ,
Int64   memsize  
)

Loads the color profile from the memory location mem .

参数
[in] mem The pointer to the memory buffer containing the color profile. The caller owns the pointed memory buffer.
[in] memsize The size of the memory buffer mem .
返回
true if successful, otherwise false .

◆  WriteProfileToFile()

Bool WriteProfileToFile ( const Filename fn ) const

Writes the color profile data to the given file.

参数
[in] fn The filename of the color profile file.
返回
true if successful, otherwise false .

◆  WriteProfileToMemory()

Bool WriteProfileToMemory ( void *&  mem ,
Int64 memsize  
) const

Writes the color profile to memory location mem .

参数
[out] mem Assigned a pointer to the color profile. The caller owns the pointed memory buffer.
[out] memsize Assigned the size of the written memory buffer mem .
返回
true if successful, otherwise false .

◆  IsMonitorProfileMode()

Bool IsMonitorProfileMode ( ) const

Checks if the color profile is linked to the monitor color profile.

返回
true if the color profile is linked to the monitor color profile, otherwise false .

◆  SetMonitorProfileMode()

Bool SetMonitorProfileMode ( Bool   on )

Links the color profile to the monitor color profile.

参数
[in] on true to link the color profile to the monitor profile, otherwise false .
返回
true if successful, otherwise false .

◆  CheckColorMode()

Bool CheckColorMode ( COLORMODE   colormode ) const

Checks if the color profile is compatible with the passed color mode.

参数
[in] colormode The color mode to check: COLORMODE
返回
true if the color profile is compatible with the passed color mode, otherwise false .

◆  CreateDefaultWindow()

Bool CreateDefaultWindow ( GeDialog dlg )

Retrieves the monitor color profile of the passed dialog window.

参数
[in] dlg The dialog window to obtain the monitor color profile for. The caller owns the pointed dialog.
返回
true successful, otherwise false .

◆  GetInfo()

String GetInfo ( COLORPROFILEINFO   info ) const

Retrieves information about the color profile.

参数
[in] info The type of information: COLORPROFILEINFO
返回
The information string.

◆  HasProfile()

Bool HasProfile ( ) const

Checks if the color profile exists.

返回
true if the object contains a color profile, otherwise false .

◆  GetDefaultSRGB()

static const ColorProfile * GetDefaultSRGB ( )
static

Retrieves Cinema 4D 's default sRGB color profile.

返回
The default sRGB color profile. Cinema 4D owns the pointed ColorProfile .

◆  GetDefaultLinearRGB()

static const ColorProfile * GetDefaultLinearRGB ( )
static

Retrieves Cinema 4D 's default linear color profile.

返回
The default linear color profile. Cinema 4D owns the pointed ColorProfile .

◆  GetDefaultSGray()

static const ColorProfile * GetDefaultSGray ( )
static

Retrieves Cinema 4D 's default sRGB grayscale color profile.

返回
The default sRGB grayscale color profile. Cinema 4D owns the pointed ColorProfile .

◆  GetDefaultLinearGray()

static const ColorProfile * GetDefaultLinearGray ( )
static

Retrieves Cinema 4D 's default linear grayscale color profile.

返回
The default linear grayscale color profile. Cinema 4D owns the pointed ColorProfile .

◆  GetInternalProfile()

const void* GetInternalProfile ( ) const

Retrieves the internal color profile. Private .

由于
R19
返回
The internal color profile.