mirror of
https://github.com/status-im/react-native.git
synced 2025-01-10 01:25:39 +00:00
608d1fb590
Summary: `fabric/graphics` provides graphics primitives; the implementation should be platform-specific eventually. Reviewed By: fkgozali Differential Revision: D7230675 fbshipit-source-id: ff05d2673072fad5ee6f331f0155561969e1a8b6
31 lines
655 B
C++
31 lines
655 B
C++
/**
|
|
* Copyright (c) 2015-present, Facebook, Inc.
|
|
*
|
|
* This source code is licensed under the MIT license found in the
|
|
* LICENSE file in the root directory of this source tree.
|
|
*/
|
|
|
|
#pragma once
|
|
|
|
#include <CoreGraphics/CoreGraphics.h>
|
|
#include <memory>
|
|
|
|
namespace facebook {
|
|
namespace react {
|
|
|
|
using Color = CGColor;
|
|
using SharedColor = std::shared_ptr<Color>;
|
|
|
|
struct ColorComponents {
|
|
float red {0};
|
|
float green {0};
|
|
float blue {0};
|
|
float alpha {0};
|
|
};
|
|
|
|
SharedColor colorFromComponents(float red, float green, float blue, float alpha);
|
|
ColorComponents colorComponentsFromColor(SharedColor color);
|
|
|
|
} // namespace react
|
|
} // namespace facebook
|