Files
react-native/ReactCommon/fabric/components/art/shape/ARTShapeProps.cpp
T
David Vacca 493d616521 Create internal State of ART based on Shadow Nodes
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
2020-05-21 00:11:50 -07:00

50 lines
1.5 KiB
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 <react/components/art/ARTShapeProps.h>
#include <Glog/logging.h>
#include <react/core/propsConversions.h>
namespace facebook {
namespace react {
ARTShapeProps::ARTShapeProps(
const ARTShapeProps &sourceProps,
const RawProps &rawProps)
: Props(sourceProps, rawProps),
opacity(convertRawProp(rawProps, "opacity", sourceProps.opacity, {1.0})),
transform(
convertRawProp(rawProps, "transform", sourceProps.transform, {})),
d(convertRawProp(rawProps, "d", sourceProps.d, {})),
stroke(convertRawProp(rawProps, "stroke", sourceProps.stroke, {})),
strokeDash(
convertRawProp(rawProps, "strokeDash", sourceProps.strokeDash, {})),
fill(convertRawProp(rawProps, "fill", sourceProps.fill, {})),
strokeWidth(convertRawProp(
rawProps,
"strokeWidth",
sourceProps.strokeWidth,
{1.0})),
strokeCap(
convertRawProp(rawProps, "strokeCap", sourceProps.strokeCap, {1})),
strokeJoin(
convertRawProp(rawProps, "strokeJoin", sourceProps.strokeJoin, {1})){
};
#pragma mark - DebugStringConvertible
#if RN_DEBUG_STRING_CONVERTIBLE
SharedDebugStringConvertibleList RawTextProps::getDebugProps() const {
return {debugStringConvertibleItem("opacity", opacity)};
}
#endif
} // namespace react
} // namespace facebook