1 /* 2 * Copyright (c) 2022 Huawei Device Co., Ltd. 3 * Licensed under the Apache License, Version 2.0 (the "License"); 4 * you may not use this file except in compliance with the License. 5 * You may obtain a copy of the License at 6 * 7 * http://www.apache.org/licenses/LICENSE-2.0 8 * 9 * Unless required by applicable law or agreed to in writing, software 10 * distributed under the License is distributed on an "AS IS" BASIS, 11 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 * See the License for the specific language governing permissions and 13 * limitations under the License. 14 */ 15 16 #ifndef FOUNDATION_ACE_FRAMEWORKS_CORE_COMPONENTS_NG_RENDER_DRAWING_PROP_CONVERTOR_H 17 #define FOUNDATION_ACE_FRAMEWORKS_CORE_COMPONENTS_NG_RENDER_DRAWING_PROP_CONVERTOR_H 18 19 #include "base/geometry/ng/rect_t.h" 20 #include "base/geometry/ng/point_t.h" 21 #include "core/components/common/layout/constants.h" 22 #include "core/components/common/properties/color.h" 23 #include "core/components_ng/render/drawing.h" 24 #include "core/pipeline/pipeline_base.h" 25 26 namespace OHOS::Ace { 27 RSPoint ToRSPoint(const NG::PointF& point); 28 RSPen::CapStyle ToRSCapStyle(const LineCap& lineCap); 29 ACE_FORCE_EXPORT RSColor ToRSColor(const Color& color); 30 ACE_FORCE_EXPORT RSColor ToRSColor(const LinearColor& color); 31 RSRect ToRSRect(const NG::RectF& rect); 32 RSTextDirection ToRSTextDirection(const TextDirection& txtDir); 33 RSTextAlign ToRSTextAlign(const TextAlign& align); 34 RSWordBreakType ToRSWordBreakType(const WordBreak& wordBreak); 35 RSTextStyle ToRSTextStyle(const RefPtr<PipelineBase>& context, const TextStyle& textStyle); 36 RSTextDecoration ToRSTextDecoration(TextDecoration textDecoration); 37 RSFontWeight ToRSFontWeight(FontWeight fontWeight); 38 RSEllipsisMode ToRSEllipsisMode(EllipsisMode modal); 39 } // namespace OHOS::Ace 40 #endif // FOUNDATION_ACE_FRAMEWORKS_CORE_COMPONENTS_NG_RENDER_DRAWING_PROP_CONVERTOR_H 41