mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
493d616521
Summary: This diff creates the internal state of ART based on its shadow nodes changelog: [Internal] Reviewed By: JoshuaGross Differential Revision: D21657607 fbshipit-source-id: 0a15e90ee7465bf3a2b1001ff9d3198eb22fd708
32 lines
752 B
C++
32 lines
752 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 "ARTShapeShadowNode.h"
|
|
#include <Glog/logging.h>
|
|
#include <react/components/art/Shape.h>
|
|
namespace facebook {
|
|
namespace react {
|
|
|
|
extern const char ARTShapeComponentName[] = "ARTShape";
|
|
|
|
Element::Shared ARTShapeShadowNode::getElement() const {
|
|
auto props = getConcreteProps();
|
|
return std::make_shared<Shape>(
|
|
props.opacity,
|
|
props.transform,
|
|
props.d,
|
|
props.stroke,
|
|
props.strokeDash,
|
|
props.fill,
|
|
props.strokeWidth,
|
|
props.strokeCap,
|
|
props.strokeJoin);
|
|
}
|
|
|
|
} // namespace react
|
|
} // namespace facebook
|