Re: [J2ME] 請問製作小畫家

看板java作者 (痞子軍團團長)時間17年前 (2008/09/15 15:37), 編輯推噓3(302)
留言5則, 4人參與, 最新討論串2/2 (看更多)
※ 引述《q1980 (啦啦)》之銘言: : 希望此程式可以讀入圖片檔 : 想使用者在其上畫圖畫到一半時 : 按下方向鍵後原本圖形會移動 : 讓使用者可以畫原本螢幕外的區域 : 但javax.microedition.lcdui.Image.createImage() : 讀取圖片後是immutable無法在其上作圖 你沒有給程式碼、也沒有說明怎麼「作圖」的 這樣誰知道你犯了什麼錯誤? 抑或是根本無解? 我 google javax.microedition.lcdui.Image 之後 找到 api,然後針對內容 search immutable Images are either mutable or immutable depending upon how they are created. Immutable images are generally created by loading image data from resource bundles, from files, or from the network. They may not be modified once created. Mutable images are created as blank images containing only white pixels. The application may render on a mutable image by calling getGraphics() on the Image to obtain a Graphics object expressly for this purpose. 唉.... : 請問有什麼辦法可以做到上述啊 謝謝 : PS.我的觸控螢幕手機似乎有支援FileConnection API 有支援 FileConnection API 跟你的問題的關係到底是什麼? 還是你只是想跟大家講你有觸控螢幕手機...? ---- 我砍了這篇文章兩次,也寄信寄了兩次 要求原 po 把問題問的清楚一點 結果最後只有加上 package 的名稱(參見精華區中的暫存區) 原 po 若再觸犯作業文條款,直接水桶一個月 -- 侃侃長論鮮窒礙 首頁:http://www.psmonkey.idv.tw 眾目睽睽無心顫 Blog:http://ps-think.blogspot.com 煢居少聊常人事 殺頭容易告白難 歡迎參觀 Java 版(@ptt.cc)精華區 \囧/ -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 124.218.58.96

09/15 18:07, , 1F
就是因為我認為用這方法是無解的,所以才沒有附完整程式碼,
09/15 18:07, 1F

09/15 18:10, , 2F
而FileConnection可能是解決的方向,但我不知道要怎麼做
09/15 18:10, 2F

09/15 21:14, , 3F
看清楚 API 講啥,我不相信是無解(是說,也懶得幫你寫)
09/15 21:14, 3F

09/16 03:34, , 4F
Graphics 才是可能解決的方向吧?
09/16 03:34, 4F

09/16 11:33, , 5F
將讀上來的image clone一份哪份就是可以改的了吧
09/16 11:33, 5F
文章代碼(AID): #18pX2ixX (java)
文章代碼(AID): #18pX2ixX (java)