Tikz: Viereck mit umgeknickter Ecke

Antwort erstellen


Diese Frage dient dazu, das automatisierte Versenden von Formularen durch Spam-Bots zu verhindern.
Smilies
:D :) :( :o :shock: :? 8) :lol: :-x :P :oops: :cry: :evil: :twisted: :roll: :wink: :!: :?: :idea: :arrow: :| :mrgreen:

BBCode ist eingeschaltet
[img] ist eingeschaltet
[flash] ist ausgeschaltet
[url] ist eingeschaltet
Smilies sind eingeschaltet

Die letzten Beiträge des Themas

Ich habe die Datenschutzerklärung gelesen und bin damit einverstanden.

   

Wenn du eine Datei oder mehrere Dateien anhängen möchtest, gib die Details unten ein.

Ansicht erweitern Die letzten Beiträge des Themas: Tikz: Viereck mit umgeknickter Ecke

von Besserwisser » Mo 29. Sep 2014, 10:00

Wenn damit deine Frage beantwortet ist, solltest du den Status entsprechend setzen. Ist sie nicht beantwortet, solltest du sie ggf. präzisieren, damit man weiß, was dir noch fehlt.

von sonada » So 28. Sep 2014, 19:45

Cool, danke.

von esdd » Fr 26. Sep 2014, 14:55

Hier ist ein Vorschlag, bei dem ich eigentlich nur ein Beispiel aus dem pgfmanual etwas angepasst habe:
\documentclass[margin=10pt]{standalone}
\usepackage{tikz}

\makeatletter
\pgfdeclareshape{document}{
  \inheritsavedanchors[from=rectangle] % this is nearly a rectangle
  \inheritanchorborder[from=rectangle]
    \foreach \a in {%
        center,mid,base,north,south,west,east,%
        north west,mid west,base west,south west,%
        north east,mid east,base east,south east%
      }{\inheritanchor[from=rectangle]{\a}}
  \backgroundpath{% this is new
   %store lower right in xa/ya and upper right in xb/yb
  \southwest \pgf@xa=\pgf@x \pgf@ya=\pgf@y
  \northeast \pgf@xb=\pgf@x \pgf@yb=\pgf@y
   %compute corner of ``flipped page''
  \pgf@xc=\pgf@xa \advance\pgf@xc by 5pt% this should be a parameter
  \pgf@yc=\pgf@yb \advance\pgf@yc by-5pt
   %construct main path
  \pgfpathmoveto{\pgfpoint{\pgf@xa}{\pgf@ya}}
  \pgfpathlineto{\pgfpoint{\pgf@xa}{\pgf@yc}}
  \pgfpathlineto{\pgfpoint{\pgf@xc}{\pgf@yb}}
  \pgfpathlineto{\pgfpoint{\pgf@xb}{\pgf@yb}}
  \pgfpathlineto{\pgfpoint{\pgf@xb}{\pgf@ya}}
  \pgfpathclose
   %add little corner
  \pgfpathmoveto{\pgfpoint{\pgf@xc}{\pgf@yb}}
  \pgfpathlineto{\pgfpoint{\pgf@xc}{\pgf@yc}}
  \pgfpathlineto{\pgfpoint{\pgf@xa}{\pgf@yc}}
  }
}
\makeatother

\begin{document}
\begin{tikzpicture}
  \node[document,
      draw,
      shade,top color=orange!80,
      inner sep=6pt
    ]{Remark};
\end{tikzpicture}
\end{document}

von sonada » Do 25. Sep 2014, 15:21

Wenn sich das noch dem Inhalt anpasst wäre das super. :)

von esdd » Do 25. Sep 2014, 14:42

Soll das sich das Ergebnis der Größe des Inhalts anpassen, also dem Text "Rechteck"? Oder möchtest Du eine Zeichnung mit bestimmten Abmessungen?

Gruß
Elke

Tikz: Viereck mit umgeknickter Ecke

von sonada » Do 25. Sep 2014, 13:23

Hi,

ich möchte gerne wie oben beschrieben ein Viereck malen. Dies soll aber an der linken oberen Ecke gefaltet sein, so dass die Spitze nach innen zeigt.

Rechtecke habe ich bisher mit so gezeichnet:
\node[rectangle, draw] (A) at (0,0) {Rechteck}
Kann mir jemand beschreiben, was ich da tun muss?
Vielen Dank schonmal.

Nach oben