Advertisement
Guest User

Untitled

a guest
Mar 4th, 2015
174
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.98 KB | None | 0 0
  1. documentclass{article}
  2. usepackage{tikz}
  3. usepackage{graphicx}
  4.  
  5. begin{document}
  6. begin{tikzpicture}
  7.  
  8. begin{scope}
  9. clip [rounded corners=.5cm] (0,0) rectangle coordinate (centerpoint) (5,7.5cm);
  10. node [inner sep=0pt] at (centerpoint) {includegraphics[width=6.0cm]{EiffelTall.jpg}};
  11. end{scope}
  12.  
  13. begin{scope}[xshift=7cm]
  14. clip [rounded corners=.5cm] (0,0) rectangle coordinate (centerpoint) ++(5cm,7.5cm);
  15. node [inner sep=0pt] at (centerpoint) {includegraphics[width=10.0cm]{EiffelTall.jpg}};
  16. end{scope}
  17.  
  18. end{tikzpicture}
  19. end{document}
  20.  
  21. documentclass{article}
  22. usepackage{tikz}
  23. usepackage{graphicx}
  24.  
  25. newcommand*{ClipSep}{0.4cm}%
  26.  
  27. begin{document}
  28. includegraphics[width=5.0cm]{images/EiffelTall.jpg}
  29. %
  30. begin{tikzpicture}
  31. node [inner sep=0pt] at (0,0) {includegraphics[width=5.0cm]{images/EiffelTall.jpg}};
  32. draw [white, rounded corners=ClipSep, line width=ClipSep]
  33. (current bounding box.north west) --
  34. (current bounding box.north east) --
  35. (current bounding box.south east) --
  36. (current bounding box.south west) -- cycle
  37. ;
  38. end{tikzpicture}
  39. end{document}
  40.  
  41. defM{3}% columns
  42. defN{3}% rows
  43. defscale{1}% scale
  44. deffilename{herbert}% filename
  45.  
  46. % Specify the cropping area.
  47. defL{-2}
  48. defB{-1.5}
  49. defR{2}
  50. defT{3}
  51.  
  52. documentclass[pstricks,border=12pt]{standalone}
  53.  
  54. defM{3}% columns
  55. defN{3}% rows
  56. defscale{1}% scale
  57. deffilename{herbert}% filename
  58.  
  59.  
  60. usepackage{graphicx}
  61. newsaveboxIBox
  62. saveboxIBox{includegraphics[scale=scale]{filename}}
  63.  
  64.  
  65. usepackage{pstricks}
  66. psset
  67. {
  68. xunit=0.5dimexprwdIBox/Mrelax,
  69. yunit=0.5dimexprhtIBox/Nrelax,
  70. }
  71.  
  72.  
  73.  
  74. begin{document}
  75.  
  76. % The following figure shows an image with a grid enabled.
  77. % Use the grid to find the cropping area.
  78. begin{pspicture}[showgrid=true](-M,-N)(M,N)
  79. rput(0,0){useboxIBox}
  80. end{pspicture}
  81.  
  82.  
  83. % Specify the cropping area.
  84.  
  85. defL{-2}
  86. defB{-1.5}
  87. defR{2}
  88. defT{3}
  89.  
  90. begin{pspicture}[showgrid=false](L,B)(R,T)
  91. begin{psclip}{psframe[linestyle=none,framearc=0.5,dimen=middle](L,B)(R,T)}
  92. rput(0,0){useboxIBox}
  93. end{psclip}
  94. end{pspicture}
  95. end{document}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement