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 | קריאה | מקבל את ההפנייה. |
שיטות
| חתימה | תיאור |
|---|---|
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) → this | הקף את המסלולים הבאים עם גרדיאנט אקסיאלי או רדיאלי. |
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: 0 | 1 |
| `setLineJoin(join: 0 | 1 |
setMiterLimit(limit: number) → this | מגבלת מיתר: היחס שבו miter join (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 סגירה, כך שמילוי מקבל גבול מוגדר היטב וקו stroke מחבר את הקצה האחרון לראשון במקום לסגור אותו. |
roundedRect(x: number, y: number, w: number, h: number, r: number) → this | מלבן עם פינות רבע-מעגל ברדיוס r, מצומצם לחצי מהצלע הקצרה יותר (כך שרדיוס גדול מדי יוצר stadium, ולא מסלול חוצה את עצמו). |
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 הזה. |