Aspose::Words::TextureIndex enum

TextureIndex enum

Указывает текстуру затенения.

enum class TextureIndex

Значения

ИмяЗначениеОписание
Texture10Percent3
Texture12Pt5Percent37
Texture15Percent38
Texture17Pt5Percent39
Texture20Percent4
Texture22Pt5Percent40
Texture25Percent5
Texture27Pt5Percent41
Texture2Pt5Percent35
Texture30Percent6
Texture32Pt5Percent42
Texture35Percent43
Текстура37Pt5Процент44
Текстура40Процент7
Текстура42Pt5Процент45
Текстура45Процент46
Текстура47Pt5Процент47
Текстура50Процент8
Текстура52Pt5Процент48
Текстура55Процент49
Текстура57Pt5Процент50
Текстура5Процент2
Текстура60Процент9
Текстура62Pt5Процент51
Текстура65Процент52
Текстура67Pt5Процент53
Текстура70Процент10
Текстура72Pt5Процент54
Текстура75Процент11
Текстура77Pt5Процент55
Текстура7Pt5Процент36
Текстура80Процент12
Текстура82Pt5Процент56
Текстура85Процент57
Текстура87Pt5Процент58
Текстура90Процент13
Текстура92Pt5Процент59
Texture95Percent60
Texture97Pt5Percent61
TextureCross24
TextureDarkCross18
TextureDarkDiagonalCross19
TextureDarkDiagonalDown16
TextureDarkDiagonalUp17
TextureDarkHorizontal14
TextureDarkVertical15
TextureDiagonalCross25
TextureDiagonalDown22
TextureDiagonalUp23
TextureHorizontal20
TextureNone0
TextureSolid1
TextureVertical21
TextureNil65535Указывает, что не должно использоваться никакое узор на текущем затенённом регионе (т.е. узор должен полностью заполняться цветом фона).

Примеры

Показывает, как оформить текст границами и затенением.

auto doc = System::MakeObject<Aspose::Words::Document>();
auto builder = System::MakeObject<Aspose::Words::DocumentBuilder>(doc);

System::SharedPtr<Aspose::Words::BorderCollection> borders = builder->get_ParagraphFormat()->get_Borders();
borders->set_DistanceFromText(20);
borders->idx_get(Aspose::Words::BorderType::Left)->set_LineStyle(Aspose::Words::LineStyle::Double);
borders->idx_get(Aspose::Words::BorderType::Right)->set_LineStyle(Aspose::Words::LineStyle::Double);
borders->idx_get(Aspose::Words::BorderType::Top)->set_LineStyle(Aspose::Words::LineStyle::Double);
borders->idx_get(Aspose::Words::BorderType::Bottom)->set_LineStyle(Aspose::Words::LineStyle::Double);

System::SharedPtr<Aspose::Words::Shading> shading = builder->get_ParagraphFormat()->get_Shading();
shading->set_Texture(Aspose::Words::TextureIndex::TextureDiagonalCross);
shading->set_BackgroundPatternColor(System::Drawing::Color::get_LightCoral());
shading->set_ForegroundPatternColor(System::Drawing::Color::get_LightSalmon());

builder->Write(u"This paragraph is formatted with a double border and shading.");
doc->Save(get_ArtifactsDir() + u"DocumentBuilder.ApplyBordersAndShading.docx");

Показывает, как применить контурную границу к таблице.

auto doc = System::MakeObject<Aspose::Words::Document>(get_MyDir() + u"Tables.docx");
System::SharedPtr<Aspose::Words::Tables::Table> table = doc->get_FirstSection()->get_Body()->get_Tables()->idx_get(0);

// Выровняйте таблицу по центру страницы.
table->set_Alignment(Aspose::Words::Tables::TableAlignment::Center);

// Очистите любые существующие границы и заливку в таблице.
table->ClearBorders();
table->ClearShading();

// Добавьте зеленые границы к контуру таблицы.
table->SetBorder(Aspose::Words::BorderType::Left, Aspose::Words::LineStyle::Single, 1.5, System::Drawing::Color::get_Green(), true);
table->SetBorder(Aspose::Words::BorderType::Right, Aspose::Words::LineStyle::Single, 1.5, System::Drawing::Color::get_Green(), true);
table->SetBorder(Aspose::Words::BorderType::Top, Aspose::Words::LineStyle::Single, 1.5, System::Drawing::Color::get_Green(), true);
table->SetBorder(Aspose::Words::BorderType::Bottom, Aspose::Words::LineStyle::Single, 1.5, System::Drawing::Color::get_Green(), true);

// Заполните ячейки светло-зелёным сплошным цветом.
table->SetShading(Aspose::Words::TextureIndex::TextureSolid, System::Drawing::Color::get_LightGreen(), System::Drawing::Color::Empty);

doc->Save(get_ArtifactsDir() + u"Table.SetOutlineBorders.docx");

См. также