PresetTexture

PresetTexture enumeration

指定用于填充形状的纹理。

public enum PresetTexture

价值观

姓名价值描述
None-1无纹理。
BlueTissuePaper1蓝色薄纸纹理。
Bouquet2花束纹理。
BrownMarble3棕色大理石纹理。
Canvas4画布纹理。
Cork5软木纹理。
Denim6牛仔布纹理。
FishFossil7鱼化石纹理。
Granite8花岗岩纹理。
GreenMarble9绿色大理石纹理。
MediumWood10中等木质纹理。
Newsprint11新闻纸纹理。
Oak12橡木纹理。
PaperBag13纸袋纹理。
Papyrus14纸莎草纹理。
Parchment15羊皮纸纹理。
PinkTissuePaper16粉色薄纸纹理。
PurpleMesh17紫色网格纹理。
RecycledPaper18再生纸纹理。
Sand19沙子纹理。
Stationery20文具纹理。
Walnut21胡桃木纹理。
WaterDroplets22水滴纹理。
WhiteMarble23白色大理石纹理。
WovenMat24编织垫纹理。

例子

展示如何设置标记格式。

Document doc = new Document();
DocumentBuilder builder = new DocumentBuilder(doc);

Shape shape = builder.InsertChart(ChartType.Scatter, 432, 252);
Chart chart = shape.Chart;

// 删除默认生成的系列。
chart.Series.Clear();
ChartSeries series = chart.Series.Add("AW Series 1", new[] { 0.7, 1.8, 2.6, 3.9 },
    new[] { 2.7, 3.2, 0.8, 1.7 });

// 设置标记格式。
series.Marker.Size = 40;
series.Marker.Symbol = MarkerSymbol.Square;
ChartDataPointCollection dataPoints = series.DataPoints;
dataPoints[0].Marker.Format.Fill.PresetTextured(PresetTexture.Denim);
dataPoints[0].Marker.Format.Stroke.ForeColor = Color.Yellow;
dataPoints[0].Marker.Format.Stroke.BackColor = Color.Red;
dataPoints[1].Marker.Format.Fill.PresetTextured(PresetTexture.WaterDroplets);
dataPoints[1].Marker.Format.Stroke.ForeColor = Color.Yellow;
dataPoints[1].Marker.Format.Stroke.Visible = false;
dataPoints[2].Marker.Format.Fill.PresetTextured(PresetTexture.GreenMarble);
dataPoints[2].Marker.Format.Stroke.ForeColor = Color.Yellow;
dataPoints[3].Marker.Format.Fill.PresetTextured(PresetTexture.Oak);
dataPoints[3].Marker.Format.Stroke.ForeColor = Color.Yellow;
dataPoints[3].Marker.Format.Stroke.Transparency = 0.5;

doc.Save(ArtifactsDir + "Charts.MarkerFormatting.docx");

也可以看看