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קריאהמקבל את ההפנייה.

שיטות

חתימהתיאור
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מגבלת חיבור משולש: היחס שבו חיבור משולש (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קו פתוח (polyline) דרך points (לפחות שני זוגות [x, y]): moveTo ולאחריו lineTo לכל אחד.
polygon(points: [number, number][]) → thisצורה סגורה (polygon) דרך 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) על המופע VectorGraphics הזה.
stroke() → thisקורא ל-stroke על המופע VectorGraphics הזה.
fill() → thisקורא ל-fill על מופע VectorGraphics זה.
fillEvenOdd() → thisקורא ל-fillEvenOdd על מופע VectorGraphics זה.
fillStroke() → thisקורא ל-fillStroke על מופע VectorGraphics זה.
 עברית