如何使用SkiaSharp部分绘制路径? (Xamarin形式)

时间:2018-07-19 17:40:16

标签: c# forms xamarin skia skiasharp

我要达到的结果是对路径进行动画处理,使其看起来像随着时间的推移而被追踪。因此,我每1/60秒在我的{ "name": "", "version": "1.0.0", "description": "", "main": "index.js", "scripts": { "test": "jest", "watch": "webpack --progress --watch", "start": "yarn build", "build": "webpack -d && cp src/index.html dist/index.html && webpack-dev-server --inline --hot --history-api-fallback", "build:dev": "webpack && cp src/index.html dist/index.html", "build:prod": "webpack -p && cp src/index.html dist/index.html" }, "author": "", "license": "UNLICENSED", "devDependencies": { "babel-cli": "7.0.0-beta.3", "babel-eslint": "7", "babel-loader": "^7.1.2", "babel-plugin-transform-object-rest-spread": "^6.26.0", "babel-preset-env": "^1.6.0", "babel-preset-react": "^6.24.1", "babel-preset-stage-2": "^6.24.1", "css-loader": "^0.28.7", "enzyme": "^3.1.0", "enzyme-adapter-react-16": "^1.0.1", "eslint": "3.x", "eslint-config-airbnb": "^15.1.0", "eslint-loader": "^1.9.0", "eslint-plugin-import": "^2.7.0", "eslint-plugin-jsx-a11y": "^5.1.1", "eslint-plugin-react": "^7.4.0", "extract-text-webpack-plugin": "^3.0.0", "fetch-mock": "^6.0.0-beta.7", "file-loader": "^0.11.2", "image-webpack-loader": "^3.4.2", "jest": "^23.1.0", "jest-enzyme": "^4.0.0", "jest-fetch-mock": "^1.6.4", "node-sass": "^4.9.0", "redux-mock-store": "^1.5.3", "sass-loader": "^6.0.6", "url-loader": "^0.5.9", "webpack": "^3.6.0", "webpack-dev-server": "^2.9.1" }, "dependencies": { "@trendmicro/react-toggle-switch": "^0.5.7", "babel-polyfill": "^6.26.0", "cross-fetch": "^1.1.1", "font-awesome": "^4.7.0", "highcharts": "^6.0.4", "history": "^4.7.2", "js-cookie": "^2.2.0", "less-loader": "^4.0.5", "libphonenumber-js": "^0.4.42", "lodash": "^4.17.4", "moment": "^2.19.1", "prop-types": "^15.6.0", "query-string": "^5.0.1", "rc-time-picker": "^3.1.0", "react": "^16.0.0", "react-animations": "^1.0.0", "react-autosuggest": "^9.3.4", "react-circular-progressbar": "^0.8.0", "react-datepicker": "^0.59.0", "react-dom": "^16.0.0", "react-highcharts": "^15.0.0", "react-list": "^0.8.8", "react-redux": "^5.0.6", "react-router": "^4.2.0", "react-router-dom": "^4.2.2", "react-router-redux": "^5.0.0-alpha.6", "react-select": "^1.0.0-rc.10", "react-transition-group": "^1.2.0", "redux": "^3.7.2", "redux-logger": "^3.0.6", "redux-thunk": "^2.2.0", "styled-components": "3.2.3", "twilio-client": "^1.4.33" }, "jest": { "setupTestFrameworkScriptFile": "./node_modules/jest-enzyme/lib/index.js" } } 上致电InvalidateSurface()。我需要在SKSurface事件处理程序中执行以下操作:

PaintSurface

因此,每次绘制调用都应绘制更多路径,直到10秒钟左右绘制完整路径为止。这种方法在SkiaSharp中不存在,所以我如何实现这样的效果?

当然,我可以随着时间的流逝对路径本身进行动画处理,但是由于这是一条非常复杂的路径,因此需要做很多工作。

任何提示都值得赞赏。

0 个答案:

没有答案