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::SetFillColor(Vector4 color)
71 Vector4 Shape::GetFillColor() const
73 return Vector4(0, 0, 0, 0);
76 bool Shape::SetFillRule(Dali::CanvasRenderer::Shape::FillRule rule)
81 Dali::CanvasRenderer::Shape::FillRule Shape::GetFillRule() const
83 return Dali::CanvasRenderer::Shape::FillRule::WINDING;
86 bool Shape::SetStrokeWidth(float width)
91 float Shape::GetStrokeWidth() const
96 bool Shape::SetStrokeColor(Vector4 color)
101 Vector4 Shape::GetStrokeColor() const
103 return Vector4(0, 0, 0, 0);
106 bool Shape::SetStrokeDash(const Dali::Vector<float> dashPattern)
111 Dali::Vector<float> Shape::GetStrokeDash() const
113 return Vector<float>();
116 bool Shape::SetStrokeCap(Dali::CanvasRenderer::Shape::StrokeCap cap)
121 Dali::CanvasRenderer::Shape::StrokeCap Shape::GetStrokeCap() const
123 return Dali::CanvasRenderer::Shape::StrokeCap::SQUARE;
126 bool Shape::SetStrokeJoin(Dali::CanvasRenderer::Shape::StrokeJoin join)
131 Dali::CanvasRenderer::Shape::StrokeJoin Shape::GetStrokeJoin() const
133 return Dali::CanvasRenderer::Shape::StrokeJoin::BEVEL;
136 } // namespace Adaptor
138 } // namespace Internal