|
typeset 0.1.0
縦書き・横書きの日本語組版ライブラリ(JLReq 水準、ラスタ / PDF / SVG)
|
パス(moveTo / lineTo / quadTo / cubicTo / close) [詳解]
#include <typeset/geom.hpp>
公開型 | |
| enum class | Cmd : uint8_t { Move , Line , Quad , Cubic , Close } |
公開メンバ関数 | |
| bool | empty () const |
| void | moveTo (Pt x, Pt y) |
| void | lineTo (Pt x, Pt y) |
| void | quadTo (Pt cx, Pt cy, Pt x, Pt y) |
| void | cubicTo (Pt c1x, Pt c1y, Pt c2x, Pt c2y, Pt x, Pt y) |
| void | close () |
| void | addRect (const Rect &r) |
| void | addEllipse (const Rect &r) |
| 楕円(矩形に内接)を 4 本の 3 次ベジェで近似 | |
| void | addLine (Point a, Point b) |
| Path | transformed (const Matrix &m) const |
| Rect | controlBounds () const |
| 制御点を含むバウンディングボックス | |
公開変数類 | |
| std::vector< Cmd > | cmds |
| std::vector< Point > | pts |
パス(moveTo / lineTo / quadTo / cubicTo / close)
pts は Cmd ごとに Move:1 Line:1 Quad:2 Cubic:3 Close:0 個消費する。
|
strong |
| void typeset::Path::addRect | ( | const Rect & | r | ) |
| void typeset::Path::addEllipse | ( | const Rect & | r | ) |
楕円(矩形に内接)を 4 本の 3 次ベジェで近似
| Rect typeset::Path::controlBounds | ( | ) | const |
制御点を含むバウンディングボックス
| std::vector<Cmd> typeset::Path::cmds |
| std::vector<Point> typeset::Path::pts |