1 /*
2 * Copyright (c) 2024 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 #include "js_drawing_init.h"
17
18 #include "brush_napi/js_brush.h"
19 #include "canvas_napi/js_canvas.h"
20 #include "color_filter_napi/js_color_filter.h"
21 #include "enum_napi/js_enum.h"
22 #include "font_napi/js_font.h"
23 #include "font_napi/js_typeface.h"
24 #include "image_filter_napi/js_image_filter.h"
25 #include "lattice_napi/js_lattice.h"
26 #include "mask_filter_napi/js_mask_filter.h"
27 #include "matrix_napi/js_matrix.h"
28 #include "path_effect_napi/js_path_effect.h"
29 #include "path_napi/js_path.h"
30 #include "pen_napi/js_pen.h"
31 #include "region_napi/js_region.h"
32 #include "roundRect_napi/js_roundrect.h"
33 #include "sampling_options_napi/js_sampling_options.h"
34 #include "shader_effect_napi/js_shader_effect.h"
35 #include "shadow_layer_napi/js_shadow_layer.h"
36 #include "text_blob_napi/js_text_blob.h"
37
38 namespace OHOS::Rosen {
39 namespace Drawing {
DrawingInit(napi_env env,napi_value exportObj)40 napi_value DrawingInit(napi_env env, napi_value exportObj)
41 {
42 JsFont::Init(env, exportObj);
43 JsPath::Init(env, exportObj);
44 JsTypeface::Init(env, exportObj);
45 JsCanvas::Init(env, exportObj);
46 JsEnum::Init(env, exportObj);
47 JsColorFilter::Init(env, exportObj);
48 JsTextBlob::Init(env, exportObj);
49 JsPen::Init(env, exportObj);
50 JsBrush::Init(env, exportObj);
51 JsImageFilter::Init(env, exportObj);
52 JsSamplingOptions::Init(env, exportObj);
53 JsMaskFilter::Init(env, exportObj);
54 JsLattice::Init(env, exportObj);
55 JsPathEffect::Init(env, exportObj);
56 JsRegion::Init(env, exportObj);
57 JsRoundRect::Init(env, exportObj);
58 JsShaderEffect::Init(env, exportObj);
59 JsShadowLayer::Init(env, exportObj);
60 JsMatrix::Init(env, exportObj);
61 return exportObj;
62 }
63 } // namespace Drawing
64 } // namespace OHOS::Rosen
65