TextureAlignment

TextureAlignment enumeration

Doku dolgusunun döşenmesi için hizalamayı belirtir.

public enum TextureAlignment

değerler

İsimDeğerTanım
TopLeft0Sol üst doku hizalaması.
Top1Üst doku hizalaması.
TopRight2Sağ üst doku hizalaması.
Left3Sol doku hizalaması.
Center4Orta doku hizalaması.
Right5Sağ doku hizalaması.
BottomLeft6Sol alt doku hizalaması.
Bottom7Alt doku hizalaması.
BottomRight8Sağ alt doku hizalaması.
None9Hiçbir doku hizalaması yok.

Örnekler

Şeklin içindeki dokuyu nasıl dolduracağınızı ve döşeyeceğinizi gösterir.

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

Shape shape = builder.InsertShape(ShapeType.Rectangle, 80, 80);

// Şekil dolgusuna doku hizalamasını uygula.
shape.Fill.PresetTextured(PresetTexture.Canvas);
shape.Fill.TextureAlignment = TextureAlignment.TopRight;

// "TextureAlignment" elde etmek istiyorsanız, DML kullanarak şekli tanımlamak için uyumluluk seçeneğini kullanın
// belge kaydedildikten sonra özellik.
OoxmlSaveOptions saveOptions = new OoxmlSaveOptions { Compliance = OoxmlCompliance.Iso29500_2008_Strict };

doc.Save(ArtifactsDir + "Shape.TextureFill.docx", saveOptions);

doc = new Document(ArtifactsDir + "Shape.TextureFill.docx");
shape = (Shape)doc.GetChild(NodeType.Shape, 0, true);

Assert.AreEqual(TextureAlignment.TopRight, shape.Fill.TextureAlignment);
Assert.AreEqual(PresetTexture.Canvas, shape.Fill.PresetTexture);

Ayrıca bakınız