Flutter Engine
The Flutter Engine
Loading...
Searching...
No Matches
Public Member Functions | List of all members
skia::textlayout::StrutStyle Struct Reference

#include <ParagraphStyle.h>

Public Member Functions

 StrutStyle ()
 
const std::vector< SkString > & getFontFamilies () const
 
void setFontFamilies (std::vector< SkString > families)
 
SkFontStyle getFontStyle () const
 
void setFontStyle (SkFontStyle fontStyle)
 
SkScalar getFontSize () const
 
void setFontSize (SkScalar size)
 
void setHeight (SkScalar height)
 
SkScalar getHeight () const
 
void setLeading (SkScalar Leading)
 
SkScalar getLeading () const
 
bool getStrutEnabled () const
 
void setStrutEnabled (bool v)
 
bool getForceStrutHeight () const
 
void setForceStrutHeight (bool v)
 
bool getHeightOverride () const
 
void setHeightOverride (bool v)
 
void setHalfLeading (bool halfLeading)
 
bool getHalfLeading () const
 
bool operator== (const StrutStyle &rhs) const
 

Detailed Description

Definition at line 21 of file ParagraphStyle.h.

Constructor & Destructor Documentation

◆ StrutStyle()

skia::textlayout::StrutStyle::StrutStyle ( )

Definition at line 11 of file ParagraphStyle.cpp.

11 {
12 fFontStyle = SkFontStyle::Normal();
13 fFontSize = 14;
14 fHeight = 1;
15 fLeading = -1;
16 fForceHeight = false;
17 fHeightOverride = false;
18 fHalfLeading = false;
19 fEnabled = false;
20}
static constexpr SkFontStyle Normal()
Definition SkFontStyle.h:66

Member Function Documentation

◆ getFontFamilies()

const std::vector< SkString > & skia::textlayout::StrutStyle::getFontFamilies ( ) const
inline

Definition at line 24 of file ParagraphStyle.h.

24{ return fFontFamilies; }

◆ getFontSize()

SkScalar skia::textlayout::StrutStyle::getFontSize ( ) const
inline

Definition at line 30 of file ParagraphStyle.h.

30{ return fFontSize; }

◆ getFontStyle()

SkFontStyle skia::textlayout::StrutStyle::getFontStyle ( ) const
inline

Definition at line 27 of file ParagraphStyle.h.

27{ return fFontStyle; }

◆ getForceStrutHeight()

bool skia::textlayout::StrutStyle::getForceStrutHeight ( ) const
inline

Definition at line 42 of file ParagraphStyle.h.

42{ return fForceHeight; }

◆ getHalfLeading()

bool skia::textlayout::StrutStyle::getHalfLeading ( ) const
inline

Definition at line 49 of file ParagraphStyle.h.

49{ return fHalfLeading; }

◆ getHeight()

SkScalar skia::textlayout::StrutStyle::getHeight ( ) const
inline

Definition at line 34 of file ParagraphStyle.h.

34{ return fHeight; }

◆ getHeightOverride()

bool skia::textlayout::StrutStyle::getHeightOverride ( ) const
inline

Definition at line 45 of file ParagraphStyle.h.

45{ return fHeightOverride; }

◆ getLeading()

SkScalar skia::textlayout::StrutStyle::getLeading ( ) const
inline

Definition at line 37 of file ParagraphStyle.h.

37{ return fLeading; }

◆ getStrutEnabled()

bool skia::textlayout::StrutStyle::getStrutEnabled ( ) const
inline

Definition at line 39 of file ParagraphStyle.h.

39{ return fEnabled; }

◆ operator==()

bool skia::textlayout::StrutStyle::operator== ( const StrutStyle rhs) const
inline

Definition at line 51 of file ParagraphStyle.h.

51 {
52 return this->fEnabled == rhs.fEnabled &&
53 this->fHeightOverride == rhs.fHeightOverride &&
54 this->fForceHeight == rhs.fForceHeight &&
55 this->fHalfLeading == rhs.fHalfLeading &&
56 nearlyEqual(this->fLeading, rhs.fLeading) &&
57 nearlyEqual(this->fHeight, rhs.fHeight) &&
58 nearlyEqual(this->fFontSize, rhs.fFontSize) &&
59 this->fFontStyle == rhs.fFontStyle &&
60 this->fFontFamilies == rhs.fFontFamilies;
61 }
static bool nearlyEqual(SkScalar x, SkScalar y, SkScalar tolerance=SK_ScalarNearlyZero)
Definition TextStyle.h:31

◆ setFontFamilies()

void skia::textlayout::StrutStyle::setFontFamilies ( std::vector< SkString families)
inline

Definition at line 25 of file ParagraphStyle.h.

25{ fFontFamilies = std::move(families); }

◆ setFontSize()

void skia::textlayout::StrutStyle::setFontSize ( SkScalar  size)
inline

Definition at line 31 of file ParagraphStyle.h.

31{ fFontSize = size; }
it will be possible to load the file into Perfetto s trace viewer disable asset Prevents usage of any non test fonts unless they were explicitly Loaded via prefetched default font Indicates whether the embedding started a prefetch of the default font manager before creating the engine run In non interactive keep the shell running after the Dart script has completed enable serial On low power devices with low core running concurrent GC tasks on threads can cause them to contend with the UI thread which could potentially lead to jank This option turns off all concurrent GC activities domain network JSON encoded network policy per domain This overrides the DisallowInsecureConnections switch Embedder can specify whether to allow or disallow insecure connections at a domain level old gen heap size
Definition switches.h:259

◆ setFontStyle()

void skia::textlayout::StrutStyle::setFontStyle ( SkFontStyle  fontStyle)
inline

Definition at line 28 of file ParagraphStyle.h.

28{ fFontStyle = fontStyle; }

◆ setForceStrutHeight()

void skia::textlayout::StrutStyle::setForceStrutHeight ( bool  v)
inline

Definition at line 43 of file ParagraphStyle.h.

43{ fForceHeight = v; }

◆ setHalfLeading()

void skia::textlayout::StrutStyle::setHalfLeading ( bool  halfLeading)
inline

Definition at line 48 of file ParagraphStyle.h.

48{ fHalfLeading = halfLeading; }

◆ setHeight()

void skia::textlayout::StrutStyle::setHeight ( SkScalar  height)
inline

Definition at line 33 of file ParagraphStyle.h.

33{ fHeight = height; }
int32_t height

◆ setHeightOverride()

void skia::textlayout::StrutStyle::setHeightOverride ( bool  v)
inline

Definition at line 46 of file ParagraphStyle.h.

46{ fHeightOverride = v; }

◆ setLeading()

void skia::textlayout::StrutStyle::setLeading ( SkScalar  Leading)
inline

Definition at line 36 of file ParagraphStyle.h.

36{ fLeading = Leading; }

◆ setStrutEnabled()

void skia::textlayout::StrutStyle::setStrutEnabled ( bool  v)
inline

Definition at line 40 of file ParagraphStyle.h.

40{ fEnabled = v; }

The documentation for this struct was generated from the following files: