| 14 | | <mx:Script source="gunyarapaint.as"> |
|---|
| | 15 | <mx:Script> |
|---|
| | 16 | <![CDATA[ |
|---|
| | 17 | import flash.errors.IllegalOperationError; |
|---|
| | 18 | import flash.events.Event; |
|---|
| | 19 | import flash.events.KeyboardEvent; |
|---|
| | 20 | import flash.geom.Matrix; |
|---|
| | 21 | import flash.geom.Point; |
|---|
| | 22 | import flash.ui.Keyboard; |
|---|
| | 23 | import flash.utils.ByteArray; |
|---|
| | 24 | |
|---|
| | 25 | import mx.controls.Alert; |
|---|
| | 26 | import mx.core.UITextField; |
|---|
| | 27 | import mx.events.FlexEvent; |
|---|
| | 28 | import mx.events.ListEvent; |
|---|
| | 29 | import mx.events.NumericStepperEvent; |
|---|
| | 30 | import mx.events.SliderEvent; |
|---|
| | 31 | import mx.managers.PopUpManager; |
|---|
| | 32 | |
|---|
| | 33 | import org.libspark.gunyarapaint.controls.MovingCanvasModule; |
|---|
| | 34 | import org.libspark.gunyarapaint.controls.GPPasswordWindowControl; |
|---|
| | 35 | import org.libspark.gunyarapaint.framework.LayerBitmapCollection; |
|---|
| | 36 | import org.libspark.gunyarapaint.framework.Painter; |
|---|
| | 37 | import org.libspark.gunyarapaint.framework.Pen; |
|---|
| | 38 | import org.libspark.gunyarapaint.framework.Recorder; |
|---|
| | 39 | import org.libspark.gunyarapaint.framework.events.CommandEvent; |
|---|
| | 40 | import org.libspark.gunyarapaint.framework.events.UndoEvent; |
|---|
| | 41 | import org.libspark.gunyarapaint.framework.modules.CanvasModuleContext; |
|---|
| | 42 | import org.libspark.gunyarapaint.framework.modules.CircleModule; |
|---|
| | 43 | import org.libspark.gunyarapaint.framework.modules.DropperModule; |
|---|
| | 44 | import org.libspark.gunyarapaint.framework.modules.FloodFillModule; |
|---|
| | 45 | import org.libspark.gunyarapaint.framework.modules.FreeHandModule; |
|---|
| | 46 | import org.libspark.gunyarapaint.framework.modules.ICanvasModule; |
|---|
| | 47 | import org.libspark.gunyarapaint.framework.modules.LineModule; |
|---|
| | 48 | import org.libspark.gunyarapaint.framework.modules.PixelModule; |
|---|
| | 49 | import org.libspark.nicopedia.Com; |
|---|
| | 50 | |
|---|
| | 51 | private var m_recorder:Recorder; |
|---|
| | 52 | private var m_context:CanvasModuleContext; |
|---|
| | 53 | private var m_module:ICanvasModule; |
|---|
| | 54 | private var m_commit:uint; |
|---|
| | 55 | |
|---|
| | 56 | private var basex:uint = 0; |
|---|
| | 57 | private var basey:uint = 0; |
|---|
| | 58 | private var baseWidth:uint = 0; |
|---|
| | 59 | private var baseHeight:uint = 0; |
|---|
| | 60 | |
|---|
| | 61 | private var oekakiId:uint; |
|---|
| | 62 | private var redirectUrl:String; |
|---|
| | 63 | |
|---|
| | 64 | //private var _logger:GPLogger; |
|---|
| | 65 | |
|---|
| | 66 | private const MAX_CANVAS_WIDTH:uint = 500; |
|---|
| | 67 | private const MAX_CANVAS_HEIGHT:uint = 500; |
|---|
| | 68 | private const MIN_CANVAS_WIDTH:uint = 16; |
|---|
| | 69 | private const MIN_CANVAS_HEIGHT:uint = 16; |
|---|
| | 70 | private const DEBUG:Boolean = true; |
|---|
| | 71 | |
|---|
| | 72 | // ポップアップの初期位置 |
|---|
| | 73 | private var initCanvasWindow:Rectangle; |
|---|
| | 74 | private var initPenDetailWindowPos:Point; |
|---|
| | 75 | private var initLayerWindowPos:Point; |
|---|
| | 76 | private var initToolController:Point; |
|---|
| | 77 | |
|---|
| | 78 | public const ALERT_TITLE:String = 'お絵カキコ'; |
|---|
| | 79 | |
|---|
| | 80 | public function setModule(value:String):void |
|---|
| | 81 | { |
|---|
| | 82 | m_module = m_context.getModule(value); |
|---|
| | 83 | if (m_module == null) |
|---|
| | 84 | throw new IllegalOperationError(value |
|---|
| | 85 | + " is not the ICanvasModule implemented module"); |
|---|
| | 86 | } |
|---|
| | 87 | |
|---|
| | 88 | public function get module():ICanvasModule |
|---|
| | 89 | { |
|---|
| | 90 | return m_module; |
|---|
| | 91 | } |
|---|
| | 92 | |
|---|
| | 93 | public function get moduleName():String |
|---|
| | 94 | { |
|---|
| | 95 | switch (m_module.name) { |
|---|
| | 96 | case CircleModule.CIRCLE: |
|---|
| | 97 | return "円描画ツール"; |
|---|
| | 98 | case DropperModule.DROPPER: |
|---|
| | 99 | return "スポイトツール"; |
|---|
| | 100 | case FloodFillModule.FLOOD_FILL: |
|---|
| | 101 | return "塗りつぶしツール"; |
|---|
| | 102 | case FreeHandModule.FREE_HAND: |
|---|
| | 103 | return "手書き(消しゴム)ツール"; |
|---|
| | 104 | case LineModule.LINE: |
|---|
| | 105 | return "直線ツール"; |
|---|
| | 106 | case PixelModule.PIXEL: |
|---|
| | 107 | return "ドットツール"; |
|---|
| | 108 | default: |
|---|
| | 109 | return "謎のツール"; |
|---|
| | 110 | } |
|---|
| | 111 | } |
|---|
| | 112 | |
|---|
| | 113 | public function get supportedBlendModes():Array |
|---|
| | 114 | { |
|---|
| | 115 | return blendModes.toArray(); |
|---|
| | 116 | } |
|---|
| | 117 | |
|---|
| | 118 | public function get layers():LayerBitmapCollection |
|---|
| | 119 | { |
|---|
| | 120 | return m_recorder.layers; |
|---|
| | 121 | } |
|---|
| | 122 | |
|---|
| | 123 | public function get pen():Pen |
|---|
| | 124 | { |
|---|
| | 125 | return m_recorder.pen; |
|---|
| | 126 | } |
|---|
| | 127 | |
|---|
| | 128 | public function get canvasWidth():uint |
|---|
| | 129 | { |
|---|
| | 130 | return m_recorder.width; |
|---|
| | 131 | } |
|---|
| | 132 | |
|---|
| | 133 | public function get canvasHeight():uint |
|---|
| | 134 | { |
|---|
| | 135 | return m_recorder.height; |
|---|
| | 136 | } |
|---|
| | 137 | |
|---|
| | 138 | public function get canvasView():Sprite |
|---|
| | 139 | { |
|---|
| | 140 | return m_recorder.view; |
|---|
| | 141 | } |
|---|
| | 142 | |
|---|
| | 143 | public function get commitCount():uint |
|---|
| | 144 | { |
|---|
| | 145 | return m_commit; |
|---|
| | 146 | } |
|---|
| | 147 | |
|---|
| | 148 | public function get recorder():Recorder |
|---|
| | 149 | { |
|---|
| | 150 | return m_recorder; |
|---|
| | 151 | } |
|---|
| | 152 | |
|---|
| | 153 | public function resetWindowsPosition():void |
|---|
| | 154 | { |
|---|
| | 155 | canvasWindow.rotate(0); |
|---|
| | 156 | canvasWindow.transform.matrix = new Matrix(1, 0, 0, 1, initCanvasWindow.x, initCanvasWindow.y); |
|---|
| | 157 | penDetailWindow.move(initPenDetailWindowPos.x, initPenDetailWindowPos.y); |
|---|
| | 158 | layerWindow.move(initLayerWindowPos.x, initLayerWindowPos.y); |
|---|
| | 159 | toolController.move(initToolController.x, initToolController.y); |
|---|
| | 160 | canvasWindow.width = initCanvasWindow.width; |
|---|
| | 161 | canvasWindow.height = initCanvasWindow.height; |
|---|
| | 162 | toolController.setRotate(0); |
|---|
| | 163 | toolController.setZoom(1); |
|---|
| | 164 | } |
|---|
| | 165 | |
|---|
| | 166 | public function deserialize(s:String):void |
|---|
| | 167 | { |
|---|
| | 168 | // TODO: 実装 |
|---|
| | 169 | // var log:GPLogger = GPLogger.deserialize(s); |
|---|
| | 170 | } |
|---|
| | 171 | |
|---|
| | 172 | private function onPreinitialize(event:FlexEvent):void |
|---|
| | 173 | { |
|---|
| | 174 | var width:int = 0; |
|---|
| | 175 | var height:int = 0; |
|---|
| | 176 | var undoBufferSize:int = 0; |
|---|
| | 177 | if (DEBUG) { |
|---|
| | 178 | /* |
|---|
| | 179 | parameters['oekakiId'] = 23724; |
|---|
| | 180 | parameters['baseImgUrl'] = 'http://dic.nicovideo.jp/oekaki_layers/23724'; |
|---|
| | 181 | parameters['baseImgInfoUrl'] = 'http://dic.nicovideo.jp/oekaki_info/23724'; |
|---|
| | 182 | */ |
|---|
| | 183 | parameters['postUrl'] = 'http://dic.dev.nicovideo.jp/'; |
|---|
| | 184 | parameters['cookie'] = 'cookie'; |
|---|
| | 185 | parameters['magic'] = 'magic'; |
|---|
| | 186 | parameters['redirectUrl'] = 'http://dic.dev.nicovideo.jp/'; |
|---|
| | 187 | parameters['undoBufferSize'] = 16; |
|---|
| | 188 | parameters['canvasWidth'] = 417; |
|---|
| | 189 | parameters['canvasHeight'] = 317; |
|---|
| | 190 | } |
|---|
| | 191 | |
|---|
| | 192 | width = int(parameters['canvasWidth']); |
|---|
| | 193 | height = int(parameters['canvasHeight']); |
|---|
| | 194 | undoBufferSize = int(parameters['undoBufferSize']); |
|---|
| | 195 | |
|---|
| | 196 | var bytes:ByteArray = new ByteArray(); |
|---|
| | 197 | m_recorder = Recorder.create(bytes, width, height, undoBufferSize); |
|---|
| | 198 | m_context = new CanvasModuleContext(m_recorder); |
|---|
| | 199 | m_module = m_context.getModule(FreeHandModule.FREE_HAND); |
|---|
| | 200 | m_commit = 0; |
|---|
| | 201 | m_recorder.addEventListener(CommandEvent.COMMITTED, onCommit); |
|---|
| | 202 | } |
|---|
| | 203 | |
|---|
| | 204 | private function onCommit(event:CommandEvent):void |
|---|
| | 205 | { |
|---|
| | 206 | trace(event.command); |
|---|
| | 207 | m_commit++; |
|---|
| | 208 | } |
|---|
| | 209 | |
|---|
| | 210 | private function onCreationComplete(event:FlexEvent):void |
|---|
| | 211 | { |
|---|
| | 212 | var width:uint = 0; |
|---|
| | 213 | var height:uint = 0; |
|---|
| | 214 | var undoBufferSize:uint = 0; |
|---|
| | 215 | |
|---|
| | 216 | if (DEBUG) { |
|---|
| | 217 | // debug buttons |
|---|
| | 218 | //logPlayButton.addEventListener(FlexEvent.BUTTON_DOWN, playLogHandler); |
|---|
| | 219 | versionLabel.text += 'debug'; |
|---|
| | 220 | //logPlayButton.visible = true; |
|---|
| | 221 | //checkPngButton.visible = true; |
|---|
| | 222 | } |
|---|
| | 223 | |
|---|
| | 224 | /* |
|---|
| | 225 | enabled = false; |
|---|
| | 226 | canvasWindow.enabled = false; |
|---|
| | 227 | penDetailWindow.enabled = false; |
|---|
| | 228 | layerWindow.enabled = false; |
|---|
| | 229 | */ |
|---|
| | 230 | |
|---|
| | 231 | // ポップアップさせて、そいつらの初期位置を覚える |
|---|
| | 232 | PopUpManager.addPopUp(canvasWindow, this); |
|---|
| | 233 | PopUpManager.addPopUp(penDetailWindow, this); |
|---|
| | 234 | PopUpManager.addPopUp(layerWindow, this); |
|---|
| | 235 | PopUpManager.addPopUp(toolController, this); |
|---|
| | 236 | initCanvasWindow = new Rectangle(canvasWindow.x, canvasWindow.y, canvasWindow.width, canvasWindow.height); |
|---|
| | 237 | initPenDetailWindowPos = new Point(penDetailWindow.x, penDetailWindow.y); |
|---|
| | 238 | initLayerWindowPos = new Point(layerWindow.x, layerWindow.y); |
|---|
| | 239 | initToolController = new Point(toolController.x, toolController.y); |
|---|
| | 240 | |
|---|
| | 241 | if (parameters['postUrl'] && parameters['cookie'] && parameters['magic'] && parameters['redirectUrl']) { |
|---|
| | 242 | //postOekakiButton.enabled = true; |
|---|
| | 243 | redirectUrl = parameters['redirectUrl']; |
|---|
| | 244 | } |
|---|
| | 245 | if (parameters['undoBufferSize']) { |
|---|
| | 246 | undoBufferSize = int(parameters['undoBufferSize']); |
|---|
| | 247 | if (undoBufferSize < 0) { |
|---|
| | 248 | Alert.show('最大アンドゥ回数が少なすぎます。', ALERT_TITLE); |
|---|
| | 249 | } |
|---|
| | 250 | if (undoBufferSize > 32) { |
|---|
| | 251 | Alert.show('最大アンドゥ回数が多すぎます。', ALERT_TITLE); |
|---|
| | 252 | } |
|---|
| | 253 | } |
|---|
| | 254 | else { |
|---|
| | 255 | return; |
|---|
| | 256 | } |
|---|
| | 257 | if (parameters['oekakiId'] && parameters['baseImgUrl']) { |
|---|
| | 258 | oekakiId = uint(parameters['oekakiId']); |
|---|
| | 259 | //new Com().loadURL(parameters['baseImgUrl'], getBaseImgHandler); |
|---|
| | 260 | } |
|---|
| | 261 | else { |
|---|
| | 262 | if (parameters['canvasWidth'] && parameters['canvasHeight']) { |
|---|
| | 263 | width = int(parameters['canvasWidth']); |
|---|
| | 264 | height = int(parameters['canvasHeight']); |
|---|
| | 265 | if (width < MIN_CANVAS_WIDTH || height < MIN_CANVAS_HEIGHT) { |
|---|
| | 266 | Alert.show('キャンバスサイズが小さすぎます。', ALERT_TITLE); |
|---|
| | 267 | return; |
|---|
| | 268 | } |
|---|
| | 269 | if (width > MAX_CANVAS_WIDTH || height > MAX_CANVAS_HEIGHT) { |
|---|
| | 270 | Alert.show('キャンバスサイズが大きすぎます。', ALERT_TITLE); |
|---|
| | 271 | return; |
|---|
| | 272 | } |
|---|
| | 273 | } else { |
|---|
| | 274 | return; |
|---|
| | 275 | } |
|---|
| | 276 | } |
|---|
| | 277 | m_context.add(new MovingCanvasModule(m_recorder, canvasWindow)); |
|---|
| | 278 | } |
|---|
| | 279 | |
|---|
| | 280 | private function onApplicationComplete(event:FlexEvent):void |
|---|
| | 281 | { |
|---|
| | 282 | stage.addEventListener(KeyboardEvent.KEY_DOWN, onKeyDown); |
|---|
| | 283 | stage.addEventListener(KeyboardEvent.KEY_UP, onKeyUp); |
|---|
| | 284 | //stage.addEventListener(MouseEvent.MOUSE_UP, onMouseUp); |
|---|
| | 285 | //stage.addEventListener(MouseEvent.MOUSE_OUT, onMouseUp); // これを入れるとマズい。 |
|---|
| | 286 | } |
|---|
| | 287 | |
|---|
| | 288 | private function onRemove(event:Event):void |
|---|
| | 289 | { |
|---|
| | 290 | m_recorder.removeEventListener(CommandEvent.COMMITTED, onCommit); |
|---|
| | 291 | stage.removeEventListener(KeyboardEvent.KEY_DOWN, onKeyDown); |
|---|
| | 292 | stage.removeEventListener(KeyboardEvent.KEY_UP, onKeyUp); |
|---|
| | 293 | //stage.removeEventListener(MouseEvent.MOUSE_UP, onMouseUp); |
|---|
| | 294 | //stage.removeEventListener(MouseEvent.MOUSE_OUT, onMouseUp); |
|---|
| | 295 | } |
|---|
| | 296 | |
|---|
| | 297 | // canvasでの外のmouseUpをcanvasに通知 |
|---|
| | 298 | private function onMouseUp(evt:MouseEvent):void |
|---|
| | 299 | { |
|---|
| | 300 | module.interrupt(evt.localX, evt.localY); |
|---|
| | 301 | } |
|---|
| | 302 | |
|---|
| | 303 | private function get isShortCut():Boolean |
|---|
| | 304 | { |
|---|
| | 305 | return stage.focus is mx.core.UITextField; |
|---|
| | 306 | } |
|---|
| | 307 | |
|---|
| | 308 | private function onKeyDown(evt:KeyboardEvent):void |
|---|
| | 309 | { |
|---|
| | 310 | if (isShortCut) |
|---|
| | 311 | return; |
|---|
| | 312 | switch (evt.keyCode) { |
|---|
| | 313 | case Keyboard.CONTROL: |
|---|
| | 314 | penDetailWindow.pen = DropperModule.DROPPER; |
|---|
| | 315 | break; |
|---|
| | 316 | case Keyboard.SHIFT: |
|---|
| | 317 | break; |
|---|
| | 318 | case Keyboard.SPACE: |
|---|
| | 319 | penDetailWindow.pen = MovingCanvasModule.MOVING_CANVAS; |
|---|
| | 320 | break; |
|---|
| | 321 | case 48: // 0 |
|---|
| | 322 | case 96: // ten-key 0 |
|---|
| | 323 | evt.shiftKey ? toolController.setRotate(0) : toolController.setZoom(1); |
|---|
| | 324 | break; |
|---|
| | 325 | case 65: // a |
|---|
| | 326 | // Aキーの状態 = 押下中 |
|---|
| | 327 | m_module.keyA = true; |
|---|
| | 328 | break; |
|---|
| | 329 | case 73: // i |
|---|
| | 330 | resetWindowsPosition(); |
|---|
| | 331 | break; |
|---|
| | 332 | case 77: // m |
|---|
| | 333 | m_module.horizontalMirror(Painter.ALL_LAYERS); |
|---|
| | 334 | break; |
|---|
| | 335 | case 81: // q |
|---|
| | 336 | // Qキーの状態 = 押下中 |
|---|
| | 337 | m_module.keyQ = true; |
|---|
| | 338 | break; |
|---|
| | 339 | case 82: // r |
|---|
| | 340 | // Rキーの状態 = 押下中 |
|---|
| | 341 | m_module.shouldDrawFromEndPoint = true; |
|---|
| | 342 | break; |
|---|
| | 343 | // 20090905-haku2 ins start |
|---|
| | 344 | case 84: // t |
|---|
| | 345 | // Tキーの状態 = 押下中 |
|---|
| | 346 | m_module.shouldDrawFromStartPoint = true; |
|---|
| | 347 | break; |
|---|
| | 348 | // 20090905-haku2 ins end |
|---|
| | 349 | case 89: // y |
|---|
| | 350 | m_module.redo(); |
|---|
| | 351 | break; |
|---|
| | 352 | case 90: // z |
|---|
| | 353 | m_module.undo(); |
|---|
| | 354 | break; |
|---|
| | 355 | case 107: // ten key + |
|---|
| | 356 | // + |
|---|
| | 357 | toolController.setZoom(toolController.canvasZoom.value + 1); |
|---|
| | 358 | break; |
|---|
| | 359 | case 109: // ten key - |
|---|
| | 360 | // - |
|---|
| | 361 | toolController.setZoom(toolController.canvasZoom.value - 1); |
|---|
| | 362 | break; |
|---|
| | 363 | case 187: |
|---|
| | 364 | if (evt.shiftKey) |
|---|
| | 365 | // + |
|---|
| | 366 | toolController.setZoom(toolController.canvasZoom.value + 1); |
|---|
| | 367 | break; |
|---|
| | 368 | case 189: |
|---|
| | 369 | // - |
|---|
| | 370 | toolController.setZoom(toolController.canvasZoom.value - 1); |
|---|
| | 371 | break; |
|---|
| | 372 | case 49: // 1 |
|---|
| | 373 | case 50: // 2 |
|---|
| | 374 | case 51: // 3 |
|---|
| | 375 | case 52: // 4 |
|---|
| | 376 | case 53: // 5 |
|---|
| | 377 | case 54: // 6 |
|---|
| | 378 | case 55: // 7 |
|---|
| | 379 | case 56: // 8 |
|---|
| | 380 | case 57: // 9 |
|---|
| | 381 | if (!evt.shiftKey)// 念のため SHIFTキー対応 (テンキーのほうは放置) |
|---|
| | 382 | penDetailWindow.currentThickness = evt.keyCode - 48; |
|---|
| | 383 | break; |
|---|
| | 384 | case 97: // ten-key 1 |
|---|
| | 385 | case 98: // ten-key 2 |
|---|
| | 386 | case 99: // ten-key 3 |
|---|
| | 387 | case 100: // ten-key 4 |
|---|
| | 388 | case 101: // ten-key 5 |
|---|
| | 389 | case 102: // ten-key 6 |
|---|
| | 390 | case 103: // ten-key 7 |
|---|
| | 391 | case 104: // ten-key 8 |
|---|
| | 392 | case 105: // ten-key 9 |
|---|
| | 393 | penDetailWindow.currentThickness = evt.keyCode - 96; |
|---|
| | 394 | break; |
|---|
| | 395 | case 45: // INS |
|---|
| | 396 | if (!evt.shiftKey) |
|---|
| | 397 | toolController.setRotate(0); |
|---|
| | 398 | break; |
|---|
| | 399 | default: |
|---|
| | 400 | // Alert('' + evt.keyCode); |
|---|
| | 401 | break; |
|---|
| | 402 | } |
|---|
| | 403 | } |
|---|
| | 404 | |
|---|
| | 405 | private function onKeyUp(evt:KeyboardEvent):void |
|---|
| | 406 | { |
|---|
| | 407 | if (isShortCut) |
|---|
| | 408 | return; |
|---|
| | 409 | switch (evt.keyCode) { |
|---|
| | 410 | case Keyboard.CONTROL: |
|---|
| | 411 | penDetailWindow.reset(); |
|---|
| | 412 | break; |
|---|
| | 413 | case Keyboard.SPACE: |
|---|
| | 414 | penDetailWindow.reset(); |
|---|
| | 415 | break; |
|---|
| | 416 | case 65: // a |
|---|
| | 417 | // Aキーの状態 = 解放 |
|---|
| | 418 | m_module.keyA = false; |
|---|
| | 419 | break; |
|---|
| | 420 | case 81: // q |
|---|
| | 421 | // Qキーの状態 = 解放 |
|---|
| | 422 | m_module.keyQ = false; |
|---|
| | 423 | break; |
|---|
| | 424 | case 82: // r |
|---|
| | 425 | // Rキーの状態 = 解放 |
|---|
| | 426 | m_module.shouldDrawFromEndPoint = false; |
|---|
| | 427 | break; |
|---|
| | 428 | case 84: // t |
|---|
| | 429 | // Tキーの状態 = 解放 |
|---|
| | 430 | m_module.shouldDrawFromStartPoint = false; |
|---|
| | 431 | break; |
|---|
| | 432 | return; |
|---|
| | 433 | } |
|---|
| | 434 | } |
|---|
| | 435 | |
|---|
| | 436 | private function alertOnUnload(b:Boolean):void |
|---|
| | 437 | { |
|---|
| | 438 | if (ExternalInterface.available) { |
|---|
| | 439 | try { |
|---|
| | 440 | ExternalInterface.call("changeAlertOnUnload", b); |
|---|
| | 441 | } catch (e:SecurityError) { |
|---|
| | 442 | } catch (e:Error) { |
|---|
| | 443 | } |
|---|
| | 444 | } |
|---|
| | 445 | } |
|---|
| | 446 | ]]> |
|---|
| 30 | | <mx:Canvas id="toolCanvas" height="155" right="0" left="0" y="0"> |
|---|
| 31 | | <mx:Label x="12" y="7" text="投稿者名"/> |
|---|
| 32 | | <mx:TextInput id="fromTextInput" x="55" y="3" maxChars="32" fontSize="14" focusThickness="0"/> |
|---|
| 33 | | <mx:Label x="2" y="36" text="絵のタイトル"/> |
|---|
| 34 | | <mx:TextInput id="titleTextInput" x="55" y="32" maxChars="32" fontSize="14" focusThickness="0" width="406"/> |
|---|
| 35 | | <mx:CheckBox id="watchlistCheckBox" x="223" y="7" label="ウォッチリストに登録"/> |
|---|
| 36 | | <mx:Label x="10" y="76" text="書き込み"/> |
|---|
| 37 | | <mx:TextArea id="messageTextArea" x="55" y="61" width="406" height="61" fontSize="14" focusThickness="0"> |
|---|
| 38 | | <mx:text></mx:text> |
|---|
| 39 | | </mx:TextArea> |
|---|
| 40 | | <mx:Button id="rotateResetButton" y="63" label="角度" width="29" paddingLeft="0" paddingRight="0" paddingTop="0" paddingBottom="0" height="17" right="204" buttonDown="setRotate(0)"/> |
|---|
| 41 | | <mx:Button id="zoomResetButton" y="81" label="拡大" width="29" paddingLeft="0" paddingRight="0" paddingTop="0" paddingBottom="0" height="17" right="204" buttonDown="setZoom(1)"/> |
|---|
| 42 | | <mx:Button id="horizontalMirrorButton" x="117" y="128" label="全レイヤー左右反転" width="120" paddingLeft="0" paddingRight="0" paddingTop="0" paddingBottom="0" height="17" buttonDown="module.horizontalMirror(Painter.ALL_LAYERS)"/> |
|---|
| 43 | | <mx:Button id="verticalMirrorButton" x="245" y="128" label="全レイヤー上下反転" width="120" paddingLeft="0" paddingRight="0" paddingTop="0" paddingBottom="0" height="17" buttonDown="module.verticalMirror(Painter.ALL_LAYERS)"/> |
|---|
| 44 | | <mx:HSlider id="canvasRotate" y="62" width="152" minimum="-180" maximum="180" snapInterval="5" value="0" right="49" showDataTip="false" change="setRotate(event.value)" thumbDrag="setRotate(event.value)"/> |
|---|
| 45 | | <mx:HSlider id="canvasZoom" y="79" width="152" minimum="-4" maximum="16" snapInterval="0.1" value="1" right="49" showDataTip="false" change="setZoom(event.value)" thumbDrag="setZoom(event.value)"/> |
|---|
| 46 | | <mx:TextInput id="canvasRotateValue" y="66" width="32" height="17" right="18" fontSize="8" textAlign="right" text="0" restrict="0-9" maxChars="4" enter="onChangeCanvasRotate(event)"/> |
|---|
| 47 | | <mx:Label y="66" text="°" right="0"/> |
|---|
| 48 | | <mx:TextInput id="canvasZoomValue" y="83" width="32" height="17" right="18" fontSize="8" textAlign="right" text="100" restrict="0-9" maxChars="6" enter="onChangeCanvasZoom(event)"/> |
|---|
| 49 | | <mx:Label y="83" text="%" right="0"/> |
|---|
| 50 | | |
|---|
| 51 | | <mx:Label y="4" text="補助線" right="199"/> |
|---|
| 52 | | <mx:NumericStepper id="additionalNumberStepper" y="4" value="4" minimum="2" maximum="16" stepSize="1" right="143" height="18" fontSize="8" change="onChangeAuxDivideCount(event)"/> |
|---|
| 53 | | <mx:CheckBox id="additionalBoxCheckBox" y="2" label="縦横" right="8" fontSize="9" height="18" change="onChangeAuxBoxVisible(event)"/> |
|---|
| 54 | | <mx:CheckBox id="additionalSkewCheckBox" y="18" label="斜め" right="9" fontSize="9" height="18" change="onChangeAuxSkewVisible(event)"/> |
|---|
| 55 | | <mx:Button id="postOekakiButton" x="353" y="7" label="お絵カキコする!" fillAlphas="[1.0, 1.0, 1.0, 1.0]" fillColors="[#FFFFFF, #FF9999, #FFFFFF, #FFCCCC]" enabled="false" buttonDown="postOekakiButtonHandler(event)"/> |
|---|
| 56 | | <mx:Button id="undoButton" y="38" label="アンドゥ" enabled="false" paddingLeft="3" paddingRight="3" right="89" buttonDown="m_recorder.undo()"/> |
|---|
| 57 | | <mx:Button id="redoButton" y="38" label="リドゥ" enabled="false" paddingLeft="3" paddingRight="3" right="12" buttonDown="m_recorder.redo()"/> |
|---|
| 58 | | <mx:Button id="windowsResetButton" x="10" y="128" label="ウィンドウ初期状態" width="99" paddingLeft="0" paddingRight="0" paddingTop="0" paddingBottom="0" height="17" buttonDown="resetWindowsPosition()"/> |
|---|
| 59 | | <mx:Button id="passwordButton" x="373" y="128" label="ふっかつのじゅもん" width="99" paddingLeft="0" paddingRight="0" paddingTop="0" paddingBottom="0" height="17" enabled="false" buttonDown="passwordButtonHandler(event)"/> |
|---|
| 60 | | <mx:Button id="logPlayButton" y="105" label="ログプレイ" visible="false" right="99"/> |
|---|
| 61 | | <mx:Button id="checkPngButton" y="105" label="同一check" visible="false" right="10"/> |
|---|
| 62 | | <mx:ComboBox y="4" id="additionalTypeComboBox" right="66" width="70" fontSize="8" height="18" selectedIndex="0" change="onChangeAuxType(event)"> |
|---|
| 63 | | <mx:ArrayCollection id="auxTypes"> |
|---|
| 64 | | <mx:Object label="分割" data="0" /> |
|---|
| 65 | | <mx:Object label="px単位" data="1" /> |
|---|
| 66 | | </mx:ArrayCollection> |
|---|
| 67 | | </mx:ComboBox> |
|---|
| 68 | | </mx:Canvas> |
|---|
| 69 | | <gpcontrol:PenDetailWindowControl id="penDetailWindow" x="9" y="163" layout="absolute" title="ペン" height="450" /> |
|---|
| 70 | | <gpcontrol:GPCanvasWindowControl id="gpCanvasWindow" x="145" y="163" width="379" height="410" layout="absolute" title="キャンバス" /> |
|---|
| 71 | | <gpcontrol:GPLayerWindowControl x="532" y="163" layout="absolute" title="レイヤー" id="gpLayerWindow" height="312" /> |
|---|
| | 462 | <ui:ToolController id="toolController" left="10" y="10" title="補助ツール" /> |
|---|
| | 463 | <gpcontrol:PenDetailWindowControl id="penDetailWindow" x="10" y="218" layout="absolute" title="ペン" height="450" /> |
|---|
| | 464 | <gpcontrol:GPCanvasWindowControl id="canvasWindow" x="146" y="218" width="379" height="410" layout="absolute" title="キャンバス" /> |
|---|
| | 465 | <gpcontrol:GPLayerWindowControl x="533" y="218" layout="absolute" title="レイヤー" id="layerWindow" height="312" /> |
|---|