How do I achieve this in simple TikZ commands?
i assume that this image is some illustration, so the exact coordinates of is not the most important and can be later adjusted by trial. drawing straight lines is simple, for the curved lines i suggest to use controls
macro:
(<coordinate 1>) .. controls + (<control point 1>)
and + (<control point 2>) .. (<coordinate 2>)
where sign +
denote relative position to coordinates.
\documentclass[tikz,margin=0pt]{standalone}
\definecolor{curcolor}{rgb}{0,0.18,0.39}
\begin{document}
\begin{tikzpicture}
\fill[curcolor]
(0,0) -| (12,-1.2)
.. controls ++ (-0.5,0.1) and ++ (1,0) .. (10,-1)
.. controls ++ (-3,0) and ++ (4,1) .. (0,-5) -- cycle;
\path(0,0) rectangle + (12,-8);% if needed
\end{tikzpicture}
\end{document}
The PSTricks export from Inkscape is crap!
\documentclass{standalone}
\usepackage{pstricks}
\definecolor{curcolor}{rgb}{0.0,0.18,0.39}
\begin{document}
\psset{unit=.5pt}
\begin{pspicture}(1122,793)
\pscustom[linestyle=none,fillstyle=solid,fillcolor=curcolor]{
\psline(0,435)(0,791)(1124,791)(1124,713)(1122,713)
\psbezier(1110,714)(1095,715)(1047,720)(1031,720)%
(895,720)(854,715)(798,709)(761,702)(705,688)(627,668)(567,645)(430,586)%
(335,545)(298,530)(255,513)(195,490)(135,470)(75,453)(48,445)(8,435)(0,435)}
\end{pspicture}
\qquad
\begin{pspicture}(1122,793)
\newrgbcolor{curcolor}{0.0 0.18 0.39}
\pscustom[linestyle=none,fillstyle=solid,fillcolor=curcolor]{
\psline(0,435)(0,791)(1124,791)(1124,713)(1122,713)
\pscurve(854,715)(627,668)(430,586)(335,545)(255,513)(135,470)(0,435)}
\end{pspicture}
\end{document}
This answer does not try to improve the shape, but explains the translation from pstricks
to TikZ:
The dimensions do not need to be specified, in many cases TikZ can calculate the bounding box from the elements on in the picture.
The color can be defined with the
color
(orxcolor
) package:\definecolor{curcolor}{rgb}{0, .18, .39}
The units settings
\psset{xunit=.5pt,yunit=.5pt,runit=.5pt}
can be done with options
x
andy
,runit
is not used:\begin{tikzpicture}[x=.5pt, y=.5pt]
A path is filled by
\path[fill=curcolor] ...;
or shorter:\fill[curcolor] ...;
Solid fill is the default. A line is not drawn unless
draw
is added. This covers:\pscustom[linestyle=none,fillstyle=solid,fillcolor=curcolor]{ \newpath ... }
\moveto(12, 34)
is implicitly done by specifying a coordinate:(12, 34)
\lineto(56, 78)
becomes:-- (56, 78)
\curveto(1, 2)(3, 4)(5, 6)
is specified bycontrols
(see Zarko's answer). The first two points are the control points:.. controls (1, 2) and (3, 4) .. (5, 6)
\closepath
:-- cycle
Full example:
\documentclass{standalone}
\usepackage{tikz}
\usepackage{xcolor}
\definecolor{curcolor}{rgb}{0, .18, .39}
\begin{document}
\begin{tikzpicture}[x=.5pt, y=.5pt]
\fill[curcolor]
(0.21430135,613.28571969)
-- (0.21430135,791.28569953)
-- (564.28569449,791.28569953)
-- (1124.35710236,791.28569953)
-- (1124.35710236,752.28569953)
.. controls (1124.35710236,726.58745197) and (1124.0120315,713.28570709)
.. (1123.34551181,713.28570709)
.. controls (1122.78901417,713.28570709) and (1110.33327874,714.38343307)
.. (1095.66610394,715.72512756)
.. controls (1047.23973543,720.15496063) and (1031.79420472,720.78568819)
.. (971.7463937,720.78568819)
.. controls (911.02805669,720.78568819) and (895.60410709,720.11690079)
.. (854.04661417,715.68215433)
.. controls (798.76191496,709.78253858) and (761.94504567,702.99148346)
.. (705.42568819,688.26837165)
.. controls (627.87208819,668.06585197) and (567.87405354,645.8808189)
.. (430.12792441,586.47367559)
.. controls (335.62666583,545.71717795) and (298.91214614,530.42936693)
.. (255.39842646,513.7168252)
.. controls (195.55985008,490.73431181) and (135.52230803,470.60330079)
.. (75.53238803,453.40648819)
.. controls (48.22059969,445.57723465) and (8.88333846,435.28569449)
.. (6.26950677,435.28569449)
-- (0.21430135,435.28569449)
-- cycle
;
\end{tikzpicture}
\end{document}