VectorGraphics

VectorGraphics

ภาพรวม

VectorGraphics เป็นคลาสใน Aspose.PDF FOSS สำหรับ TypeScript.

ตัวสร้างแบบบัฟเฟอร์สำหรับเนื้อหาเวกเตอร์: ตัวสร้างเส้นทางทุกประเภท, ตัวดำเนินการสี, การตั้งค่าสภาวะกราฟิกส์และวงเล็บเนื้อหาเครื่องหมาย, ถูกสะสมในหน่วยความจำเป็นข้อความตัวดำเนินการ.

คลาสนี้ประกาศ 41 เมธอดสำหรับอ็อบเจกต์ VectorGraphics ในโปรแกรม TypeScript. เมธอดที่มีให้รวมถึง: BeginArtifact, BeginLayer, BeginMarkedContent, EndLayer, EndMarkedContent, arc, circle, close, curveTo, drawLine, drawRect, ellipse, และเมธอดเพิ่มเติมอีก 25 รายการ. สมาชิกสาธารณะทั้งหมดสามารถเข้าถึงได้โดยแอปพลิเคชัน TypeScript ใด ๆ หลังจากติดตั้งแพคเกจ Aspose.PDF FOSS สำหรับ TypeScript. คุณสมบัติ: ctm, liveMask, ref.

คุณสมบัติ

ชื่อประเภทการเข้าถึงคำอธิบาย
ctm: Matrixอ่านรับค่า ctm.
liveMask: PaintChannelอ่านรับมาสก์สด.
ref: unknownอ่านรับค่า ref.

วิธีการ

