Files
react-native/ReactCommon/fabric/components/art/text/ARTTextShadowNode.cpp
T
David Vacca b8b683dc46 Serialize ART text components and send data to Android
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
2020-05-22 01:23:36 -07:00

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