add get circle radian point fun
This commit is contained in:
parent
1acb4e7943
commit
1d06a1f1f0
|
@ -140,6 +140,12 @@ export function getLinearGradientColor (ctx, begin, end, color) {
|
||||||
return linearGradientColor
|
return linearGradientColor
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export function getCircleRadianPoint (x, y, radius, radian) {
|
||||||
|
const { sin, cos } = Math
|
||||||
|
|
||||||
|
return [x + cos(radian) * radius, y + sin(radian) * radius]
|
||||||
|
}
|
||||||
|
|
||||||
const canvas = {
|
const canvas = {
|
||||||
drawLine,
|
drawLine,
|
||||||
drawPolylinePath,
|
drawPolylinePath,
|
||||||
|
@ -149,7 +155,8 @@ const canvas = {
|
||||||
drawSmoothline,
|
drawSmoothline,
|
||||||
drawBezierCurveLinePath,
|
drawBezierCurveLinePath,
|
||||||
drawPoints,
|
drawPoints,
|
||||||
getLinearGradientColor
|
getLinearGradientColor,
|
||||||
|
getCircleRadianPoint
|
||||||
}
|
}
|
||||||
|
|
||||||
export default function (Vue) {
|
export default function (Vue) {
|
||||||
|
|
Loading…
Reference in New Issue