0
업데이트 : 일단 (0,0) 단계에서 반대쪽 모서리까지가는 선을 어떻게 그릴 수 있습니까?(0,0)에서이 선을 그리면 실제로 (0,0)에 그려지지 않습니다.
package
{
import flash.display.Sprite;
import flash.display.LineScaleMode;
import flash.display.CapsStyle;
import flash.display.JointStyle;
import flash.display.Shape;
import flash.events.Event;
public class Main extends Sprite
{
private var lines:Shape;
public function Main():void
{
if (stage) init();
else addEventListener(Event.ADDED_TO_STAGE, init);
}
private function init(e:Event = null):void
{
removeEventListener(Event.ADDED_TO_STAGE, init);
// entry point
lines = new Shape();
addChild(lines);
lines.graphics.clear();
lines.graphics.lineStyle(10, 0x000000);
lines.graphics.moveTo(0, 0);
lines.graphics.lineTo(stage.stageWidth, stage.stageHeight);
}
}
}
파일에 어떤 일이 발생하는지에 대해 예는 here를 참조하십시오 여기에
내가 가진 것입니다. 그것은 HTML 페이지에 내장되어 있습니다.
Chrome에서는 왼쪽이 약간 오프셋되어 있습니다. –
그냥 작동하지 않습니다. 내 업데이트를 참조하십시오. –