0

Here is my question, I want to add a node on top of several lines of code, representing that these code are not used anymore.

Right now it is something like this:

enter image description here

Here is my code:

\tikzstyle{data}=[draw, tape, tape bend top=none]
\begin{tikzpicture}[scale=0.3, every node/.style={scale=0.78}]

\node[data, below= 1.00em of bbllabel1, scale=0.7] (bb3r) {
\begin{lstlisting}[basicstyle=\ttfamily\scriptsize]
Foo:
  mov  %rdi,%rcx
  cmp  %rsi,$0x10
  je   l
  add  %rax,%rbx
  ...
  l:
   mov  %r12d,%edx
   mov  $0xff,%rcx
    ...
   \end{lstlisting}
   };

\node[draw, rectangle, fill=red!40, minimum width=5.5em, minimum height=2.5em,opacity=0.6] at (9.80, 2.2) {};

\end{tikzpicture}

Sorry, this is not a minimal compilable code, but I just want to clarify what I am doing right now.

So here is my question, how I can add multiple "strike line" inside the node, in one direction, meaning that those lines of code are not used anymore?

Am I clear enough? Thank you!

2
  • See tex.stackexchange.com/questions/246971/… It should work inside a tikz node too. May 10, 2016 at 3:20
  • @JohnKormylo, thank you for your reply. I played with that sample a little bit, but I still don't see how to use it to solve my case.. Could you please elaborate on it more? Thank you! May 10, 2016 at 3:56

1 Answer 1

2

Like this?

enter image description here

\documentclass[tikz,border=2mm]{standalone}

\usetikzlibrary{patterns,shapes.symbols,positioning}
\usepackage{listings}

\tikzset{data/.style={draw, tape, tape bend top=none}}

\begin{document}
\begin{tikzpicture}[scale=0.3, every node/.style={scale=0.78}]

\node[data, scale=0.7] (bb3r) {
\begin{lstlisting}[basicstyle=\ttfamily\scriptsize]
Foo:
  mov  %rdi,%rcx
  cmp  %rsi,$0x10
  je   l
  add  %rax,%rbx
  ...
  l:
   mov  %r12d,%edx
   mov  $0xff,%rcx
    ...
   \end{lstlisting}
   };

\node[draw, rectangle, minimum width=5.5em, minimum height=2.5em,opacity=0.6, anchor=north west, pattern=crosshatch] at ([shift={(1em,-1em)}]bb3r.west) {};

\end{tikzpicture}
\end{document}
1
  • Thank you for your help! This is exactly what I am looking for! May 10, 2016 at 14:07

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .