background opacity fixed
This commit is contained in:
@@ -383,13 +383,15 @@ END:VCARD\BCQ@nl}
|
|||||||
\ifcsdef{Xbackground}{%
|
\ifcsdef{Xbackground}{%
|
||||||
\IfFileExists{\Xbackground}{%
|
\IfFileExists{\Xbackground}{%
|
||||||
% It's an image file: add to background using eso-pic (no layout impact)
|
% It's an image file: add to background using eso-pic (no layout impact)
|
||||||
\AddToShipoutPictureBG*{%
|
% Fix XeLaTeX opacity issue: ensure TikZ/PGF is loaded before opacity is used
|
||||||
\AtPageCenter{%
|
\AddToHook{shipout/background}[businesscard]{%
|
||||||
|
\put (\LenToUnit{.5\paperwidth},\LenToUnit{-.5\paperheight}) {%
|
||||||
\tikz[overlay]{\node[opacity=\fpeval{\BCQ@bgopacity}, inner sep=0pt] at (0,0) {%
|
\tikz[overlay]{\node[opacity=\fpeval{\BCQ@bgopacity}, inner sep=0pt] at (0,0) {%
|
||||||
\includegraphics[height=\fpeval{\BCQ@bgscale}\paperheight]{\Xbackground}%
|
\includegraphics[height=\fpeval{\BCQ@bgscale}\paperheight]{\Xbackground}%
|
||||||
};}%
|
};}%
|
||||||
}%
|
}%
|
||||||
}%
|
}%
|
||||||
|
\DeclareHookRule{shipout/background}{pgfrcs}{>}{businesscard}%
|
||||||
}{%
|
}{%
|
||||||
% Not a file: treat as color
|
% Not a file: treat as color
|
||||||
\pagecolor{\Xbackground}%
|
\pagecolor{\Xbackground}%
|
||||||
|
|||||||
Binary file not shown.
@@ -1,6 +1,5 @@
|
|||||||
% !TeX program = xelatex
|
% !TeX program = xelatex
|
||||||
\documentclass[bgscale=1.2,bgopacity=0.3,qrbgopacity=0.2
|
\documentclass[bgscale=1.2,bgopacity=0.6,qrbgopacity=0.8,photoscale=4]{businesscard-qrcode}
|
||||||
]{businesscard-qrcode}
|
|
||||||
|
|
||||||
\type{home}
|
\type{home}
|
||||||
\givennames{Petra}
|
\givennames{Petra}
|
||||||
|
|||||||
Binary file not shown.
@@ -1,6 +1,6 @@
|
|||||||
% !TeX program = xelatex
|
% !TeX program = xelatex
|
||||||
% Note: Requires photo.png in same directory
|
% Note: Requires photo.png in same directory
|
||||||
\documentclass[photoscale=4]{businesscard-qrcode}
|
\documentclass[bgscale=1.2,bgopacity=0.6,qrbgopacity=0.8,photoscale=4]{businesscard-qrcode}
|
||||||
|
|
||||||
\type{home}
|
\type{home}
|
||||||
\givennames{Max}
|
\givennames{Max}
|
||||||
@@ -13,6 +13,7 @@
|
|||||||
\phone{+41 52 123 45 67}
|
\phone{+41 52 123 45 67}
|
||||||
\email{max@example.ch}
|
\email{max@example.ch}
|
||||||
\photo{photo.png}
|
\photo{photo.png}
|
||||||
|
\background{background.png}
|
||||||
|
|
||||||
\begin{document}
|
\begin{document}
|
||||||
\drawcard
|
\drawcard
|
||||||
|
|||||||
Reference in New Issue
Block a user