mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
b8b683dc46
Summary: This diff implements the serialization of Text components to send data from C++ to java changelog: [Internal] internal changes to support ART in fabric Reviewed By: JoshuaGross Differential Revision: D21681875 fbshipit-source-id: eba31f35c95e0a2d3226ec70421832719083d7fa
35 lines
789 B
C++
35 lines
789 B
C++
/*
|
|
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
*
|
|
* This source code is licensed under the MIT license found in the
|
|
* LICENSE file in the root directory of this source tree.
|
|
*/
|
|
|
|
#include "ARTTextShadowNode.h"
|
|
#include <Glog/logging.h>
|
|
#include <react/components/art/Text.h>
|
|
|
|
namespace facebook {
|
|
namespace react {
|
|
|
|
extern const char ARTTextComponentName[] = "ARTText";
|
|
|
|
Element::Shared ARTTextShadowNode::getElement() const {
|
|
auto props = getConcreteProps();
|
|
return std::make_shared<Text>(
|
|
props.opacity,
|
|
props.transform,
|
|
props.d,
|
|
props.stroke,
|
|
props.strokeDash,
|
|
props.fill,
|
|
props.strokeWidth,
|
|
props.strokeCap,
|
|
props.strokeJoin,
|
|
props.alignment,
|
|
props.frame);
|
|
}
|
|
|
|
} // namespace react
|
|
} // namespace facebook
|