挿入されたグラフィック - 全体の一部であることを示すためにギザギザのエッジ

挿入されたグラフィック - 全体の一部であることを示すためにギザギザのエッジ

挿入されたグラフィックが全体の一部にすぎないことを視覚的に明確にしたいと思います。直線カットは単に挿入された偽物のように見えるので、トリミングされた側面のギザギザを表示するトリックがあるかどうか疑問に思っています。たとえば、次のようになります。

ギザギザのページ

答え1

decorationsTikZ で を使用してパスをモーフィングすることができます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}

関連情報