This is my code and i want to Change pointColor and lineColor but i don’t know how?
I am using fast-api.js library and i don’t found any sample with customized Landmarks Styles.
export const drawResults = async (image, canvas, results, type) => {
if (image && canvas && results) {
const imgSize = image.getBoundingClientRect();
const displaySize = { width: imgSize.width, height: imgSize.height };
faceapi.matchDimensions(canvas, displaySize);
canvas.getContext('2d').clearRect(0, 0, canvas.width, canvas.height);
const resizedDetections = faceapi.resizeResults(results, displaySize);
switch (type) {
case 'landmarks':
faceapi.draw.drawFaceLandmarks(canvas, resizedDetections);
break;
case 'expressions':
faceapi.draw.drawFaceExpressions(canvas, resizedDetections);
break;
case 'box':
faceapi.draw.drawDetections(canvas, resizedDetections);
break;
case 'boxLandmarks':
faceapi.draw.drawDetections(canvas, resizedDetections);
faceapi.draw.drawFaceExpressions(canvas, resizedDetections);
faceapi.draw.drawFaceLandmarks(canvas, resizedDetections);
break;
default:
break;
}
}
};
```