ลายเซ็นคำอธิบาย
setLineWidth(w: number) → thisตั้งค่าความกว้างของเส้น.
setStrokeColor(rgb: [number, number, number]) → thisกำหนดค่าสีของเส้นขอบ.
setFillColor(rgb: [number, number, number]) → thisกำหนดค่าของสีเติม.
setFillGradient(g: Gradient) → thisเติมเส้นทางต่อไปด้วย gradient เชิงแกนหรือเชิงรัศมี.
setStrokeGradient(g: Gradient) → thisกำหนดเส้นขอบของเส้นทางต่อไปด้วย gradient เชิงแกนหรือเชิงรัศมี.
setFillPattern(pattern: ColoredTilingPattern) → thisเติมเส้นทางต่อไปด้วย pattern ซึ่งเป็นลวดลายแบบต่อภาพจาก {@link Document.NewTilingPattern}.
setFillPattern(pattern: UncoloredTilingPattern, color: [number, number, number]) → thisตั้งค่าค่ารูปแบบการเติม.
setFillPattern(pattern: TilingPattern, color: [number, number, number]) → thisตั้งค่าค่าลวดลายการเติม.
setStrokePattern(pattern: ColoredTilingPattern) → thisวาดเส้นตามเส้นทางต่อไปด้วย pattern.
setStrokePattern(pattern: UncoloredTilingPattern, color: [number, number, number]) → thisตั้งค่าค่ารูปแบบเส้น.
setStrokePattern(pattern: TilingPattern, color: [number, number, number]) → thisกำหนดค่ารูปแบบเส้น.
`setLineCap(cap: 01
`setLineJoin(join: 01
setMiterLimit(limit: number) → thisMiter limit: อัตราส่วนที่การเชื่อมต่อมิตเตอร์ (setLineJoin(0)) ถูกตัดให้เป็นบีเวล.
setDash(pattern: number[], phase) → thisตั้งค่าค่าดัช.
setOpacity(alpha: number) → thisกำหนดค่าความทึบแสง.
save() → thisเรียกใช้ save บนอินสแตนซ์ VectorGraphics นี้.
restore() → thisเรียกใช้ restore บนอินสแตนซ์ VectorGraphics นี้.
transform(a: number, b: number, c: number, d: number, e: number, f: number) → thisเรียก transform(a, b, c, d, e, f) บนอินสแตนซ์ VectorGraphics นี้.
BeginMarkedContent(tag: string, mcid: number) → thisเริ่มลำดับเนื้อหาแบบทำเครื่องหมายที่บรรจุ /MCID.
BeginArtifact() → thisเริ่มลำดับอาร์ติแฟคท์: /Artifact BMC, ทำเครื่องหมายว่าปฏิบัติการต่อไปเป็นเนื้อหาที่ไม่เป็นส่วนของโครงสร้างใด ๆ.
EndMarkedContent() → thisจบลำดับเนื้อหาแบบทำเครื่องหมายที่ล่าสุด.
BeginLayer(layer: Layer) → thisเริ่มลำดับเนื้อหาแบบเลือกได้: /OC /<key> BDC, แท็กการดำเนินการต่อไปเป็น layer.
EndLayer() → thisจบลำดับ {@link BeginLayer} ล่าสุด.
moveTo(x: number, y: number) → thisเรียก moveTo(x, y) บนอินสแตนซ์ VectorGraphics นี้.
lineTo(x: number, y: number) → thisเรียก lineTo(x, y) บนอินสแตนซ์ VectorGraphics นี้.
curveTo(x1: number, y1: number, x2: number, y2: number, x3: number, y3: number) → thisเรียกใช้ curveTo(x1, y1, x2, y2, x3, y3) บนอินสแตนซ์ VectorGraphics นี้.
rect(x: number, y: number, w: number, h: number) → thisเรียก rect(x, y, w, h) บนอินสแตนซ์ VectorGraphics นี้.
close() → thisเรียก close บนอินสแตนซ์ VectorGraphics นี้.
drawLine(x1: number, y1: number, x2: number, y2: number) → thisเรียก drawLine(x1, y1, x2, y2) บนอินสแตนซ์ VectorGraphics นี้.
drawRect(x: number, y: number, w: number, h: number) → thisเรียก drawRect(x, y, w, h) บนอินสแตนซ์ VectorGraphics นี้.
circle(cx: number, cy: number, r: number) → thisเรียกฟังก์ชัน circle(cx, cy, r) บนอินสแตนซ์ VectorGraphics นี้.
polyline(points: [number, number][]) → thisโพลีไลน์เปิดที่ผ่าน points (อย่างน้อยสองคู่ [x, y]): moveTo ตามด้วย lineTo แต่ละอัน.
polygon(points: [number, number][]) → thisพอลิกอนปิดที่ผ่าน points: {@link polyline} พร้อมกับ h ปิดท้าย, ดังนั้น การเติมสีจะมีขอบเขตที่กำหนดชัดเจนและเส้นขอบจะเชื่อมขอบสุดท้ายกับขอบแรกแทนการปิดท้ายด้วย cap.
roundedRect(x: number, y: number, w: number, h: number, r: number) → thisสี่เหลี่ยมผืนผ้าที่มีมุมเป็นโค้งจตุรัสรัศมี r, จำกัดให้ไม่เกินครึ่งของ ด้านสั้นกว่า (ดังนั้นรัศมีที่ใหญ่เกินไปจะให้รูปแบบสเตเดียม, ไม่ใช่เส้นทางที่ตัดกันเอง).
arc(cx: number, cy: number, r: number, startAngle: number, endAngle: number) → thisส่วนโค้งแบบวงกลมที่มีรัศมี r เกี่ยวกับ (cx, cy), จาก startAngle to endAngle in radians (0 = แกน +x, เพิ่มขึ้นในแนวทวนเข็มนาฬิกา, เช่นเดียวกับ Canvas 2D).
ellipse(cx: number, cy: number, rx: number, ry: number) → thisเรียก ellipse(cx, cy, rx, ry) บนอินสแตนซ์ VectorGraphics นี้.
stroke() → thisเรียก stroke บนอินสแตนซ์ VectorGraphics นี้.
fill() → thisเรียก fill บนอินสแตนซ์ VectorGraphics นี้.
fillEvenOdd() → thisเรียก fillEvenOdd บนอินสแตนซ์ VectorGraphics นี้.
fillStroke() → thisเรียก fillStroke บนอินสแตนซ์ VectorGraphics นี้.
 ภาษาไทย