Donner SVG main
0.8.0 ยท 382bd0190.8.0 main
SVG editor and embeddable C⁠+⁠+⁠20 engine.
Loading...
Searching...
No Matches
TextPathWarp.h File Reference
#include <algorithm>
#include <array>
#include <cmath>
#include <cstdint>
#include <limits>
#include <optional>
#include <utility>
#include "donner/base/BezierUtils.h"
#include "donner/base/Path.h"
#include "donner/base/Transform.h"
#include "donner/svg/text/TextTypes.h"
Include dependency graph for TextPathWarp.h:

Classes

class  donner::svg::text_path_warp_details::GeneralOutlineWarper

Namespaces

namespace  donner
 Top-level Donner namespace, which is split into different sub-namespaces such as donner::svg and donner::css.
namespace  donner::svg
 Donner SVG library, which can load, manipulate and render SVG files.

Functions

bool donner::svg::text_path_warp_details::InvalidSample (double distance, double length)
bool donner::svg::text_path_warp_details::FiniteOutline (const Path &outline)
bool donner::svg::text_path_warp_details::ValidMappedPointInput (const TextGlyph &glyph, const Vector2d &point)
bool donner::svg::text_path_warp_details::CrossesBoundary (double start, double end, double boundary)
Path::PointOnPath donner::svg::text_path_warp_details::SampleClosed (const StretchedTextPath &mapping, double distance, double length, Path::MeasuredPath::BoundarySide boundarySide)
Path::PointOnPath donner::svg::text_path_warp_details::SampleOpen (const StretchedTextPath &mapping, double distance, double length, Path::MeasuredPath::BoundarySide boundarySide)
Path::PointOnPath donner::svg::text_path_warp_details::Sample (const StretchedTextPath &mapping, double distance, Path::MeasuredPath::BoundarySide boundarySide=Path::MeasuredPath::BoundarySide::Incoming)
std::optional< Vector2d > donner::svg::text_path_warp_details::PointAtDistance (const StretchedTextPath &mapping, const TextGlyph &glyph, const Vector2d &point, double distance, Path::MeasuredPath::BoundarySide boundarySide=Path::MeasuredPath::BoundarySide::Incoming)
std::optional< Vector2d > donner::svg::text_path_warp_details::Point (const StretchedTextPath &mapping, const TextGlyph &glyph, const Vector2d &point, Path::MeasuredPath::BoundarySide boundarySide=Path::MeasuredPath::BoundarySide::Incoming)
bool donner::svg::text_path_warp_details::AppendTransformed (PathBuilder &builder, const Path::Command &command, std::span< const Vector2d > points, const Transform2d &textElementFromGlyphLocal)
Path donner::svg::text_path_warp_details::LinearOutline (const Path &outline, const StretchedTextPath &mapping, const TextGlyph &glyph)
Path donner::svg::text_path_warp_details::GeneralOutline (const Path &outline, const StretchedTextPath &mapping, const TextGlyph &glyph, double tolerance)
std::optional< Vector2d > donner::svg::MapTextPathPoint (const StretchedTextPath &mapping, const TextGlyph &glyph, const Vector2d &point)
 Map one glyph-local point through a stretched text-path placement.
Path donner::svg::WarpTextPathOutline (const Path &outline, const StretchedTextPath &mapping, const TextGlyph &glyph, double tolerance=kDefaultTextPathWarpTolerance)
 Warp glyph outline endpoints and control points along text-path perpendiculars.
Path donner::svg::PlaceStretchedTextPathOutline (Path outline, const TextRun &run, const TextGlyph &glyph, double tolerance=kDefaultTextPathWarpTolerance)
 Apply glyph-local authored rotation and the shared nonlinear text-path mapping.
Path donner::svg::PlaceStretchedTextPathCell (const TextRun &run, const TextGlyph &glyph, double emTop, double emBottom, double tolerance=kDefaultTextPathWarpTolerance)
 Build and place the full-font glyph cell for a stretched horizontal run.

Variables

constexpr size_t donner::svg::kMaximumTextPathWarpExpansion = 256u
constexpr double donner::svg::kDefaultTextPathWarpTolerance = 0.1