Flutter Engine
The Flutter Engine
Loading...
Searching...
No Matches
Public Member Functions | List of all members
ShaperSlide Class Reference
Inheritance diagram for ShaperSlide:
Slide SkRefCnt SkRefCntBase

Public Member Functions

 ShaperSlide ()
 
void draw (SkCanvas *canvas) override
 
- Public Member Functions inherited from Slide
virtual SkISize getDimensions () const
 
virtual void gpuTeardown ()
 
virtual bool animate (double nanos)
 
virtual void load (SkScalar winWidth, SkScalar winHeight)
 
virtual void resize (SkScalar winWidth, SkScalar winHeight)
 
virtual void unload ()
 
virtual bool onChar (SkUnichar c)
 
virtual bool onMouse (SkScalar x, SkScalar y, skui::InputState state, skui::ModifierKey modifiers)
 
virtual bool onGetControls (SkMetaData *)
 
virtual void onSetControls (const SkMetaData &)
 
const SkStringgetName ()
 
- Public Member Functions inherited from SkRefCntBase
 SkRefCntBase ()
 
virtual ~SkRefCntBase ()
 
bool unique () const
 
void ref () const
 
void unref () const
 

Additional Inherited Members

- Protected Attributes inherited from Slide
SkString fName
 

Detailed Description

Definition at line 249 of file TextBoxSlide.cpp.

Constructor & Destructor Documentation

◆ ShaperSlide()

ShaperSlide::ShaperSlide ( )
inline

Definition at line 251 of file TextBoxSlide.cpp.

251{ fName = "shaper"; }
SkString fName
Definition Slide.h:54

Member Function Documentation

◆ draw()

void ShaperSlide::draw ( SkCanvas canvas)
inlineoverridevirtual

Implements Slide.

Definition at line 253 of file TextBoxSlide.cpp.

253 {
254 canvas->translate(10, 30);
255
256 const char text[] = "world";
257
258 for (SkScalar size = 30; size <= 30; size += 10) {
259 this->drawTest(canvas,
260 text,
261 size,
262 SkShapers::Primitive::PrimitiveText(),
265 canvas->translate(0, size + 5);
266#if defined(SK_SHAPER_CORETEXT_AVAILABLE)
267 this->drawTest(canvas,
268 text,
269 size,
273#endif
274 canvas->translate(0, size + 5);
275#if defined(SK_SHAPER_HARFBUZZ_AVAILABLE) && defined(SK_SHAPER_UNICODE_AVAILABLE)
276 auto unicode = get_unicode();
277 this->drawTest(
278 canvas,
279 text,
280 size,
282 make_unicode_bidi,
283 make_harfbuzz_script_runner);
284#endif
285 canvas->translate(0, size*2);
286 }
287 }
static std::unique_ptr< SkShaper::ScriptRunIterator > make_trivial_script_runner(const char *, size_t utf8Bytes, SkFourByteTag scriptTag)
static std::unique_ptr< SkShaper::BiDiRunIterator > make_trivial_bidi(sk_sp< SkUnicode >, const char *, size_t utf8Bytes, uint8_t bidiLevel)
void translate(SkScalar dx, SkScalar dy)
static sk_sp< SkFontMgr > RefEmpty()
float SkScalar
Definition extension.cpp:12
std::u16string text
SKSHAPER_API std::unique_ptr< SkShaper > CoreText()
SKSHAPER_API std::unique_ptr< SkShaper > ShaperDrivenWrapper(sk_sp< SkUnicode > unicode, sk_sp< SkFontMgr > fallback)
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
static sk_sp< SkUnicode > get_unicode()

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