#include <SkSVGRenderContext.h>
Definition at line 29 of file SkSVGRenderContext.h.
◆ LengthType
◆ SkSVGLengthContext()
SkSVGLengthContext::SkSVGLengthContext |
( |
const SkSize & |
viewport, |
|
|
SkScalar |
dpi = 90 |
|
) |
| |
|
inline |
◆ resolve()
Definition at line 54 of file SkSVGRenderContext.cpp.
54 {
57
61 return l.
value() * length_size_for_type(fViewport, t) / 100;
63 return l.
value() * fDPI * kCMMultiplier;
65 return l.
value() * fDPI * kMMMultiplier;
67 return l.
value() * fDPI * kINMultiplier;
69 return l.
value() * fDPI * kPTMultiplier;
71 return l.
value() * fDPI * kPCMultiplier;
72 default:
73 SkDebugf(
"unsupported unit type: <%d>\n", (
int)l.
unit());
74 return 0;
75 }
76}
void SK_SPI SkDebugf(const char format[],...) SK_PRINTF_LIKE(1
const Unit & unit() const
const SkScalar & value() const
◆ resolveRect()
Definition at line 78 of file SkSVGRenderContext.cpp.
79 {
85}
SkScalar resolve(const SkSVGLength &, LengthType) const
static constexpr SkRect MakeXYWH(float x, float y, float w, float h)
◆ setViewPort()
void SkSVGLengthContext::setViewPort |
( |
const SkSize & |
viewport | ) |
|
|
inline |
◆ viewPort()
const SkSize & SkSVGLengthContext::viewPort |
( |
| ) |
const |
|
inline |
The documentation for this class was generated from the following files: