CanvasRenderer::Shape: Add AddPath() Api
Adds an API that adds a large path information.
The PathCommands structure has a PathCommandType array, a Point array
and the number of each array.
ex)
//Prepare Path Commands
Dali::CanvasRenderer::Shape::PathCommandType commands[11];
commands[0] = Dali::CanvasRenderer::Shape::PathCommandType::MOVE_TO;
commands[1] = Dali::CanvasRenderer::Shape::PathCommandType::LINE_TO;
commands[2] = Dali::CanvasRenderer::Shape::PathCommandType::LINE_TO;
commands[3] = Dali::CanvasRenderer::Shape::PathCommandType::LINE_TO;
commands[4] = Dali::CanvasRenderer::Shape::PathCommandType::LINE_TO;
commands[5] = Dali::CanvasRenderer::Shape::PathCommandType::LINE_TO;
commands[6] = Dali::CanvasRenderer::Shape::PathCommandType::LINE_TO;
commands[7] = Dali::CanvasRenderer::Shape::PathCommandType::LINE_TO;
commands[8] = Dali::CanvasRenderer::Shape::PathCommandType::LINE_TO;
commands[9] = Dali::CanvasRenderer::Shape::PathCommandType::LINE_TO;
commands[10] = Dali::CanvasRenderer::Shape::PathCommandType::CLOSE;
//Prepare Path Points
float points[20] = {-1.0f, -165.0f,
53.0f, -56.0f,
174.0f, -39.0f,
87.0f, 45.0f,
107.0f, 166.0f,
-1.0f, 110.0f,
-103.0f, 166.0f,
-88.0f, 46.0f,
-174.0f, -38.0f,
-54.0f, -56.0f};
Dali::CanvasRenderer::Shape::PathCommands starPath = { commands, 11, points, 20 };
Dali::CanvasRenderer::Shape star = Dali::CanvasRenderer::Shape::New();
star.AddPath(starPath);
mCanvasView.AddDrawable(star);
Change-Id: I36cea22b1e80bfe2182cdb7fb2a8e262523c2a4f