|
typeset 0.1.0
縦書き・横書きの日本語組版ライブラリ(JLReq 水準、ラスタ / PDF / SVG)
|
塗り — 単色または線形/放射グラデーション [詳解]
#include <typeset/geom.hpp>
公開メンバ関数 | |
| Paint ()=default | |
| Paint (Color c) | |
| bool | isGradient () const |
| Color | at (float t) const |
| t(0〜1)の色。停止点の間を線形補間する | |
| Color | solid () const |
| 単色として扱うときの色(グラデーションは中間の色) | |
| uint8_t | maxAlpha () const |
| 不透明度の代表値(グラデーションは最大) | |
| bool | operator== (const Paint &o) const |
| bool | operator!= (const Paint &o) const |
静的公開メンバ関数 | |
| static Paint | linear (Point from, Point to, std::vector< GradientStop > stops, PaintUnits units=PaintUnits::BoundingBox) |
| static Paint | radial (Point center, float radius, std::vector< GradientStop > stops, PaintUnits units=PaintUnits::BoundingBox) |
公開変数類 | |
| PaintKind | kind = PaintKind::Solid |
| Color | color {0, 0, 0, 255} |
| Solid のときの色 | |
| PaintUnits | units = PaintUnits::BoundingBox |
| Point | start |
| Linear: 始点/Radial: 中心 | |
| Point | end {1.0f, 0.0f} |
| Linear: 終点 | |
| float | radius = 0.5f |
| Radial: 半径 | |
| std::vector< GradientStop > | stops |
| offset の昇順 | |
塗り — 単色または線形/放射グラデーション
Color から暗黙に作れるので、単色のときは今までどおり色を代入すればよい。 PDF は停止点ごとの不透明度を持てないので、最大の不透明度を全体に掛ける(ラスタ・SVG は停止点ごと)
|
default |
|
inlinestatic |
|
inlinestatic |
|
inline |
|
inline |
t(0〜1)の色。停止点の間を線形補間する
参照先 typeset::Color::a, typeset::Color::b, typeset::GradientStop::color, color, typeset::Color::g, typeset::GradientStop::offset, typeset::Color::r, stops.
参照元 solid().
|
inline |
|
inline |
|
inline |
| PaintKind typeset::Paint::kind = PaintKind::Solid |
参照元 isGradient(), linear(), operator==(), radial().
| Color typeset::Paint::color {0, 0, 0, 255} |
| PaintUnits typeset::Paint::units = PaintUnits::BoundingBox |
参照元 linear(), operator==(), radial().
| Point typeset::Paint::start |
| Point typeset::Paint::end {1.0f, 0.0f} |
| float typeset::Paint::radius = 0.5f |
| std::vector<GradientStop> typeset::Paint::stops |
offset の昇順
参照元 at(), isGradient(), linear(), maxAlpha(), operator==(), radial().