typeset 0.1.0
縦書き・横書きの日本語組版ライブラリ(JLReq 水準、ラスタ / PDF / SVG)
読み取り中…
検索中…
一致する文字列を見つけられません
geom.hpp ファイル
#include <algorithm>
#include <cmath>
#include <cstdint>
#include <vector>

[ソースコード]

クラス

struct  typeset::Point
 
struct  typeset::Size
 
struct  typeset::Rect
 
struct  typeset::Mat2
 2x2 行列(平行移動なし)。グリフ固有の変形に使う。 x' = xx*x + xy*y y' = yx*x + yy*y [詳解]
 
struct  typeset::Matrix
 2x3 アフィン行列(行優先) x' = xx*x + xy*y + dx y' = yx*x + yy*y + dy [詳解]
 
struct  typeset::Color
 色(非前乗算 RGBA) [詳解]
 
struct  typeset::GradientStop
 グラデーションの停止点 [詳解]
 
struct  typeset::Paint
 塗り — 単色または線形/放射グラデーション [詳解]
 
struct  typeset::Stroke
 線の描き方 [詳解]
 
struct  typeset::Path
 パス(moveTo / lineTo / quadTo / cubicTo / close) [詳解]
 

名前空間

namespace  typeset
 geom — 単位と幾何
 

型定義

using typeset::Pt = float
 

列挙型

enum class  typeset::PaintKind : uint8_t { typeset::Solid , typeset::Linear , typeset::Radial }
 
enum class  typeset::PaintUnits : uint8_t { typeset::BoundingBox , typeset::UserSpace }
 グラデーションの座標系 [詳解]
 
enum class  typeset::StrokeJoin : uint8_t { typeset::Miter , typeset::Round , typeset::Bevel }
 
enum class  typeset::StrokeCap : uint8_t { typeset::Butt , typeset::Round , typeset::Square }
 

関数

Matrix typeset::multiply (const Matrix &a, const Matrix &b)
 a を後から適用する合成(結果 = a ∘ b。b で写してから a)
 
Mat2 typeset::multiply (const Mat2 &a, const Mat2 &b)
 
Matrix typeset::invert (const Matrix &m, bool *ok=nullptr)
 逆行列。特異なら単位行列を返し ok=false
 
std::vector< std::vector< Point > > typeset::flattenPath (const Path &path, float tolerance, std::vector< bool > *closedFlags=nullptr)
 曲線を折れ線に平坦化した閉/開多角形列を得る(tolerance は pt)
 

変数

constexpr Pt typeset::kInch = 72.0f
 
constexpr Pt typeset::kMm = 72.0f / 25.4f
 
constexpr Pt typeset::kCm = kMm * 10.0f