8#ifndef ImGuiLayer_DEFINED
9#define ImGuiLayer_DEFINED
54 float availWidth =
std::max(ImGui::GetContentRegionAvailWidth(), 1.0f);
55 fPos = ImGui::GetCursorScreenPos();
56 fSize = ImVec2(availWidth, availWidth * aspect);
90 ImGui::SetCursorScreenPos(ImVec2(center.fX - 5, center.fY - 5));
91 ImGui::InvisibleButton(
"", ImVec2(10, 10));
93 if (ImGui::IsItemActive() && ImGui::IsMouseDragging(0)) {
95 ImGuiIO& io = ImGui::GetIO();
104 if (tooltip && ImGui::IsItemHovered()) {
105 ImGui::SetTooltip(
"x: %.3f\ny: %.3f",
p->fX,
p->fY);
static constexpr const T & SkTPin(const T &x, const T &lo, const T &hi)
bool onMouse(int x, int y, skui::InputState state, skui::ModifierKey modifiers) override
void onAttach(sk_app::Window *window) override
void onPaint(SkSurface *) override
void onPrePaint() override
bool onMouseWheel(float delta, int x, int y, skui::ModifierKey modifiers) override
std::function< void(SkCanvas *)> SkiaWidgetFunc
void setScaleFactor(float scaleFactor)
bool onKey(skui::Key key, skui::InputState state, skui::ModifierKey modifiers) override
void skiaWidget(const ImVec2 &size, SkiaWidgetFunc func)
bool onChar(SkUnichar c, skui::ModifierKey modifiers) override
bool setPolyToPoly(const SkPoint src[], const SkPoint dst[], int count)
void mapXY(SkScalar x, SkScalar y, SkPoint *result) const
Dart_NativeFunction function
static float max(float r, float g, float b)
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
skia_private::STArray< 4, ImVec2, true > fScreenPoints
void dragPoint(SkPoint *p, bool tooltip=false, ImU32 color=0xFFFFFFFF)
DragCanvas(const void *id, SkPoint tl={ 0.0f, 0.0f }, SkPoint br={ 1.0f, 1.0f }, float aspect=-1.0f)
void fillColor(ImU32 color)