[NUI] VectorGraphics:Open added APIs(DrawableGroup, Picture, Gradient)
[platform/core/csapi/tizenfx.git] / src / Tizen.NUI / src / public / BaseComponents / VectorGraphics / VectorGraphicsConstants.cs
1 /*
2 * Copyright(c) 2021 Samsung Electronics Co., Ltd.
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 *
16 */
17 using System;
18 using System.Collections.Generic;
19 using System.ComponentModel;
20 using System.Diagnostics.CodeAnalysis;
21
22 namespace Tizen.NUI.BaseComponents.VectorGraphics
23 {
24     /// <summary>
25     /// Enumeration for The fill rule of shape.
26     /// </summary>
27     /// <since_tizen> 9 </since_tizen>
28     public enum FillRuleType
29     {
30         /// <summary>
31         /// Draw a horizontal line from the point to a location outside the shape. Determine whether the direction of the line at each intersection point is up or down. The winding number is determined by summing the direction of each intersection. If the number is non zero, the point is inside the shape.
32         /// </summary>
33         Winding = 0,
34         /// <summary>
35         /// Draw a horizontal line from the point to a location outside the shape, and count the number of intersections. If the number of intersections is an odd number, the point is inside the shape.
36         /// </summary>
37         EvenOdd
38     }
39
40     /// <summary>
41     /// Enumeration for The cap style to be used for stroking the path.
42     /// </summary>
43     /// <since_tizen> 9 </since_tizen>
44     public enum StrokeCapType
45     {
46         /// <summary>
47         /// The end of lines is rendered as a square around the last point.
48         /// </summary>
49         Square = 0,
50         /// <summary>
51         /// The end of lines is rendered as a half-circle around the last point.
52         /// </summary>
53         Round,
54         /// <summary>
55         /// The end of lines is rendered as a full stop on the last point itself.
56         /// </summary>
57         Butt
58     }
59
60     /// <summary>
61     /// numeration for The join style to be used for stroking the path.
62     /// </summary>
63     /// <since_tizen> 9 </since_tizen>
64     public enum StrokeJoinType
65     {
66         /// <summary>
67         /// Used to render beveled line joins. The outer corner of the joined lines is filled by enclosing the triangular region of the corner with a straight line between the outer corners of each stroke.
68         /// </summary>
69         Bevel = 0,
70         /// <summary>
71         /// Used to render rounded line joins. Circular arcs are used to join two lines smoothly.
72         /// </summary>
73         Round,
74         /// <summary>
75         /// Used to render mitered line joins. The intersection of the strokes is clipped at a line perpendicular to the bisector of the angle between the strokes, at the distance from the intersection of the segments equal to the product of the miter limit value and the border radius.  This prevents long spikes being created.
76         /// </summary>
77         Miter
78     }
79
80     /// <summary>
81     /// Enumeration indicating the type used in the masking of two objects - the mask drawable and the own drawable.
82     /// </summary>
83     /// <since_tizen> 9 </since_tizen>
84     public enum MaskType
85     {
86         /// <summary>
87         /// The pixels of the own drawable and the mask drawable are alpha blended. As a result, only the part of the own drawable, which intersects with the mask drawable is visible.
88         /// </summary>
89         Alpha = 0,
90         /// <summary>
91         /// The pixels of the own drawable and the complement to the mask drawable's pixels are alpha blended. As a result, only the part of the own which is not covered by the mask is visible.
92         /// </summary>
93         AlphaInverse
94     }
95
96     /// <summary>
97     /// Enumeration specifying how to fill the area outside the gradient bounds.
98     /// </summary>
99     /// <since_tizen> 9 </since_tizen>
100     public enum SpreadType
101     {
102         /// <summary>
103         /// The remaining area is filled with the closest stop color.
104         /// </summary>
105         Pad = 0,
106         /// <summary>
107         /// The gradient pattern is reflected outside the gradient area until the expected region is filled.
108         /// </summary>
109         Reflect,
110         /// <summary>
111         /// The gradient pattern is repeated continuously beyond the gradient area until the expected region is filled.
112         /// </summary>
113         Repeat
114     }
115
116     /// <summary>
117     /// Enumeration specifying the values of the path commands.
118     /// Not to be confused with the path commands from the svg path element (like M, L, Q, H and many others).
119     /// </summary>
120     /// <since_tizen> 9 </since_tizen>
121     public enum PathCommandType
122     {
123         /// <summary>
124         /// Ends the current sub-path and connects it with its initial point. This command doesn't expect any points.
125         /// </summary>
126         Close = 0,
127         /// <summary>
128         /// Sets a new initial point of the sub-path and a new current point. This command expects 1 point: the starting position.
129         /// </summary>
130         MoveTo,
131         /// <summary>
132         /// Draws a line from the current point to the given point and sets a new value of the current point. This command expects 1 point: the end-position of the line.
133         /// </summary>
134         LineTo,
135         /// <summary>
136         /// Draws a cubic Bezier curve from the current point to the given point using two given control points and sets a new value of the current point. This command expects 3 points: the 1st control-point, the 2nd control-point, the end-point of the curve.
137         /// </summary>
138         CubicTo
139     }
140 }