Flutter Engine
The Flutter Engine
Public Member Functions | Public Attributes | List of all members
DWriteStyle Struct Reference

#include <SkDWrite.h>

Public Member Functions

 DWriteStyle (const SkFontStyle &pattern)
 

Public Attributes

DWRITE_FONT_WEIGHT fWeight
 
DWRITE_FONT_STRETCH fWidth
 
DWRITE_FONT_STYLE fSlant
 

Detailed Description

Definition at line 83 of file SkDWrite.h.

Constructor & Destructor Documentation

◆ DWriteStyle()

DWriteStyle::DWriteStyle ( const SkFontStyle pattern)
inlineexplicit

Definition at line 84 of file SkDWrite.h.

84 {
85 fWeight = (DWRITE_FONT_WEIGHT)pattern.weight();
86 fWidth = (DWRITE_FONT_STRETCH)pattern.width();
87 switch (pattern.slant()) {
88 case SkFontStyle::kUpright_Slant: fSlant = DWRITE_FONT_STYLE_NORMAL ; break;
89 case SkFontStyle::kItalic_Slant: fSlant = DWRITE_FONT_STYLE_ITALIC ; break;
90 case SkFontStyle::kOblique_Slant: fSlant = DWRITE_FONT_STYLE_OBLIQUE; break;
91 default: SkASSERT(false); break;
92 }
93 }
#define SkASSERT(cond)
Definition: SkAssert.h:116
Slant slant() const
Definition: SkFontStyle.h:64
int width() const
Definition: SkFontStyle.h:63
int weight() const
Definition: SkFontStyle.h:62
DWRITE_FONT_WEIGHT fWeight
Definition: SkDWrite.h:94
DWRITE_FONT_STRETCH fWidth
Definition: SkDWrite.h:95
DWRITE_FONT_STYLE fSlant
Definition: SkDWrite.h:96

Member Data Documentation

◆ fSlant

DWRITE_FONT_STYLE DWriteStyle::fSlant

Definition at line 96 of file SkDWrite.h.

◆ fWeight

DWRITE_FONT_WEIGHT DWriteStyle::fWeight

Definition at line 94 of file SkDWrite.h.

◆ fWidth

DWRITE_FONT_STRETCH DWriteStyle::fWidth

Definition at line 95 of file SkDWrite.h.


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