File tree Expand file tree Collapse file tree 1 file changed +40
-0
lines changed
Expand file tree Collapse file tree 1 file changed +40
-0
lines changed Original file line number Diff line number Diff line change @@ -3825,4 +3825,44 @@ public function addSVG(
38253825
38263826 return $ soid ;
38273827 }
3828+
3829+ /**
3830+ * Get the PDF output string to print the specified SVG object.
3831+ *
3832+ * @param int $soid SVG Object ID (as returned by addSVG).
3833+ * @param float $xpos Abscissa (X coordinate) of the upper-left Image corner in user units.
3834+ * @param float $ypos Ordinate (Y coordinate) of the upper-left Image corner in user units.
3835+ * @param float $width Image width in user units.
3836+ * @param float $height Image height in user units.
3837+ * @param float $pageheight Page height in user units.
3838+ *
3839+ * @return string Image PDF page content.
3840+ */
3841+ public function getSetSVG (
3842+ int $ soid ,
3843+ float $ xpos ,
3844+ float $ ypos ,
3845+ float $ width ,
3846+ float $ height ,
3847+ float $ pageheight ,
3848+ ): string {
3849+ if (empty ($ this ->svgobjs [$ soid ])) {
3850+ throw new PdfException ('Unknown SVG ID: ' . $ soid );
3851+ }
3852+
3853+ $ out = $ this ->svgobjs [$ soid ]['out ' ];
3854+
3855+ foreach ($ this ->svgobjs [$ soid ]['child ' ] as $ chid ) {
3856+ $ out .= $ this ->getSetSVG (
3857+ $ chid ,
3858+ $ xpos ,
3859+ $ ypos ,
3860+ $ width ,
3861+ $ height ,
3862+ $ pageheight ,
3863+ );
3864+ }
3865+
3866+ return $ out ;
3867+ }
38283868}
You can’t perform that action at this time.
0 commit comments