System::Drawing::ColorTranslator Class Reference

Static Public Member Functions

static ASPOSECPP_SHARED_API Color FromWin32 (int win32_color)
static ASPOSECPP_SHARED_API Color FromHtml (const System::String &name)
static ASPOSECPP_SHARED_API String ToHtml (const Color &color)

Detailed Description

Performs color translations. Objects of this class should only be allocated using System::MakeObject() function. Never create instance of this type on stack or using operator new, as it will result in runtime errors and/or assertion faults. Always wrap this class into System::SmartPtr pointer and use this pointer to pass it to functions as argument.

Member Function Documentation

◆ FromHtml()

static ASPOSECPP_SHARED_API Color System::Drawing::ColorTranslator::FromHtml ( const System::String name)

Converts the specified HTML color representation to the equvivalent Color object.

nameThe name of HTML color to translate
A Color object that represents the specified HTML color

◆ FromWin32()

static ASPOSECPP_SHARED_API Color System::Drawing::ColorTranslator::FromWin32 ( int  win32_color)

Converts the specified Windows color to the equvivalent Color object.

win32_colorThe Windows color to convert
A Color object that represents the specified Windows color

◆ ToHtml()

static ASPOSECPP_SHARED_API String System::Drawing::ColorTranslator::ToHtml ( const Color color)

Converts the specified Color object to the string representation of equivalent HTML color.

colorA Color object to translate
The name of HTML color equivalent to the color represented by color