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: 01
`setLineJoin(join: 01
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 הזה.
 עברית