g8-parser

Crates.iog8-parser
lib.rsg8-parser
version0.0.0
sourcesrc
created_at2022-03-31 15:36:58.697473
updated_at2022-03-31 15:36:58.697473
description...
homepage
repositoryhttps://github.com/oovm/g8-lang
max_upload_size
id559670
size2,934
SasakiSaki (oovm)

documentation

http://docs.rs/tikz

README

Tikz 对照表

线段

\draw (1,3)--(2,2)--(4,5);
\draw[rounded corners] (1,3)--(2,2)--(4,5);
\draw (1,3)--(2,2)--(4,5)--cycle;
polyline(
    [(1, 3), (2, 2), (4, 5)],
    rounded : true,
    circle : true,
);

矩形, 正方形

\draw[rounded corners] (0,0) rectangle (4,2);
rectangle(
    (0, 0), (2, 2),
    rounded: 0.1,
    circle: true,
);

椭圆,园,圆弧

\draw (1, 1) circle (1);
\draw (1, 1) ellipse (2 and 1);
\draw (1 ,1) arc (0:270:1);
\draw (1 ,1) arc (0:270:2 and 1);
circle((1, 1), 1);
ellipse((1, 1), 2, 1);
circle((1, 1), 1, range: (0deg, 270deg));
ellipse((1, 1), 2, 1, range: (0deg, 270deg));

曲线

\draw (5,1) parabola bend (6,0) (7.414 ,2);
parabola(
    (5, 1),
    (6, 0),
    (7.414, 2),
);

网格

\draw [step=20pt] (0,0) grid (3,2);
\draw [help lines ,step=20pt] (4,0) grid (7,2);
\begin{tikzpicture}
\filldraw [gray] (0,0) circle [radius=2pt]
(1,1) circle [radius=2pt]
(2,1) circle [radius=2pt]
(2,0) circle [radius=2pt];
\draw (0,0) .. controls (1,1) and (2,1) .. (2,0);
\end{tikzpicture}

Circle::from_3_points() Circle::from_2_points() Circle::from_point_radius()

new Circle( (0, 0), 2, fill: true, fillColor: .gray, stroke: true, strokeColor: .black, strokeWidth: 1, controls: [(1, 1), (2, 1), (2, 0)], );

Commit count: 1

cargo fmt