Flash: DisplayObject의transform/matrix의 잠재적 규칙, 작은 버그
1684 단어 transform
자세한 내용은 다음 코드를 참조하십시오.
var a:Sprite = new Sprite();
a.graphics.beginFill(0);
a.graphics.drawRect(0,0,100,100);
a.graphics.endFill();
a.x = a.y = 10;
addChild(a);
trace (a.transform.matrix );
var m:Matrix = a.transform.matrix .clone();
m.translate(30,30);
a.transform.matrix = m;
trace (a.x, a.y);
trace (a.transform.matrix );
m.translate(30,30);
a.transform.matrix = m; // Matrix ,
trace (a.x, a.y);
trace (a.transform.matrix);
a.transform.matrix .translate(30,30); // , a
trace (a.x, a.y);
trace (a.transform.matrix );
출력:
(a=1, b=0, c=0, d=1, tx=10, ty=10)
40 40
(a=1, b=0, c=0, d=1, tx=40, ty=40)
70 70
(a=1, b=0, c=0, d=1, tx=70, ty=70)
70 70
(a=1, b=0, c=0, d=1, tx=70, ty=70)
이 내용에 흥미가 있습니까?
현재 기사가 여러분의 문제를 해결하지 못하는 경우 AI 엔진은 머신러닝 분석(스마트 모델이 방금 만들어져 부정확한 경우가 있을 수 있음)을 통해 가장 유사한 기사를 추천합니다:
[220414_TIL] css transform vs positioningcss에서 element의 위치를 변경하는 방법 중에 transform과 positioning(top, left..) 가 있다. 둘 다 육안으로 보이는 결과화면은 같지만, 어떤 상황에서 무엇을 쓰는 게 더 적절할지 ...
텍스트를 자유롭게 공유하거나 복사할 수 있습니다.하지만 이 문서의 URL은 참조 URL로 남겨 두십시오.
CC BY-SA 2.5, CC BY-SA 3.0 및 CC BY-SA 4.0에 따라 라이센스가 부여됩니다.