나는 행렬 함수를 사용하여 그리려면 셰이프 브러시를 사용하는 페인트 프로그램을 작성하고 있습니다. 모든 것이 원활하지 않다는 사실 외에도 잘 작동합니다. 마우스를 고속으로 움직이면 그림에 간격이 생길 것입니다.Actionscript 3 매트릭스를 사용하여 브러시로 bitmapdata.draw
나는 어디 론가 보였지만 어떤 해결책도 찾을 수 없었습니다.
이 코드는 기본적으로 다음과 같다 : 사람이 나 드로잉을 부드럽게하는 방법을 알아내는 데 도움 수 있다면
//Press mouse within container. Uses Matrix to draw instances of the brush.
private function handleMouseDown_drawContainer(e:MouseEvent):void
{
_matrix.identity();
_matrix.translate(mouseX - 10, mouseY - 30);
_layout.bitmapData.draw(_layout.brush, _matrix);
_layout.drawContainer.addEventListener(MouseEvent.MOUSE_MOVE, handleMouseMove_drawContainer);
_layout.drawContainer.addEventListener(MouseEvent.MOUSE_UP, handleMouseUp_drawContainer)
}
//Move mouse within container. Uses Matrix to draw instances of the brush.
private function handleMouseMove_drawContainer(e:MouseEvent):void
{
_matrix.identity();
_matrix.translate(mouseX - 10, mouseY - 30);
_layout.bitmapData.draw(_layout.brush, _matrix);
}
, 나는 영원히 감사하게 될 거라고! = p
미리 감사드립니다.