Color2

Stroke.Color2 property

يحدد لونًا ثانيًا للخط.

public Color Color2 { get; set; }

ملاحظات

القيمة الافتراضية لـShape هو White .

أمثلة

يوضح كيفية معالجة ميزات شكل السكتة الدماغية.

Document doc = new Document(MyDir + "Shape stroke pattern border.docx");
Shape shape = (Shape)doc.GetChild(NodeType.Shape, 0, true);
Stroke stroke = shape.Stroke;

// يمكن أن تحتوي الضربات على لونين، يتم استخدامهما لإنشاء نمط محدد بواسطة بيانات صورة ثنائية اللون.
// لا تستخدم الضربات ذات اللون الواحد خاصية Color2.
Assert.AreEqual(Color.FromArgb(255, 128, 0, 0), stroke.Color);
Assert.AreEqual(Color.FromArgb(255, 255, 255, 0), stroke.Color2);

Assert.NotNull(stroke.ImageBytes);
File.WriteAllBytes(ArtifactsDir + "Drawing.StrokePattern.png", stroke.ImageBytes);

أنظر أيضا