MCPcopy Create free account
hub / github.com/MyGUI/mygui / Projection

Class Projection

MyGUIEngine/src/msdfgen/core/Projection.h:9–35  ·  view source on GitHub ↗

A transformation from shape coordinates to pixel coordinates.

Source from the content-addressed store, hash-verified

7
8/// A transformation from shape coordinates to pixel coordinates.
9class Projection {
10
11public:
12 Projection();
13 Projection(const Vector2 &scale, const Vector2 &translate);
14 /// Converts the shape coordinate to pixel coordinate.
15 Point2 project(const Point2 &coord) const;
16 /// Converts the pixel coordinate to shape coordinate.
17 Point2 unproject(const Point2 &coord) const;
18 /// Converts the vector to pixel coordinate space.
19 Vector2 projectVector(const Vector2 &vector) const;
20 /// Converts the vector from pixel coordinate space.
21 Vector2 unprojectVector(const Vector2 &vector) const;
22 /// Converts the X-coordinate from shape to pixel coordinate space.
23 double projectX(double x) const;
24 /// Converts the Y-coordinate from shape to pixel coordinate space.
25 double projectY(double y) const;
26 /// Converts the X-coordinate from pixel to shape coordinate space.
27 double unprojectX(double x) const;
28 /// Converts the Y-coordinate from pixel to shape coordinate space.
29 double unprojectY(double y) const;
30
31private:
32 Vector2 scale;
33 Vector2 translate;
34
35};
36
37}

Callers 14

mainFunction · 0.85
generateSDFFunction · 0.85
generatePSDFFunction · 0.85
generatePseudoSDFFunction · 0.85
generateMSDFFunction · 0.85
generateMTSDFFunction · 0.85
generateMSDF_legacyFunction · 0.85
generateMTSDF_legacyFunction · 0.85
scanlineSDFFunction · 0.85
estimateSDFErrorFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected