Aspose::Cells::IThemeColor Class Referenceabstract

Represents a theme color. More...

Inherits Object.

Public Member Functions

virtual Aspose::Cells::ThemeColorType GetColorType ()=0
 Gets the theme type. More...
 
virtual void SetColorType (Aspose::Cells::ThemeColorType value)=0
 Sets the theme type. More...
 
virtual Aspose::Cells::Systems::Double GetTint ()=0
 Gets the tint value. More...
 
virtual void SetTint (Aspose::Cells::Systems::Double value)=0
 Sets the tint value. More...
 

Detailed Description

Represents a theme color.

[C++]
//Instantiating a Workbook object
intrusive_ptr<IWorkbook> workbook = Factory::CreateIWorkbook();
intrusive_ptr<ICells> cells = workbook->GetIWorksheets()->GetObjectByIndex(0)->GetICells();
cells->GetObjectByIndex(new String("A1"))->PutValue((StringPtr)new String("Hello World"));
intrusive_ptr<IStyle> style = cells->GetObjectByIndex(new String("A1"))->GetIStyle();
//Set ThemeColorType.Text2 color type with 40% lighten as the font color.
style->GetIFont()->SetIThemeColor(Factory::CreateIThemeColor(ThemeColorType_Text2, 0.4));
style->SetPattern(BackgroundType_Solid);
//Set ThemeColorType.Background2 color type with 75% darken as the foreground color
style->SetForegroundIThemeColor(Factory::CreateIThemeColor(ThemeColorType_Background2, -0.75));
cells->GetObjectByIndex(new String("A1"))->SetIStyle(style);
//Saving the Excel file
workbook->Save(new String("book1.xlsx"));

Member Function Documentation

◆ GetColorType()

virtual Aspose::Cells::ThemeColorType Aspose::Cells::IThemeColor::GetColorType ( )
pure virtual

Gets the theme type.

◆ GetTint()

virtual Aspose::Cells::Systems::Double Aspose::Cells::IThemeColor::GetTint ( )
pure virtual

Gets the tint value.

The tint value is stored as a double from -1.0 .. 1.0, where -1.0 means 100% darken and 1.0 means 100% lighten. Also, 0.0 means no change.

◆ SetColorType()

virtual void Aspose::Cells::IThemeColor::SetColorType ( Aspose::Cells::ThemeColorType  value)
pure virtual

Sets the theme type.

◆ SetTint()

virtual void Aspose::Cells::IThemeColor::SetTint ( Aspose::Cells::Systems::Double  value)
pure virtual

Sets the tint value.

The tint value is stored as a double from -1.0 .. 1.0, where -1.0 means 100% darken and 1.0 means 100% lighten. Also, 0.0 means no change.