• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright (c) 2022-2023 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_H
17 #define FOUNDATION_ACE_FRAMEWORKS_CORE_COMPONENTS_NG_RENDER_DRAWING_H
18 
19 #ifndef ACE_UNITTEST
20 #include "draw/canvas.h"
21 #include "draw/shadow.h"
22 #include "drawing/engine_adapter/skia_adapter/skia_canvas.h"
23 #include "drawing/engine_adapter/skia_adapter/skia_path.h"
24 #include "image/image.h"
25 #ifdef USE_ROSEN_DRAWING
26 #include "recording/recording_canvas.h"
27 #include "recording/recording_color_filter.h"
28 #include "recording/recording_color_space.h"
29 #include "recording/recording_image_filter.h"
30 #include "recording/recording_mask_filter.h"
31 #include "recording/recording_path_effect.h"
32 #include "recording/recording_path.h"
33 #include "recording/recording_region.h"
34 #include "recording/recording_shader_effect.h"
35 #endif
36 #include "rosen_text/properties/text_style.h"
37 #include "rosen_text/ui/font_collection.h"
38 #include "rosen_text/ui/typography.h"
39 #include "rosen_text/ui/typography_create.h"
40 #include "utils/camera3d.h"
41 #include "utils/point3.h"
42 #include "utils/scalar.h"
43 
44 namespace OHOS::Ace {
45 namespace RSDrawing = Rosen::Drawing;
46 using RSCanvas = Rosen::Drawing::Canvas;
47 using RSImage = Rosen::Drawing::Image;
48 using RSBrush = Rosen::Drawing::Brush;
49 using RSFilter = Rosen::Drawing::Filter;
50 using RSColorFilter = Rosen::Drawing::ColorFilter;
51 using RSColorMatrix = Rosen::Drawing::ColorMatrix;
52 using RSPen = Rosen::Drawing::Pen;
53 using RSColor = Rosen::Drawing::Color;
54 using RSRect = Rosen::Drawing::RectF;
55 using RSRoundRect = Rosen::Drawing::RoundRect;
56 using RSRRect = Rosen::Drawing::Rect;
57 using RSPoint = Rosen::Drawing::PointF;
58 using RSRPoint = Rosen::Drawing::Point;
59 using RSPoint3 = Rosen::Drawing::Point3;
60 using RSShadowFlags = Rosen::Drawing::ShadowFlags;
61 using RSBlendMode = Rosen::Drawing::BlendMode;
62 using RSSamplingOptions = Rosen::Drawing::SamplingOptions;
63 using RSRoundRect = Rosen::Drawing::RoundRect;
64 using RSPath = Rosen::Drawing::Path;
65 using RSPathOp = Rosen::Drawing::PathOp;
66 using RSBitmap = Rosen::Drawing::Bitmap;
67 using RSBitmapFormat = Rosen::Drawing::BitmapFormat;
68 using RSColorType = Rosen::Drawing::ColorType;
69 using RSAlphaType = Rosen::Drawing::AlphaType;
70 using RSScalar = Rosen::Drawing::scalar;
71 using RSClipOp = Rosen::Drawing::ClipOp;
72 using RSSkCanvas = Rosen::Drawing::SkiaCanvas;
73 using RSMatrix = Rosen::Drawing::Matrix;
74 using RSCamera3D = Rosen::Drawing::Camera3D;
75 using RSMaskFilter = Rosen::Drawing::MaskFilter;
76 using RSBlurType = Rosen::Drawing::BlurType;
77 using RSPathFillType = Rosen::Drawing::PathFillType;
78 using RSSkPath = Rosen::Drawing::SkiaPath;
79 using RSColorQuad = Rosen::Drawing::ColorQuad;
80 using RSShaderEffect = Rosen::Drawing::ShaderEffect;
81 using RSTileMode = Rosen::Drawing::TileMode;
82 #ifdef USE_ROSEN_DRAWING
83 using RSAutoCanvasRestore = Rosen::Drawing::AutoCanvasRestore;
84 using RSCubicResampler = Rosen::Drawing::CubicResampler;
85 using RSColorSpace = Rosen::Drawing::ColorSpace;
86 using RSData = Rosen::Drawing::Data;
87 using RSDrawCmdList = Rosen::Drawing::DrawCmdList;
88 using RSFilterMode = Rosen::Drawing::FilterMode;
89 using RSImageFilter = Rosen::Drawing::ImageFilter;
90 using RSMipmapMode = Rosen::Drawing::MipmapMode;
91 using RSPathDashStyle = Rosen::Drawing::PathDashStyle;
92 using RSPathDirection = Rosen::Drawing::PathDirection;
93 using RSPathEffect = Rosen::Drawing::PathEffect;
94 using RSPicture = Rosen::Drawing::Picture;
95 using RSRecordingCanvas = Rosen::Drawing::RecordingCanvas;
96 using RSRecordingColorFilter = Rosen::Drawing::RecordingColorFilter;
97 using RSRecordingColorSpace = Rosen::Drawing::RecordingColorSpace;
98 using RSRecordingImageFilter = Rosen::Drawing::RecordingImageFilter;
99 using RSRecordingMaskFilter = Rosen::Drawing::RecordingMaskFilter;
100 using RSRecordingPath = Rosen::Drawing::RecordingPath;
101 using RSRecordingPathEffect = Rosen::Drawing::RecordingPathEffect;
102 using RSRecordingRegion = Rosen::Drawing::RecordingRegion;
103 using RSRecordingShaderEffect = Rosen::Drawing::RecordingShaderEffect;
104 using RSSaveLayerOps = Rosen::Drawing::SaveLayerOps;
105 using RSSize = Rosen::Drawing::Size;
106 using RSSrcRectConstraint = Rosen::Drawing::SrcRectConstraint;
107 #endif
108 using RSPathEffect = rosen::PathEffect;
109 using RSPathDirection = rosen::PathDirection;
110 using RSPathDashStyle = rosen::PathDashStyle;
111 using RSParagraph = rosen::Typography;
112 using RSTypographyProperties = rosen::TypographyProperties;
113 using RSParagraphBuilder = rosen::TypographyCreate;
114 using RSFontCollection = rosen::FontCollection;
115 using RSParagraphStyle = rosen::TypographyStyle;
116 using RSColorQuad = rosen::ColorQuad;
117 using RSShaderEffect = rosen::ShaderEffect;
118 using RSTileMode = rosen::TileMode;
119 using RSTextDirection = rosen::TextDirection;
120 using RSTextAlign = rosen::TextAlign;
121 using RSWordBreakType = rosen::WordBreakType;
122 using RSTextStyle = rosen::TextStyle;
123 using RSTextDecoration = rosen::TextDecoration;
124 using RSFontWeight = rosen::FontWeight;
125 using RSFontStyle = rosen::FontStyle;
126 using RSTextBaseline = rosen::TextBaseline;
127 } // namespace OHOS::Ace
128 #else
129 #include "core/components_ng/render/drawing_mock.h"
130 #endif
131 #endif // FOUNDATION_ACE_FRAMEWORKS_CORE_COMPONENTS_NG_RENDER_DRAWING_H
132