Flutter Engine
The Flutter Engine
Loading...
Searching...
No Matches
Classes | Namespaces | Functions
SlideDir.cpp File Reference
#include "tools/viewer/SlideDir.h"
#include "include/core/SkCanvas.h"
#include "include/core/SkColor.h"
#include "include/core/SkCubicMap.h"
#include "include/core/SkFont.h"
#include "include/core/SkMatrix.h"
#include "include/core/SkRect.h"
#include "include/core/SkString.h"
#include "include/core/SkTypeface.h"
#include "include/private/base/SkTPin.h"
#include "include/utils/SkTextUtils.h"
#include "modules/sksg/include/SkSGDraw.h"
#include "modules/sksg/include/SkSGGeometryNode.h"
#include "modules/sksg/include/SkSGGroup.h"
#include "modules/sksg/include/SkSGPaint.h"
#include "modules/sksg/include/SkSGPlane.h"
#include "modules/sksg/include/SkSGRect.h"
#include "modules/sksg/include/SkSGRenderNode.h"
#include "modules/sksg/include/SkSGScene.h"
#include "modules/sksg/include/SkSGText.h"
#include "modules/sksg/include/SkSGTransform.h"
#include "src/base/SkBitmaskEnum.h"
#include "tools/skui/InputState.h"
#include "tools/skui/ModifierKey.h"
#include "tools/timer/TimeUtils.h"
#include <cmath>
#include <utility>

Go to the source code of this file.

Classes

class  SlideDir::Animator
 
struct  SlideDir::Rec
 
class  SlideDir::FocusController
 

Namespaces

namespace  sksg
 

Functions

static sk_sp< sksg::RenderNodeMakeLabel (const SkString &txt, const SkPoint &pos, const SkMatrix &dstXform)
 

Function Documentation

◆ MakeLabel()

static sk_sp< sksg::RenderNode > MakeLabel ( const SkString txt,
const SkPoint pos,
const SkMatrix dstXform 
)
static

Definition at line 281 of file SlideDir.cpp.

283 {
284 const auto size = kLabelSize / std::sqrt(dstXform.getScaleX() * dstXform.getScaleY());
285 auto text = sksg::Text::Make(nullptr, txt);
287 text->setSize(size);
289 text->setPosition(pos + SkPoint::Make(0, size));
290
292}
SkPoint pos
constexpr SkColor SK_ColorBLACK
Definition SkColor.h:103
@ kAntiAlias
may have transparent pixels on glyph edges
SkScalar getScaleX() const
Definition SkMatrix.h:415
SkScalar getScaleY() const
Definition SkMatrix.h:422
static sk_sp< Color > Make(SkColor c)
Definition SkSGPaint.cpp:44
static sk_sp< Draw > Make(sk_sp< GeometryNode > geo, sk_sp< PaintNode > paint)
Definition SkSGDraw.h:35
static sk_sp< Text > Make(sk_sp< SkTypeface > tf, const SkString &text)
Definition SkSGText.cpp:21
static const int kLabelSize
Definition flippity.cpp:45
std::u16string text
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 constexpr SkPoint Make(float x, float y)