![挿入されたグラフィック - 全体の一部であることを示すためにギザギザのエッジ](https://rvso.com/image/330744/%E6%8C%BF%E5%85%A5%E3%81%95%E3%82%8C%E3%81%9F%E3%82%B0%E3%83%A9%E3%83%95%E3%82%A3%E3%83%83%E3%82%AF%20-%20%E5%85%A8%E4%BD%93%E3%81%AE%E4%B8%80%E9%83%A8%E3%81%A7%E3%81%82%E3%82%8B%E3%81%93%E3%81%A8%E3%82%92%E7%A4%BA%E3%81%99%E3%81%9F%E3%82%81%E3%81%AB%E3%82%AE%E3%82%B6%E3%82%AE%E3%82%B6%E3%81%AE%E3%82%A8%E3%83%83%E3%82%B8.png)
答え1
decorations
TikZ で を使用してパスをモーフィングすることができますrandom steps
。もちろん、これらのランダム ステップをカスタマイズすることもできます。
私は、\clip
画像の左上から始めて右上、約 2/3 まで下がってからパスを閉じる前に再び左に移動する、ハードコードされた座標を持つ を使用しましたwidth
。includegraphics の を変更する場合は、クリッピング座標もそれに応じて変更してください。
ただし、これは変数を使用して簡単に解決できます。
出力
コード
\documentclass[margin=15pt]{standalone}
\usepackage{tikz}
\usetikzlibrary{calc, decorations.pathmorphing}
\newcommand\myimgwidth{\linewidth} % one measure to rule them all
\begin{document}
\begin{tikzpicture}
\pgfmathsetmacro\myheight{(\myimgwidth/4)*2}
\clip[preaction={draw, line width=.8pt}] (0,0) -- (\myimgwidth,0) -- (\myimgwidth,-\myheight pt) decorate[decoration={random steps,segment length=2mm,amplitude=.1cm}] {(\myimgwidth,-\myheight pt) -- (0,-\myheight pt)} -- (0,0);
\node[inner sep=0pt, outer sep=0pt, anchor=north west] at (0,0) {\includegraphics[width=\myimgwidth,keepaspectratio]{example-image-a}};
\end{tikzpicture}
\end{document}