2 * Copyright (c) 2021 Samsung Electronics Co., Ltd.
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
8 * http://www.apache.org/licenses/LICENSE-2.0
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.
19 #include <dali/internal/canvas-renderer/common/shape-impl.h>
27 Shape::Shape() = default;
29 Shape::~Shape() = default;
31 bool Shape::AddRect(Rect<float> rect, Vector2 roundedCorner)
36 bool Shape::AddCircle(Vector2 center, Vector2 radius)
41 bool Shape::AddArc(Vector2 center, float radius, float startAngle, float sweep, bool pie)
46 bool Shape::AddMoveTo(Vector2 point)
51 bool Shape::AddLineTo(Vector2 line)
56 bool Shape::AddCubicTo(Vector2 controlPoint1, Vector2 controlPoint2, Vector2 endPoint)
66 bool Shape::ResetPath()
71 bool Shape::SetFillColor(Vector4 color)
76 Vector4 Shape::GetFillColor() const
78 return Vector4(0, 0, 0, 0);
81 bool Shape::SetFillRule(Dali::CanvasRenderer::Shape::FillRule rule)
86 Dali::CanvasRenderer::Shape::FillRule Shape::GetFillRule() const
88 return Dali::CanvasRenderer::Shape::FillRule::WINDING;
91 bool Shape::SetStrokeWidth(float width)
96 float Shape::GetStrokeWidth() const
101 bool Shape::SetStrokeColor(Vector4 color)
106 Vector4 Shape::GetStrokeColor() const
108 return Vector4(0, 0, 0, 0);
111 bool Shape::SetStrokeDash(const Dali::Vector<float> dashPattern)
116 Dali::Vector<float> Shape::GetStrokeDash() const
118 return Vector<float>();
121 bool Shape::SetStrokeCap(Dali::CanvasRenderer::Shape::StrokeCap cap)
126 Dali::CanvasRenderer::Shape::StrokeCap Shape::GetStrokeCap() const
128 return Dali::CanvasRenderer::Shape::StrokeCap::SQUARE;
131 bool Shape::SetStrokeJoin(Dali::CanvasRenderer::Shape::StrokeJoin join)
136 Dali::CanvasRenderer::Shape::StrokeJoin Shape::GetStrokeJoin() const
138 return Dali::CanvasRenderer::Shape::StrokeJoin::BEVEL;
141 } // namespace Adaptor
143 } // namespace Internal