Flutter Engine
The Flutter Engine
Functions
line_metrics.cpp File Reference
#include "../export.h"
#include "third_party/skia/modules/skparagraph/include/Paragraph.h"

Go to the source code of this file.

Functions

SKWASM_EXPORT LineMetricslineMetrics_create (bool hardBreak, double ascent, double descent, double unscaledAscent, double height, double width, double left, double baseline, size_t lineNumber)
 
SKWASM_EXPORT void lineMetrics_dispose (LineMetrics *metrics)
 
SKWASM_EXPORT bool lineMetrics_getHardBreak (LineMetrics *metrics)
 
SKWASM_EXPORT SkScalar lineMetrics_getAscent (LineMetrics *metrics)
 
SKWASM_EXPORT SkScalar lineMetrics_getDescent (LineMetrics *metrics)
 
SKWASM_EXPORT SkScalar lineMetrics_getUnscaledAscent (LineMetrics *metrics)
 
SKWASM_EXPORT SkScalar lineMetrics_getHeight (LineMetrics *metrics)
 
SKWASM_EXPORT SkScalar lineMetrics_getWidth (LineMetrics *metrics)
 
SKWASM_EXPORT SkScalar lineMetrics_getLeft (LineMetrics *metrics)
 
SKWASM_EXPORT SkScalar lineMetrics_getBaseline (LineMetrics *metrics)
 
SKWASM_EXPORT int lineMetrics_getLineNumber (LineMetrics *metrics)
 
SKWASM_EXPORT size_t lineMetrics_getStartIndex (LineMetrics *metrics)
 
SKWASM_EXPORT size_t lineMetrics_getEndIndex (LineMetrics *metrics)
 

Function Documentation

◆ lineMetrics_create()

SKWASM_EXPORT LineMetrics * lineMetrics_create ( bool  hardBreak,
double  ascent,
double  descent,
double  unscaledAscent,
double  height,
double  width,
double  left,
double  baseline,
size_t  lineNumber 
)

Definition at line 10 of file line_metrics.cpp.

18 {
19 auto metrics = new LineMetrics();
20 metrics->fHardBreak = hardBreak;
21 metrics->fAscent = ascent;
22 metrics->fDescent = descent;
23 metrics->fUnscaledAscent = unscaledAscent;
24 metrics->fHeight = height;
25 metrics->fWidth = width;
26 metrics->fLeft = left;
27 metrics->fBaseline = baseline;
28 metrics->fLineNumber = lineNumber;
29 return metrics;
30}
static bool left(const SkPoint &p0, const SkPoint &p1)
int32_t height
int32_t width

◆ lineMetrics_dispose()

SKWASM_EXPORT void lineMetrics_dispose ( LineMetrics metrics)

Definition at line 32 of file line_metrics.cpp.

32 {
33 delete metrics;
34}

◆ lineMetrics_getAscent()

SKWASM_EXPORT SkScalar lineMetrics_getAscent ( LineMetrics metrics)

Definition at line 40 of file line_metrics.cpp.

40 {
41 return metrics->fAscent;
42}

◆ lineMetrics_getBaseline()

SKWASM_EXPORT SkScalar lineMetrics_getBaseline ( LineMetrics metrics)

Definition at line 64 of file line_metrics.cpp.

64 {
65 return metrics->fBaseline;
66}

◆ lineMetrics_getDescent()

SKWASM_EXPORT SkScalar lineMetrics_getDescent ( LineMetrics metrics)

Definition at line 44 of file line_metrics.cpp.

44 {
45 return metrics->fDescent;
46}

◆ lineMetrics_getEndIndex()

SKWASM_EXPORT size_t lineMetrics_getEndIndex ( LineMetrics metrics)

Definition at line 76 of file line_metrics.cpp.

76 {
77 return metrics->fEndIndex;
78}

◆ lineMetrics_getHardBreak()

SKWASM_EXPORT bool lineMetrics_getHardBreak ( LineMetrics metrics)

Definition at line 36 of file line_metrics.cpp.

36 {
37 return metrics->fHardBreak;
38}

◆ lineMetrics_getHeight()

SKWASM_EXPORT SkScalar lineMetrics_getHeight ( LineMetrics metrics)

Definition at line 52 of file line_metrics.cpp.

52 {
53 return metrics->fHeight;
54}

◆ lineMetrics_getLeft()

SKWASM_EXPORT SkScalar lineMetrics_getLeft ( LineMetrics metrics)

Definition at line 60 of file line_metrics.cpp.

60 {
61 return metrics->fLeft;
62}

◆ lineMetrics_getLineNumber()

SKWASM_EXPORT int lineMetrics_getLineNumber ( LineMetrics metrics)

Definition at line 68 of file line_metrics.cpp.

68 {
69 return metrics->fLineNumber;
70}

◆ lineMetrics_getStartIndex()

SKWASM_EXPORT size_t lineMetrics_getStartIndex ( LineMetrics metrics)

Definition at line 72 of file line_metrics.cpp.

72 {
73 return metrics->fStartIndex;
74}

◆ lineMetrics_getUnscaledAscent()

SKWASM_EXPORT SkScalar lineMetrics_getUnscaledAscent ( LineMetrics metrics)

Definition at line 48 of file line_metrics.cpp.

48 {
49 return metrics->fUnscaledAscent;
50}

◆ lineMetrics_getWidth()

SKWASM_EXPORT SkScalar lineMetrics_getWidth ( LineMetrics metrics)

Definition at line 56 of file line_metrics.cpp.

56 {
57 return metrics->fWidth;
58}