Flutter Engine
The Flutter Engine
Loading...
Searching...
No Matches
Classes | Typedefs | Functions | Variables
TextBoxSlide.cpp File Reference
#include "include/core/SkCanvas.h"
#include "include/core/SkColorFilter.h"
#include "include/core/SkColorPriv.h"
#include "include/core/SkGraphics.h"
#include "include/core/SkPath.h"
#include "include/core/SkRegion.h"
#include "include/core/SkShader.h"
#include "include/core/SkStream.h"
#include "include/core/SkTextBlob.h"
#include "include/core/SkTypeface.h"
#include "include/effects/SkGradientShader.h"
#include "modules/skshaper/include/SkShaper.h"
#include "modules/skshaper/include/SkShaper_skunicode.h"
#include "modules/skunicode/include/SkUnicode.h"
#include "src/base/SkRandom.h"
#include "src/base/SkTime.h"
#include "src/base/SkUTF.h"
#include "src/core/SkOSFile.h"
#include "tools/fonts/FontToolUtils.h"
#include "tools/viewer/Slide.h"

Go to the source code of this file.

Classes

class  TextBoxSlide
 
class  ShaperSlide
 

Typedefs

typedef std::unique_ptr< SkShaper >(* ShaperFactory) ()
 
using MakeBidiIteratorCallback = std::unique_ptr< SkShaper::BiDiRunIterator >(*)(sk_sp< SkUnicode > unicode, const char *utf8, size_t utf8Bytes, uint8_t bidiLevel)
 
using MakeScriptRunCallback = std::unique_ptr< SkShaper::ScriptRunIterator >(*)(const char *utf8, size_t utf8Bytes, SkFourByteTag script)
 

Functions

static std::unique_ptr< SkShaper::BiDiRunIteratormake_trivial_bidi (sk_sp< SkUnicode >, const char *, size_t utf8Bytes, uint8_t bidiLevel)
 
static std::unique_ptr< SkShaper::ScriptRunIteratormake_trivial_script_runner (const char *, size_t utf8Bytes, SkFourByteTag scriptTag)
 
 DEF_SLIDE (return new TextBoxSlide(SkShapers::Primitive::PrimitiveText, make_trivial_bidi, make_trivial_script_runner, "primitive");)
 
 DEF_SLIDE (return new ShaperSlide;)
 

Variables

static const char gText []
 

Typedef Documentation

◆ MakeBidiIteratorCallback

using MakeBidiIteratorCallback = std::unique_ptr<SkShaper::BiDiRunIterator> (*)(sk_sp<SkUnicode> unicode, const char* utf8, size_t utf8Bytes, uint8_t bidiLevel)

Definition at line 80 of file TextBoxSlide.cpp.

◆ MakeScriptRunCallback

using MakeScriptRunCallback = std::unique_ptr<SkShaper::ScriptRunIterator> (*)( const char* utf8, size_t utf8Bytes, SkFourByteTag script)

Definition at line 84 of file TextBoxSlide.cpp.

◆ ShaperFactory

typedef std::unique_ptr< SkShaper >(* ShaperFactory) ()

Definition at line 49 of file TextBoxSlide.cpp.

Function Documentation

◆ DEF_SLIDE() [1/2]

DEF_SLIDE ( return new ShaperSlide )

◆ DEF_SLIDE() [2/2]

DEF_SLIDE ( return new TextBoxSlide(SkShapers::Primitive::PrimitiveText, make_trivial_bidi, make_trivial_script_runner, "primitive");  )

◆ make_trivial_bidi()

static std::unique_ptr< SkShaper::BiDiRunIterator > make_trivial_bidi ( sk_sp< SkUnicode ,
const char *  ,
size_t  utf8Bytes,
uint8_t  bidiLevel 
)
static

Definition at line 87 of file TextBoxSlide.cpp.

90 {
91 return std::make_unique<SkShaper::TrivialBiDiRunIterator>(bidiLevel, utf8Bytes);
92}

◆ make_trivial_script_runner()

static std::unique_ptr< SkShaper::ScriptRunIterator > make_trivial_script_runner ( const char *  ,
size_t  utf8Bytes,
SkFourByteTag  scriptTag 
)
static

Definition at line 106 of file TextBoxSlide.cpp.

107 {
108 return std::make_unique<SkShaper::TrivialScriptRunIterator>(scriptTag, utf8Bytes);
109}

Variable Documentation

◆ gText

const char gText[]
static
Initial value:
=
"When in the Course of human events it becomes necessary for one people "
"to dissolve the political bands which have connected them with another "
"and to assume among the powers of the earth, the separate and equal "
"station to which the Laws of Nature and of Nature's God entitle them, "
"a decent respect to the opinions of mankind requires that they should "
"declare the causes which impel them to the separation."

Definition at line 51 of file TextBoxSlide.cpp.