PageGraphics

PageGraphics

ภาพรวม

PageGraphics เป็นคลาสใน Aspose.PDF FOSS สำหรับ TypeScript. สืบทอดจาก: VectorGraphics.

ตัวสร้างแบบบัฟเฟอร์สำหรับวาดเนื้อหาเวกเตอร์ลงบนหน้า.

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

คุณสมบัติ

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

วิธีการ

ลายเซ็นคำอธิบาย
constructor(doc: Document, page: Page)เรียก constructor(doc, page) บนอินสแตนซ์ PageGraphics นี้.
apply()เรียกใช้ apply บนอินสแตนซ์ PageGraphics นี้.
setLineWidth(w: number) → thisตั้งค่าค่าความกว้างของเส้น.
setStrokeColor(rgb: [number, number, number]) → thisตั้งค่าสีเส้นขอบ.
setFillColor(rgb: [number, number, number]) → thisกำหนดค่าสีเติม.
setFillGradient(g: Gradient) → thisเติมเส้นทางต่อไปด้วยการไล่สีเชิงแกนหรือเชิงรัศมี.
setStrokeGradient(g: Gradient) → thisStroke เส้นทางต่อ ๆ ไปด้วยไล่ระดับสีเชิงแกนหรือเชิงรัศมี.
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) → thisStroke เส้นทางต่อ ๆ ไปด้วย 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) → thisขีดจำกัดมิตเตอร์: อัตราส่วนที่การเชื่อมต่อมิตเตอร์ (setLineJoin(0)) ถูกตัดเป็น bevel.
setDash(pattern: number[], phase) → thisกำหนดค่าการขีด.
setOpacity(alpha: number) → thisตั้งค่าค่าความทึบแสง.
save() → thisเรียก save บนอินสแตนซ์ PageGraphics นี้.
restore() → thisเรียก restore บบนอินสแตนซ์ PageGraphics นี้.
transform(a: number, b: number, c: number, d: number, e: number, f: number) → thisเรียก transform(a, b, c, d, e, f) บนอินสแตนซ์ PageGraphics นี้.
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) บนอินสแตนซ์ PageGraphics นี้.
lineTo(x: number, y: number) → thisเรียก lineTo(x, y) บนอินสแตนซ์ PageGraphics นี้.
curveTo(x1: number, y1: number, x2: number, y2: number, x3: number, y3: number) → thisเรียก curveTo(x1, y1, x2, y2, x3, y3) บนอินสแตนซ์ PageGraphics นี้.
rect(x: number, y: number, w: number, h: number) → thisเรียก rect(x, y, w, h) บนอินสแตนซ์ PageGraphics นี้.
close() → thisเรียก close บนอินสแตนซ์ PageGraphics นี้.
drawLine(x1: number, y1: number, x2: number, y2: number) → thisเรียก drawLine(x1, y1, x2, y2) บนอินสแตนซ์ PageGraphics นี้.
drawRect(x: number, y: number, w: number, h: number) → thisเรียก drawRect(x, y, w, h) บนอินสแตนซ์ PageGraphics นี้.
circle(cx: number, cy: number, r: number) → thisเรียก circle(cx, cy, r) บนอินสแตนซ์ PageGraphics นี้.
polyline(points: [number, number][]) → thisโพลีไลน์เปิดผ่าน points (อย่างน้อยสองคู่ [x, y]): moveTo ตามด้วย lineTo แต่ละคู่.
polygon(points: [number, number][]) → thisรูปหลายเหลี่ยมปิดที่ผ่าน points: {@link polyline} พร้อมกับ h ปิดท้าย, ดังนั้นการเติมสีจะมีขอบเขตที่กำหนดชัดเจนและเส้นขอบจะเชื่อมขอบสุดท้ายกับขอบแรกแทนการปิดปลาย.
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) บนอินสแตนซ์ PageGraphics นี้.
stroke() → thisเรียกใช้ stroke บนอินสแตนซ์ PageGraphics นี้.
fill() → thisเรียกใช้ fill บนอินสแตนซ์ PageGraphics นี้.
fillEvenOdd() → thisเรียกใช้ fillEvenOdd บนอินสแตนซ์ PageGraphics นี้.
fillStroke() → thisเรียก fillStroke บนอินสแตนซ์ PageGraphics นี้.
 ภาษาไทย