Home
last modified time | relevance | path

Searched refs:pts (Results 1 – 25 of 30) sorted by relevance

12

/lvgl-latest/src/libs/thorvg/
DtvgSwShape.cpp36 if (outline.pts.empty()) return false; in _outlineBegin()
37 outline.cntrs.push(outline.pts.count - 1); in _outlineBegin()
39 outline.pts.push(outline.pts[outline.cntrs.last()]); in _outlineBegin()
47 if (outline.pts.empty()) return false; in _outlineEnd()
48 outline.cntrs.push(outline.pts.count - 1); in _outlineEnd()
59 outline.pts.push(mathTransform(to, transform)); in _outlineMoveTo()
67 outline.pts.push(mathTransform(to, transform)); in _outlineLineTo()
74 outline.pts.push(mathTransform(ctrl1, transform)); in _outlineCubicTo()
77 outline.pts.push(mathTransform(ctrl2, transform)); in _outlineCubicTo()
80 outline.pts.push(mathTransform(to, transform)); in _outlineCubicTo()
[all …]
DtvgSvgPath.cpp103 void _pathAppendArcTo(Array<PathCommand>* cmds, Array<Point>* pts, Point* cur, Point* curCtl, float… in _pathAppendArcTo() argument
255 pts->push(p[0]); in _pathAppendArcTo()
256 pts->push(p[1]); in _pathAppendArcTo()
257 pts->push(p[2]); in _pathAppendArcTo()
317 static bool _processCommand(Array<PathCommand>* cmds, Array<Point>* pts, char cmd, float* arr, int … in _processCommand() argument
355 pts->push(p); in _processCommand()
364 pts->push(p); in _processCommand()
375 pts->push(p[0]); in _processCommand()
376 pts->push(p[1]); in _processCommand()
377 pts->push(p[2]); in _processCommand()
[all …]
DtvgShape.h131 if (rs.path.pts.count > 0 ) { in bounds()
132 auto pts = rs.path.pts.begin(); in bounds() local
133 Point min = { pts->x, pts->y }; in bounds()
134 Point max = { pts->x, pts->y }; in bounds()
136 for (auto pts2 = pts + 1; pts2 < rs.path.pts.end(); ++pts2) { in bounds()
156 return rs.path.pts.count > 0 ? true : false; in bounds()
166 rs.path.pts.reserve(ptsCnt); in reservePts()
172 rs.path.pts.grow(ptsCnt); in grow()
175 void append(const PathCommand* cmds, uint32_t cmdCnt, const Point* pts, uint32_t ptsCnt) in append()
178 memcpy(rs.path.pts.end(), pts, sizeof(Point) * ptsCnt); in append()
[all …]
DtvgSwMemPool.cpp46 mpool->outline[idx].pts.clear(); in mpoolRetOutline()
61 mpool->strokeOutline[idx].pts.clear(); in mpoolRetStrokeOutline()
76 mpool->dashOutline[idx].pts.clear(); in mpoolRetDashOutline()
100 mpool->outline[i].pts.reset(); in mpoolClear()
105 mpool->strokeOutline[i].pts.reset(); in mpoolClear()
110 mpool->dashOutline[i].pts.reset(); in mpoolClear()
DtvgSwStroke.cpp64 border->pts = static_cast<SwPoint*>(realloc(border->pts, maxCur * sizeof(SwPoint))); in _growBorder()
82 border->pts[start] = border->pts[count]; in _borderClose()
86 auto pt1 = border->pts + start + 1; in _borderClose()
87 auto pt2 = border->pts + count - 1; in _borderClose()
123 auto pt = border->pts + border->ptsCnt; in _borderCubicTo()
196 border->pts[border->ptsCnt - 1] = to; in _borderLineTo()
199 if (border->ptsCnt > 0 && (border->pts[border->ptsCnt - 1] - to).small()) return; in _borderLineTo()
202 border->pts[border->ptsCnt] = to; in _borderLineTo()
525 auto _start = border->pts[border->ptsCnt - 1]; in _cubicTo()
635 auto dstPt = right->pts + right->ptsCnt; in _addReverseLeft()
[all …]
DtvgSwImage.cpp45 outline->pts.reserve(5); in _genOutline()
59 outline->pts.push(mathTransform(&to[i], transform)); in _genOutline()
63 outline->pts.push(outline->pts[0]); in _genOutline()
65 outline->cntrs.push(outline->pts.count - 1); in _genOutline()
DtvgLottieProperty.h162 Point pt = pathset->pts[i]; in _copy()
167 inPts.data = pathset->pts; in _copy()
368 free(value.pts); in release()
374 free((*p).value.pts); in release()
414 …bool operator()(float frameNo, Array<PathCommand>& cmds, Array<Point>& pts, Matrix* transform, con… in operator()
443 … roundness->modifyPath(path->cmds, path->cmdsCnt, path->pts, path->ptsCnt, cmds1, pts1, transform); in operator()
444 … return offsetPath->modifyPath(cmds1.data, cmds1.count, pts1.data, pts1.count, cmds, pts); in operator()
446 …return roundness->modifyPath(path->cmds, path->cmdsCnt, path->pts, path->ptsCnt, cmds, pts, transf… in operator()
448 …Path) return offsetPath->modifyPath(path->cmds, path->cmdsCnt, path->pts, path->ptsCnt, cmds, pts); in operator()
451 _copy(path, pts, transform); in operator()
[all …]
DtvgSvgSceneBuilder.cpp423 if (node->node.polygon.pts.count < 2) break; in _recognizeShape()
424 auto pts = node->node.polygon.pts.begin(); in _recognizeShape() local
425 shape->moveTo(pts[0], pts[1]); in _recognizeShape()
426 for (pts += 2; pts < node->node.polygon.pts.end(); pts += 2) { in _recognizeShape()
427 shape->lineTo(pts[0], pts[1]); in _recognizeShape()
433 if (node->node.polyline.pts.count < 2) break; in _recognizeShape()
434 auto pts = node->node.polyline.pts.begin(); in _recognizeShape() local
435 shape->moveTo(pts[0], pts[1]); in _recognizeShape()
436 for (pts += 2; pts < node->node.polyline.pts.end(); pts += 2) { in _recognizeShape()
437 shape->lineTo(pts[0], pts[1]); in _recognizeShape()
[all …]
DtvgShape.cpp70 pImpl->rs.path.pts.clear(); in reset()
85 uint32_t Shape::pathCoords(const Point** pts) const noexcept in pathCoords()
87 if (pts) *pts = pImpl->rs.path.pts.data; in pathCoords()
88 return pImpl->rs.path.pts.count; in pathCoords()
92 Result Shape::appendPath(const PathCommand *cmds, uint32_t cmdCnt, const Point* pts, uint32_t ptsCn… in appendPath() argument
94 if (cmdCnt == 0 || ptsCnt == 0 || !cmds || !pts) return Result::InvalidArguments; in appendPath()
97 pImpl->append(cmds, cmdCnt, pts, ptsCnt); in appendPath()
DtvgLottieModifier.cpp33 static void _roundCorner(Array<PathCommand>& cmds, Array<Point>& pts, const Point& prev, const Poin… in _roundCorner() argument
43 pts.push(curr - 2.0f * dPrev); in _roundCorner()
44 pts.push(curr - dPrev); in _roundCorner()
45 pts.push(curr - dNext); in _roundCorner()
46 pts.push(curr - 2.0f * dNext); in _roundCorner()
89 static bool _clockwise(const Point* pts, uint32_t n) in _clockwise() argument
94 area += cross(pts[i], pts[i + 1]); in _clockwise()
96 area += cross(pts[n - 1], pts[0]);; in _clockwise()
DtvgPaint.cpp47 static Result _clipRect(RenderMethod* renderer, const Point* pts, const Matrix& pm, const Matrix& r… in _clipRect() argument
55 tmp[i] = pts[i]; in _clipRect()
85 const Point* pts; in _compFastTrack() local
86 auto ptsCnt = shape->pathCoords(&pts); in _compFastTrack()
100 if (tryClip) return _clipRect(renderer, pts, pm, rm, before); in _compFastTrack()
103 auto pt1 = pts + 0; in _compFastTrack()
104 auto pt2 = pts + 1; in _compFastTrack()
105 auto pt3 = pts + 2; in _compFastTrack()
106 auto pt4 = pts + 3; in _compFastTrack()
DtvgLottieModifier.h70 …d, State& state, bool degenerated, Array<PathCommand>& cmds, Array<Point>& pts, float offset) cons…
71 …nextLine, uint32_t movetoIndex, bool nextClose, Array<PathCommand>& cmds, Array<Point>& pts) const;
DtvgLottieBuilder.cpp413 …ath) offsetPath->modifyRect(commands, 5, points, 4, P(shape)->rs.path.cmds, P(shape)->rs.path.pts); in _appendRect()
466 …tPath->modifyRect(commands, cmdCnt, points, ptsCnt, P(shape)->rs.path.cmds, P(shape)->rs.path.pts); in _appendRect()
565 …path->pathset(frameNo, P(shape)->rs.path.cmds, P(shape)->rs.path.pts, ctx->transform, ctx->roundne… in updatePath()
569 …if (path->pathset(frameNo, P(ctx->merging)->rs.path.cmds, P(ctx->merging)->rs.path.pts, ctx->trans… in updatePath()
623 P(shape)->rs.path.pts.reserve(numPoints + 2); in _updateStar()
626 P(shape)->rs.path.pts.reserve(numPoints * 3 + 2); in _updateStar()
695 …r(P(shape)->rs.path.cmds, P(shape)->rs.path.pts, P(intermediate)->rs.path.cmds, P(intermediate)->r… in _updateStar()
696 …mediate)->rs.path.cmds, P(intermediate)->rs.path.pts, P(merging)->rs.path.cmds, P(merging)->rs.pat… in _updateStar()
698 …lystar(P(shape)->rs.path.cmds, P(shape)->rs.path.pts, P(merging)->rs.path.cmds, P(merging)->rs.pat… in _updateStar()
700 …lystar(P(shape)->rs.path.cmds, P(shape)->rs.path.pts, P(merging)->rs.path.cmds, P(merging)->rs.pat… in _updateStar()
[all …]
DtvgLottieParser.cpp185 Array<Point> outs, ins, pts; in getValue() local
197 else if (KEY_AS("v")) getValue(pts); in getValue()
206 if (ins.empty() || outs.empty() || pts.empty()) return; in getValue()
207 if (ins.count != outs.count || outs.count != pts.count) return; in getValue()
212 auto pt = pts.begin(); in getValue()
219 outPts.data = path.pts; in getValue()
225 outPts.reserve(pts.count * 3 + 1 + extra); in getValue()
226 outCmds.reserve(pts.count + 2); in getValue()
231 for (++pt, ++out, ++in; pt < pts.end(); ++pt, ++out, ++in) { in getValue()
239 outPts.push(pts.last() + outs.last()); in getValue()
[all …]
DtvgLottieExpressions.h118 …bool result(float frameNo, Array<PathCommand>& cmds, Array<Point>& pts, Matrix* transform, const L… in result()
124 (*pathset)(frameNo, cmds, pts, transform, roundness, offsetPath); in result()
DtvgLottieCommon.h35 Point* pts = nullptr; member
DtvgSwMath.cpp300 if (outline->pts.empty() || outline->cntrs.empty()) { in mathUpdateOutlineBBox()
305 auto pt = outline->pts.begin(); in mathUpdateOutlineBBox()
312 for (++pt; pt < outline->pts.end(); ++pt) { in mathUpdateOutlineBBox()
DtvgLottieParser.h63 void getValue(Array<Point>& pts);
DtvgCapi.cpp336 …Paint* paint, const Tvg_Path_Command* cmds, uint32_t cmdCnt, const Tvg_Point* pts, uint32_t ptsCnt) in tvg_shape_append_path() argument
339 …rpret_cast<Shape*>(paint)->appendPath((const PathCommand*)cmds, cmdCnt, (const Point*)pts, ptsCnt); in tvg_shape_append_path()
343 TVG_API Tvg_Result tvg_shape_get_path_coords(const Tvg_Paint* paint, const Tvg_Point** pts, uint32_… in tvg_shape_get_path_coords() argument
345 if (!paint || !pts || !cnt) return TVG_RESULT_INVALID_ARGUMENT; in tvg_shape_get_path_coords()
346 *cnt = reinterpret_cast<const Shape*>(paint)->pathCoords((const Point**)pts); in tvg_shape_get_path_coords()
DtvgSwRle.cpp711 auto limit = outline->pts.data + last; in _decomposeOutline()
712 auto start = UPSCALE(outline->pts[first]); in _decomposeOutline()
713 auto pt = outline->pts.data + first; in _decomposeOutline()
717 _moveTo(rw, UPSCALE(outline->pts[first])); in _decomposeOutline()
Dthorvg_capi.h1260 …aint* paint, const Tvg_Path_Command* cmds, uint32_t cmdCnt, const Tvg_Point* pts, uint32_t ptsCnt);
1285 TVG_API Tvg_Result tvg_shape_get_path_coords(const Tvg_Paint* paint, const Tvg_Point** pts, uint32_…
Dthorvg.h992 …Result appendPath(const PathCommand* cmds, uint32_t cmdCnt, const Point* pts, uint32_t ptsCnt) noe…
1135 uint32_t pathCoords(const Point** pts) const noexcept;
/lvgl-latest/demos/vector_graphic/
Dlv_demo_vector_graphic.c31 lv_fpoint_t pts[] = {{200, 200}, {300, 200}, {300, 300}, {200, 300}}; in draw_pattern() local
32 lv_vector_path_move_to(path, &pts[0]); in draw_pattern()
33 lv_vector_path_line_to(path, &pts[1]); in draw_pattern()
34 lv_vector_path_quad_to(path, &pts[2], &pts[3]); in draw_pattern()
56 lv_fpoint_t pts[] = {{400, 200}, {600, 200}, {400, 400}}; in draw_gradient() local
57 lv_vector_path_move_to(path, &pts[0]); in draw_gradient()
58 lv_vector_path_quad_to(path, &pts[1], &pts[2]); in draw_gradient()
86 lv_fpoint_t pts[] = {{400, 50}, {500, 50}, {500, 200}, {400, 200}}; in draw_radial_gradient() local
87 lv_vector_path_move_to(path, &pts[0]); in draw_radial_gradient()
88 lv_vector_path_line_to(path, &pts[1]); in draw_radial_gradient()
[all …]
/lvgl-latest/examples/widgets/canvas/
Dlv_example_canvas_8.c30 lv_fpoint_t pts[] = {{10, 10}, {130, 130}, {10, 130}}; in lv_example_canvas_8() local
31 lv_vector_path_move_to(path, &pts[0]); in lv_example_canvas_8()
32 lv_vector_path_line_to(path, &pts[1]); in lv_example_canvas_8()
33 lv_vector_path_line_to(path, &pts[2]); in lv_example_canvas_8()
/lvgl-latest/tests/src/test_cases/draw/
Dtest_draw_vector.c318 lv_fpoint_t pts[] = {{10, 10}, {130, 130}, {10, 130}}; in event_cb() local
319 lv_vector_path_move_to(path, &pts[0]); in event_cb()
320 lv_vector_path_line_to(path, &pts[1]); in event_cb()
321 lv_vector_path_line_to(path, &pts[2]); in event_cb()

12