slot 0.0.1
A real time UI render framework
载入中...
搜索中...
未找到
PixelGrid.h
浏览该文件的文档.
1/*
2 * Copyright (c) Meta Platforms, Inc. and affiliates.
3 *
4 * This source code is licensed under the MIT license found in the
5 * LICENSE file in the root directory of this source tree.
6 */
7
8#pragma once
9
10#include <yoga/Yoga.h>
11#include <yoga/node/Node.h>
12
13namespace facebook::yoga {
14
15// Round a point value to the nearest physical pixel based on DPI
16// (pointScaleFactor)
18 double value,
19 double pointScaleFactor,
20 bool forceCeil,
21 bool forceFloor);
22
23// Round the layout results of a node and its subtree to the pixel grid.
25 yoga::Node* node,
26 double absoluteLeft,
27 double absoluteTop);
28
29} // namespace facebook::yoga
Definition Benchmark.cpp:19
void roundLayoutResultsToPixelGrid(yoga::Node *const node, const double absoluteLeft, const double absoluteTop)
Definition PixelGrid.cpp:65
float roundValueToPixelGrid(const double value, const double pointScaleFactor, const bool forceCeil, const bool forceFloor)
Definition PixelGrid.cpp:15