答案1
尽管有一种方法可以在图像上绘图,但是,如果您拥有所有细节,那么直接绘制图表要简单得多,就您的情况而言,我认为您拥有这些细节。绘制图表很简单,并且可以通过 Tikz 轻松完成。这是以下代码的结果
\documentclass[border={10pt}]{standalone}
\usepackage{tikz}
\begin{document}
\begin{tikzpicture}
\draw[very thick,rounded corners]
(-.2,.2) -- (8.2,0.2) -- (8.2,-1.2) -- (7.2,-2.2) -- (0.8,-2.2) -- (-.2,-1.2) -- cycle;
\draw[thin,rounded corners]
(-.1,.1) -- (8.1,0.1) -- (8.1,-1.1) -- (7.1,-2.1) -- (0.9,-2.1) -- (-.1,-1.1) -- cycle;
\fill[gray!20, draw=black, very thick,rounded corners]
(0,0) -- (8,0) -- (8,-1) -- (7,-2) -- (1,-2) -- (0,-1) -- cycle;
\draw[thick] (2,.2) -- ( 2.1,.28) -- (2.4,.28) -- (2.5,.2);
\draw[thick] (3.75,.2) -- ( 3.85,.28) -- (4.15,.28) -- (4.25,.2);
\draw[thick] (6,.2) -- ( 5.9,.28) -- (5.6,.28) -- (5.5,.2);
\filldraw[fill=white, draw=black] (2,-.01) rectangle (6,-1);
\filldraw[fill=white, draw=black] (1,.9) rectangle (1.6,0.22);
\filldraw[fill=white, draw=black] (6.4,.9) rectangle (7,0.22);
\filldraw[fill=yellow, draw=black] (2.2,-.5) rectangle node[yshift=1.6cm]{\Large 5} (2.6,-1.3) ;
\filldraw[fill=white, draw=black] (2.2,-1.3) rectangle (2.6,-1.6);
\filldraw[fill=yellow, draw=black] (3.0,-.5) rectangle node[yshift=1.6cm]{\Large 4} (3.4,-1.3);
\filldraw[fill=white, draw=black] (3.0,-1.3) rectangle (3.4,-1.6);
\filldraw[fill=yellow, draw=black] (3.8,-.5) rectangle node[yshift=1.6cm]{\Large 3} (4.2,-1.3);
\filldraw[fill=white, draw=black] (3.8,-1.3) rectangle (4.2,-1.6);
\filldraw[fill=yellow, draw=black] (4.6,-.5) rectangle node[yshift=1.6cm]{\Large 2}(5.0,-1.3);
\filldraw[fill=white, draw=black] (4.6,-1.3) rectangle (5.0,-1.6);
\filldraw[fill=yellow, draw=black] (5.4,-.5) rectangle node[yshift=1.6cm]{\Large 1} (5.8,-1.3);
\filldraw[fill=white, draw=black] (5.4,-1.3) rectangle (5.8,-1.6);
\node at (4,-2.8) {\textbf{Micro USB Male connector}};
\end{tikzpicture}
\end{document}