51_라이브이미지 OCX 사용예제.xrw 49 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496
  1. <?xml version="1.0" encoding="EUC-KR"?>
  2. <?xml-stylesheet type="text/css" href="../../../com/commonweb/css/common.css" ?>
  3. <xhtml:html xmlns:xhtml="http://www.w3.org/1999/xhtml" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://www.w3.org/2002/01/xforms" xmlns:ev="http://www.w3.org/2001/xml-events">
  4. <xhtml:head>
  5. <xhtml:title>Untitle</xhtml:title>
  6. <model id="model1">
  7. <instance id="instance1">
  8. <root xmlns="">
  9. <main>
  10. <editimgelist>
  11. <editimge/>
  12. </editimgelist>
  13. </main>
  14. <temp>
  15. <imgelist>
  16. <!--imge0/>
  17. <imge1/>
  18. <imge2/>
  19. <imge3/>
  20. <imge4/>
  21. <imge5/>
  22. <imge6/>
  23. <imge7/>
  24. <imge8/>
  25. <imge9/-->
  26. </imgelist>
  27. <newElement/>
  28. </temp>
  29. <send>
  30. </send>
  31. <init>
  32. <selectnode>
  33. <fontfamily>굴림</fontfamily>
  34. <fontstyle>0</fontstyle>
  35. <fontsize>12</fontsize>
  36. <linkind>solid</linkind>
  37. <lineweight>2</lineweight>
  38. <fontcolor/>
  39. <backcolor/>
  40. <linecolor/>
  41. <imgenm/>
  42. <imgeno/>
  43. <viewmode>1</viewmode>
  44. <colorbt/>
  45. </selectnode>
  46. </init>
  47. <base64_1/>
  48. <MakeOneCanvas/>
  49. <base64_3/>
  50. <base64_2/>
  51. <base64_1_Add/>
  52. <base64_2_Add/>
  53. <base64_3_Add/>
  54. <base64/>
  55. <ViewMode/>
  56. <gridNum>0</gridNum>
  57. <ShapeString/>
  58. <MetaData/>
  59. <BitmapBase64/>
  60. <JpegBase64/>
  61. <Thumnail/>
  62. <ClipboardData/>
  63. </root>
  64. </instance>
  65. <script type="javascript" ev:event="xforms-ready">
  66. <![CDATA[
  67. fFormReady();
  68. ]]>
  69. </script>
  70. <submission id="TRMRF01901" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" resultref="/root/main/indxlist"/>
  71. </model>
  72. <script type="javascript" src="../../../com/commonweb/js/common.js"/>
  73. <script type="javascript" src="../../../com/commonweb/js/tfHelper.js"/>
  74. <script type="javascript" src="../../../emr/commonweb/js/EMRCommon.js"/>
  75. <script type="javascript" src="../../../tmp/sampleweb/js/LiveImage.js"/>
  76. </xhtml:head>
  77. <xhtml:body guideline="2,752;1,529;2,20;1,1158;" style="background-color:#ffffff; margin-left:0; margin-top:0; margin-right:0; margin-bottom:0; ">
  78. <object id="obj_image" clsid="{72e5d9ed-0d6a-46e8-aead-23144bfef878}" style="left:0px; top:20px; width:530px; height:530px; background-color:#ffffff; "/>
  79. <group id="grup_bottom" overflow="hidden" style="left:0px; top:550px; width:530px; height:200px; ">
  80. <datagrid id="grd_imgelist" nodeset="/root/temp/imgelist" caption="^^^^^^^^^" colsep="^" mergecellsfixedrows="bycolrec" rowsep="|" selectionmode="bycol" style="left:0px; top:57px; width:530px; height:141px; ">
  81. <col ref="imge" visibility="hidden" style="left:0px; top:23px; width:100px; height:23px; border-style:none; "/>
  82. <script type="javascript" ev:event="onkeydown">
  83. <![CDATA[
  84. if (grd_imgelist.iscell(event.target) && event.keyCode == 46)
  85. {
  86. fDelImgeList();
  87. }
  88. ]]>
  89. </script>
  90. <script type="javascript" ev:event="ondblclick">
  91. <![CDATA[
  92. fDbClick();
  93. ]]>
  94. </script>
  95. </datagrid>
  96. <button id="btn_point" class="icon_point" style="left:155px; top:5px; width:23px; height:23px; ">
  97. <caption/>
  98. <script type="javascript" ev:event="DOMActivate">
  99. <![CDATA[
  100. obj_image.SetBaseSize(10, 10);
  101. obj_image.SetShapeStyle("border-color", "red");
  102. obj_image.SetShapeStyle("border-width", "2");
  103. obj_image.SelectDrawType(3, true);
  104. ]]>
  105. </script>
  106. <hint>
  107. <![CDATA[표시]]>
  108. </hint>
  109. </button>
  110. <button id="btn_rect" class="icon_rect" style="left:105px; top:5px; width:23px; height:23px; ">
  111. <caption/>
  112. <script type="javascript" ev:event="DOMActivate">
  113. <![CDATA[
  114. obj_image.SelectDrawType(2, true);
  115. obj_image.SetShapeStyle("border-width", "2");
  116. ]]>
  117. </script>
  118. <hint>
  119. <![CDATA[사각형]]>
  120. </hint>
  121. </button>
  122. <button id="btn_select" class="icon_select" style="left:5px; top:5px; width:23px; height:23px; ">
  123. <caption/>
  124. <script type="javascript" ev:event="DOMActivate">
  125. <![CDATA[
  126. obj_image.SelectDrawType(0, true);
  127. ]]>
  128. </script>
  129. <hint>
  130. <![CDATA[선택]]>
  131. </hint>
  132. </button>
  133. <button id="btn_fontcolor" class="icon_font_color" style="left:280px; top:5px; width:23px; height:23px; ">
  134. <caption/>
  135. <script type="javascript" ev:event="DOMActivate">
  136. <![CDATA[
  137. if (colorpicker.visible) {
  138. colorpicker.visible = false;
  139. } else {
  140. var btnid = window.event.target;
  141. model.setValue("/root/init/selectnode/colorbt", btnid);
  142. colorpicker.visible = true;
  143. }
  144. ]]>
  145. </script>
  146. <hint>
  147. <![CDATA[글색]]>
  148. </hint>
  149. </button>
  150. <button id="btn_line" class="icon_line" style="left:55px; top:5px; width:23px; height:23px; ">
  151. <caption/>
  152. <script type="javascript" ev:event="DOMActivate">
  153. <![CDATA[
  154. obj_image.SelectDrawType(1, true);
  155. obj_image.SetShapeStyle("border-width", model.getValue("/root/init/selectnode/lineweight"));
  156. ]]>
  157. </script>
  158. <hint>
  159. <![CDATA[선]]>
  160. </hint>
  161. </button>
  162. <button id="btn_del" class="icon_eraser" style="left:180px; top:5px; width:23px; height:23px; ">
  163. <caption/>
  164. <script type="javascript" ev:event="DOMActivate">
  165. <![CDATA[
  166. obj_image.DeleteShape();
  167. ]]>
  168. </script>
  169. <hint>
  170. <![CDATA[지우기]]>
  171. </hint>
  172. </button>
  173. <button id="btn_freeline" class="icon_freeline" style="left:80px; top:5px; width:23px; height:23px; ">
  174. <caption/>
  175. <script type="javascript" ev:event="DOMActivate">
  176. <![CDATA[
  177. obj_image.SelectDrawType(5, true);
  178. obj_image.SetShapeStyle("border-width", model.getValue("/root/init/selectnode/lineweight"));
  179. ]]>
  180. </script>
  181. <hint>
  182. <![CDATA[자유 곡선]]>
  183. </hint>
  184. </button>
  185. <button id="btn_bgcolor" class="icon_fill_color" appearance="button" style="left:305px; top:5px; width:23px; height:23px; ">
  186. <caption/>
  187. <script type="javascript" ev:event="DOMActivate">
  188. <![CDATA[
  189. if (colorpicker.visible) {
  190. colorpicker.visible = false;
  191. } else {
  192. var btnid = window.event.target;
  193. model.setValue("/root/init/selectnode/colorbt", btnid);
  194. colorpicker.visible = true;
  195. }
  196. ]]>
  197. </script>
  198. <hint>
  199. <![CDATA[배경색]]>
  200. </hint>
  201. </button>
  202. <button id="btn_linecolor" class="icon_line_color" appearance="button" style="left:330px; top:5px; width:23px; height:23px; ">
  203. <caption/>
  204. <script type="javascript" ev:event="DOMActivate">
  205. <![CDATA[
  206. if (colorpicker.visible) {
  207. colorpicker.visible = false;
  208. } else {
  209. var btnid = window.event.target;
  210. model.setValue("/root/init/selectnode/colorbt", btnid);
  211. colorpicker.visible = true;
  212. }
  213. ]]>
  214. </script>
  215. <hint>
  216. <![CDATA[선색]]>
  217. </hint>
  218. </button>
  219. <button id="button11" class="icon_undo" style="left:230px; top:5px; width:23px; height:23px; ">
  220. <caption/>
  221. <script type="javascript" ev:event="DOMActivate">
  222. <![CDATA[
  223. obj_image.Undo();
  224. ]]>
  225. </script>
  226. </button>
  227. <button id="btn_text" class="icon_text" style="left:30px; top:5px; width:23px; height:23px; ">
  228. <caption/>
  229. <script type="javascript" ev:event="DOMActivate">
  230. <![CDATA[
  231. obj_image.SelectDrawType(4, false);
  232. ]]>
  233. </script>
  234. <hint>
  235. <![CDATA[글]]>
  236. </hint>
  237. </button>
  238. <button id="button12" class="icon_redo" style="left:255px; top:5px; width:23px; height:23px; ">
  239. <caption/>
  240. <script type="javascript" ev:event="DOMActivate">
  241. <![CDATA[
  242. obj_image.Redo();
  243. ]]>
  244. </script>
  245. </button>
  246. <button id="btn_drawcancel" class="icon_x" style="left:205px; top:5px; width:23px; height:23px; ">
  247. <caption/>
  248. <script type="javascript" ev:event="DOMActivate">
  249. <![CDATA[
  250. obj_image.DeleteAllShape();
  251. ]]>
  252. </script>
  253. <hint>
  254. <![CDATA[처음상태로]]>
  255. </hint>
  256. </button>
  257. <button id="btn_round" class="icon_round" style="left:130px; top:5px; width:23px; height:23px; ">
  258. <caption/>
  259. <script type="javascript" ev:event="DOMActivate">
  260. <![CDATA[
  261. obj_image.SelectDrawType(3, false);
  262. obj_image.SetShapeStyle("border-width", "2");
  263. ]]>
  264. </script>
  265. <hint>
  266. <![CDATA[원]]>
  267. </hint>
  268. </button>
  269. <shape id="roundrect3" class="roundrect_btnset" appearance="roundrect" style="left:0px; top:0px; width:530px; height:55px; "/>
  270. <select1 id="combo1" ref="/root/init/selectnode/fontfamily" appearance="minimal" style="left:40px; top:30px; width:75px; height:19px; ">
  271. <choices>
  272. <item>
  273. <label>굴림</label>
  274. <value>굴림</value>
  275. </item>
  276. <item>
  277. <label>굴림체</label>
  278. <value>굴림체</value>
  279. </item>
  280. <item>
  281. <label>돋움</label>
  282. <value>돋움</value>
  283. </item>
  284. <item>
  285. <label>돋움체</label>
  286. <value>돋움체</value>
  287. </item>
  288. <item>
  289. <label>궁서</label>
  290. <value>궁서</value>
  291. </item>
  292. <item>
  293. <label>궁서체</label>
  294. <value>궁서체</value>
  295. </item>
  296. <item>
  297. <label>바탕</label>
  298. <value>바탕</value>
  299. </item>
  300. <item>
  301. <label>바탕체</label>
  302. <value>바탕체</value>
  303. </item>
  304. <item>
  305. <label>HY그래픽</label>
  306. <value>HY그래픽</value>
  307. </item>
  308. </choices>
  309. <script type="javascript" ev:event="xforms-select">
  310. <![CDATA[
  311. obj_image.SetShapeStyle("font-family", model.getValue("/root/init/selectnode/fontfamily"));
  312. ]]>
  313. </script>
  314. </select1>
  315. <select1 id="combo2" ref="/root/init/selectnode/fontstyle" appearance="minimal" style="left:115px; top:30px; width:75px; height:19px; ">
  316. <choices>
  317. <item>
  318. <label>보통</label>
  319. <value>0</value>
  320. </item>
  321. <item>
  322. <label>굵게</label>
  323. <value>1</value>
  324. </item>
  325. <item>
  326. <label>기울임꼴</label>
  327. <value>2</value>
  328. </item>
  329. <item>
  330. <label>굵은 기울임꼴</label>
  331. <value>3</value>
  332. </item>
  333. </choices>
  334. <script type="javascript" ev:event="xforms-select">
  335. <![CDATA[
  336. var value = model.getValue("/root/init/selectnode/fontstyle");
  337. if(value == 0) {
  338. obj_image.SetShapeStyle("font-weight", "normal");
  339. obj_image.SetShapeStyle("font-style", "");
  340. }
  341. else if (value == 1) {
  342. obj_image.SetShapeStyle("font-weight", "bold");
  343. obj_image.SetShapeStyle("font-style", "");
  344. }
  345. else if (value == 2) {
  346. obj_image.SetShapeStyle("font-weight", "normal");
  347. obj_image.SetShapeStyle("font-style", "italic");
  348. }
  349. else if (value == 3) {
  350. obj_image.SetShapeStyle("font-weight", "bold");
  351. obj_image.SetShapeStyle("font-style", "italic");
  352. }
  353. ]]>
  354. </script>
  355. </select1>
  356. <select1 id="combo3" ref="/root/init/selectnode/fontsize" appearance="minimal" style="left:190px; top:30px; width:50px; height:19px; ">
  357. <choices>
  358. <item>
  359. <label>6</label>
  360. <value>6</value>
  361. </item>
  362. <item>
  363. <label>7</label>
  364. <value>7</value>
  365. </item>
  366. <item>
  367. <label>8</label>
  368. <value>8</value>
  369. </item>
  370. <item>
  371. <label>9</label>
  372. <value>9</value>
  373. </item>
  374. <item>
  375. <label>10</label>
  376. <value>10</value>
  377. </item>
  378. <item>
  379. <label>12</label>
  380. <value>12</value>
  381. </item>
  382. <item>
  383. <label>14</label>
  384. <value>14</value>
  385. </item>
  386. <item>
  387. <label>16</label>
  388. <value>16</value>
  389. </item>
  390. <item>
  391. <label>18</label>
  392. <value>18</value>
  393. </item>
  394. <item>
  395. <label>20</label>
  396. <value>20</value>
  397. </item>
  398. <item>
  399. <label>24</label>
  400. <value>24</value>
  401. </item>
  402. <item>
  403. <label>28</label>
  404. <value>28</value>
  405. </item>
  406. <item>
  407. <label>32</label>
  408. <value>32</value>
  409. </item>
  410. <item>
  411. <label>36</label>
  412. <value>36</value>
  413. </item>
  414. </choices>
  415. <script type="javascript" ev:event="xforms-select">
  416. <![CDATA[
  417. obj_image.SetShapeStyle("font-size", model.getValue("/root/init/selectnode/fontsize"));
  418. ]]>
  419. </script>
  420. </select1>
  421. <caption id="caption7" class="cell_1" style="left:5px; top:30px; width:35px; height:19px; vertical-align:middle; ">글꼴</caption>
  422. <caption id="caption1" class="cell_1" style="left:240px; top:30px; width:50px; height:19px; vertical-align:middle; ">선종류</caption>
  423. <select1 id="combo4" ref="/root/init/selectnode/linkind" class="combo_default" appearance="minimal" style="left:290px; top:30px; width:75px; height:19px; ">
  424. <choices>
  425. <item>
  426. <label/>
  427. <value>none</value>
  428. </item>
  429. <item>
  430. <label>────</label>
  431. <value>solid</value>
  432. </item>
  433. <item>
  434. <label>‥‥‥‥</label>
  435. <value>dotted</value>
  436. </item>
  437. <item>
  438. <label>-------</label>
  439. <value>dashed</value>
  440. </item>
  441. </choices>
  442. <script type="javascript" ev:event="xforms-select">
  443. <![CDATA[
  444. obj_image.SetShapeStyle("border-style", model.getValue("/root/init/selectnode/linkind"));
  445. ]]>
  446. </script>
  447. </select1>
  448. <select1 id="combo5" ref="/root/init/selectnode/lineweight" class="combo_default" appearance="minimal" style="left:365px; top:30px; width:75px; height:19px; ">
  449. <choices>
  450. <item>
  451. <label>1</label>
  452. <value>1</value>
  453. </item>
  454. <item>
  455. <label>2</label>
  456. <value>2</value>
  457. </item>
  458. <item>
  459. <label>3</label>
  460. <value>3</value>
  461. </item>
  462. <item>
  463. <label>4</label>
  464. <value>4</value>
  465. </item>
  466. <item>
  467. <label>5</label>
  468. <value>5</value>
  469. </item>
  470. <item>
  471. <label>7</label>
  472. <value>7</value>
  473. </item>
  474. <item>
  475. <label>10</label>
  476. <value>10</value>
  477. </item>
  478. <item>
  479. <label>15</label>
  480. <value>15</value>
  481. </item>
  482. <item>
  483. <label>20</label>
  484. <value>20</value>
  485. </item>
  486. </choices>
  487. <script type="javascript" ev:event="xforms-select">
  488. <![CDATA[
  489. obj_image.SetShapeStyle("border-width", model.getValue("/root/init/selectnode/lineweight"));
  490. ]]>
  491. </script>
  492. </select1>
  493. <button id="button1" class="btn2_letter2" style="left:443px; top:30px; width:42px; height:19px; ">
  494. <caption>확인</caption>
  495. <script type="javascript" ev:event="onclick">
  496. <![CDATA[
  497. // fConfirm();
  498. var strShp = obj_image.GetShapeString();
  499. alert(strShp);
  500. ]]>
  501. </script>
  502. </button>
  503. <button id="button2" class="btn2_letter2" style="left:485px; top:30px; width:42px; height:19px; ">
  504. <caption>취소</caption>
  505. <script type="javascript" ev:event="onclick">
  506. <![CDATA[
  507. parent.window.close();
  508. ]]>
  509. </script>
  510. </button>
  511. <group id="colorpicker" visibility="hidden" popup="false" style="left:235px; top:30px; width:162px; height:142px; background-color:transparent; ">
  512. <caption id="C34" style="left:27px; top:92px; width:15px; height:15px; vertical-align:middle; background-color:#ffcc99; border-style:solid; ">
  513. <![CDATA[]]>
  514. <script type="javascript" ev:event="onclick">
  515. <![CDATA[
  516. fColorClicked();
  517. ]]>
  518. </script>
  519. </caption>
  520. <caption id="C23" style="left:122px; top:48px; width:15px; height:15px; vertical-align:middle; background-color:#800080; border-style:solid; ">
  521. <![CDATA[]]>
  522. <script type="javascript" ev:event="onclick">
  523. <![CDATA[
  524. fColorClicked();
  525. ]]>
  526. </script>
  527. </caption>
  528. <caption id="C12" style="left:65px; top:27px; width:15px; height:15px; vertical-align:middle; background-color:#008000; border-style:solid; ">
  529. <![CDATA[]]>
  530. <script type="javascript" ev:event="onclick">
  531. <![CDATA[
  532. fColorClicked();
  533. ]]>
  534. </script>
  535. </caption>
  536. <caption id="C2" style="left:27px; top:6px; width:15px; height:15px; vertical-align:middle; background-color:#993300; border-style:solid; ">
  537. <![CDATA[]]>
  538. <script id="script3" type="javascript" ev:event="onclick">
  539. <![CDATA[
  540. fColorClicked();
  541. ]]>
  542. </script>
  543. </caption>
  544. <caption id="C35" style="left:46px; top:92px; width:15px; height:15px; vertical-align:middle; background-color:#ffff99; border-style:solid; ">
  545. <![CDATA[]]>
  546. <script type="javascript" ev:event="onclick">
  547. <![CDATA[
  548. fColorClicked();
  549. ]]>
  550. </script>
  551. </caption>
  552. <caption id="C24" style="left:141px; top:48px; width:15px; height:15px; vertical-align:middle; background-color:#999999; border-style:solid; ">
  553. <![CDATA[]]>
  554. <script type="javascript" ev:event="onclick">
  555. <![CDATA[
  556. fColorClicked();
  557. ]]>
  558. </script>
  559. </caption>
  560. <caption id="C13" style="left:84px; top:27px; width:15px; height:15px; vertical-align:middle; background-color:#008080; border-style:solid; ">
  561. <![CDATA[]]>
  562. <script type="javascript" ev:event="onclick">
  563. <![CDATA[
  564. fColorClicked();
  565. ]]>
  566. </script>
  567. </caption>
  568. <caption id="C3" style="left:46px; top:6px; width:15px; height:15px; vertical-align:middle; background-color:#333300; border-style:solid; ">
  569. <![CDATA[]]>
  570. <script type="javascript" ev:event="onclick">
  571. <![CDATA[
  572. fColorClicked();
  573. ]]>
  574. </script>
  575. </caption>
  576. <caption id="C36" style="left:65px; top:92px; width:15px; height:15px; vertical-align:middle; background-color:#ccffcc; border-style:solid; ">
  577. <![CDATA[]]>
  578. <script type="javascript" ev:event="onclick">
  579. <![CDATA[
  580. fColorClicked();
  581. ]]>
  582. </script>
  583. </caption>
  584. <caption id="C25" style="left:8px; top:70px; width:15px; height:15px; vertical-align:middle; background-color:#ff00ff; border-style:solid; ">
  585. <![CDATA[]]>
  586. <script id="script4" type="javascript" ev:event="onclick">
  587. <![CDATA[
  588. fColorClicked();
  589. ]]>
  590. </script>
  591. </caption>
  592. <caption id="C14" style="left:103px; top:27px; width:15px; height:15px; vertical-align:middle; background-color:#0000ff; border-style:solid; ">
  593. <![CDATA[]]>
  594. <script type="javascript" ev:event="onclick">
  595. <![CDATA[
  596. fColorClicked();
  597. ]]>
  598. </script>
  599. </caption>
  600. <caption id="C4" style="left:65px; top:6px; width:15px; height:15px; vertical-align:middle; background-color:#003300; border-style:solid; ">
  601. <![CDATA[]]>
  602. <script type="javascript" ev:event="onclick">
  603. <![CDATA[
  604. fColorClicked();
  605. ]]>
  606. </script>
  607. </caption>
  608. <caption id="C37" style="left:84px; top:92px; width:15px; height:15px; vertical-align:middle; background-color:#ccffff; border-style:solid; ">
  609. <![CDATA[]]>
  610. <script type="javascript" ev:event="onclick">
  611. <![CDATA[
  612. fColorClicked();
  613. ]]>
  614. </script>
  615. </caption>
  616. <caption id="C26" style="left:27px; top:70px; width:15px; height:15px; vertical-align:middle; background-color:#ffcc00; border-style:solid; ">
  617. <![CDATA[]]>
  618. <script type="javascript" ev:event="onclick">
  619. <![CDATA[
  620. fColorClicked();
  621. ]]>
  622. </script>
  623. </caption>
  624. <caption id="C15" style="left:122px; top:27px; width:15px; height:15px; vertical-align:middle; background-color:#666699; border-style:solid; ">
  625. <![CDATA[]]>
  626. <script type="javascript" ev:event="onclick">
  627. <![CDATA[
  628. fColorClicked();
  629. ]]>
  630. </script>
  631. </caption>
  632. <caption id="C5" style="left:84px; top:6px; width:15px; height:15px; vertical-align:middle; background-color:#003366; border-style:solid; ">
  633. <![CDATA[]]>
  634. <script type="javascript" ev:event="onclick">
  635. <![CDATA[
  636. fColorClicked();
  637. ]]>
  638. </script>
  639. </caption>
  640. <caption id="C38" style="left:103px; top:92px; width:15px; height:15px; vertical-align:middle; background-color:#99ccff; border-style:solid; ">
  641. <![CDATA[]]>
  642. <script type="javascript" ev:event="onclick">
  643. <![CDATA[
  644. fColorClicked();
  645. ]]>
  646. </script>
  647. </caption>
  648. <caption id="C27" style="left:46px; top:70px; width:15px; height:15px; vertical-align:middle; background-color:#ffff00; border-style:solid; ">
  649. <![CDATA[]]>
  650. <script type="javascript" ev:event="onclick">
  651. <![CDATA[
  652. fColorClicked();
  653. ]]>
  654. </script>
  655. </caption>
  656. <caption id="C16" style="left:141px; top:27px; width:15px; height:15px; vertical-align:middle; background-color:#808080; border-style:solid; ">
  657. <![CDATA[]]>
  658. <script type="javascript" ev:event="onclick">
  659. <![CDATA[
  660. fColorClicked();
  661. ]]>
  662. </script>
  663. </caption>
  664. <caption id="C6" style="left:103px; top:6px; width:15px; height:15px; vertical-align:middle; background-color:#000080; border-style:solid; ">
  665. <![CDATA[]]>
  666. <script type="javascript" ev:event="onclick">
  667. <![CDATA[
  668. fColorClicked();
  669. ]]>
  670. </script>
  671. </caption>
  672. <caption id="C39" style="left:122px; top:92px; width:15px; height:15px; vertical-align:middle; background-color:#cc99ff; border-style:solid; ">
  673. <![CDATA[]]>
  674. <script type="javascript" ev:event="onclick">
  675. <![CDATA[
  676. fColorClicked();
  677. ]]>
  678. </script>
  679. </caption>
  680. <caption id="C28" style="left:65px; top:70px; width:15px; height:15px; vertical-align:middle; background-color:#00ff00; border-style:solid; ">
  681. <![CDATA[]]>
  682. <script type="javascript" ev:event="onclick">
  683. <![CDATA[
  684. fColorClicked();
  685. ]]>
  686. </script>
  687. </caption>
  688. <caption id="C17" style="left:8px; top:48px; width:15px; height:15px; vertical-align:middle; background-color:#ff0000; border-style:solid; ">
  689. <![CDATA[]]>
  690. <script type="javascript" ev:event="onclick">
  691. <![CDATA[
  692. fColorClicked();
  693. ]]>
  694. </script>
  695. </caption>
  696. <caption id="C7" style="left:122px; top:6px; width:15px; height:15px; vertical-align:middle; background-color:#333399; border-style:solid; ">
  697. <![CDATA[]]>
  698. <script type="javascript" ev:event="onclick">
  699. <![CDATA[
  700. fColorClicked();
  701. ]]>
  702. </script>
  703. </caption>
  704. <caption id="C29" style="left:84px; top:70px; width:15px; height:15px; vertical-align:middle; background-color:#00ffff; border-style:solid; ">
  705. <![CDATA[]]>
  706. <script type="javascript" ev:event="onclick">
  707. <![CDATA[
  708. fColorClicked();
  709. ]]>
  710. </script>
  711. </caption>
  712. <caption id="C18" style="left:27px; top:48px; width:15px; height:15px; vertical-align:middle; background-color:#ff9900; border-style:solid; ">
  713. <![CDATA[]]>
  714. <script type="javascript" ev:event="onclick">
  715. <![CDATA[
  716. fColorClicked();
  717. ]]>
  718. </script>
  719. </caption>
  720. <caption id="C8" style="left:141px; top:6px; width:15px; height:15px; vertical-align:middle; background-color:#333333; border-style:solid; ">
  721. <![CDATA[]]>
  722. <script type="javascript" ev:event="onclick">
  723. <![CDATA[
  724. fColorClicked();
  725. ]]>
  726. </script>
  727. </caption>
  728. <caption id="C19" style="left:46px; top:48px; width:15px; height:15px; vertical-align:middle; background-color:#99cc00; border-style:solid; ">
  729. <![CDATA[]]>
  730. <script type="javascript" ev:event="onclick">
  731. <![CDATA[
  732. fColorClicked();
  733. ]]>
  734. </script>
  735. </caption>
  736. <caption id="C9" style="left:8px; top:27px; width:15px; height:15px; vertical-align:middle; background-color:#800000; border-style:solid; ">
  737. <![CDATA[]]>
  738. <script type="javascript" ev:event="onclick">
  739. <![CDATA[
  740. fColorClicked();
  741. ]]>
  742. </script>
  743. </caption>
  744. <caption id="C40" style="left:141px; top:92px; width:15px; height:15px; vertical-align:middle; background-color:#ffffff; border-style:solid; ">
  745. <![CDATA[]]>
  746. <script type="javascript" ev:event="onclick">
  747. <![CDATA[
  748. fColorClicked();
  749. ]]>
  750. </script>
  751. </caption>
  752. <caption id="C30" style="left:103px; top:70px; width:15px; height:15px; vertical-align:middle; background-color:#00ccff; border-style:solid; ">
  753. <![CDATA[]]>
  754. <script type="javascript" ev:event="onclick">
  755. <![CDATA[
  756. fColorClicked();
  757. ]]>
  758. </script>
  759. </caption>
  760. <caption id="C31" style="left:122px; top:70px; width:15px; height:15px; vertical-align:middle; background-color:#993366; border-style:solid; ">
  761. <![CDATA[]]>
  762. <script type="javascript" ev:event="onclick">
  763. <![CDATA[
  764. fColorClicked();
  765. ]]>
  766. </script>
  767. </caption>
  768. <caption id="C20" style="left:65px; top:48px; width:15px; height:15px; vertical-align:middle; background-color:#339966; border-style:solid; ">
  769. <![CDATA[]]>
  770. <script type="javascript" ev:event="onclick">
  771. <![CDATA[
  772. fColorClicked();
  773. ]]>
  774. </script>
  775. </caption>
  776. <caption id="C32" style="left:141px; top:70px; width:15px; height:15px; vertical-align:middle; background-color:#c0c0c0; border-style:solid; ">
  777. <![CDATA[]]>
  778. <script type="javascript" ev:event="onclick">
  779. <![CDATA[
  780. fColorClicked();
  781. ]]>
  782. </script>
  783. </caption>
  784. <caption id="C21" style="left:84px; top:48px; width:15px; height:15px; vertical-align:middle; background-color:#33cccc; border-style:solid; ">
  785. <![CDATA[]]>
  786. <script type="javascript" ev:event="onclick">
  787. <![CDATA[
  788. fColorClicked();
  789. ]]>
  790. </script>
  791. </caption>
  792. <caption id="C10" style="left:27px; top:27px; width:15px; height:15px; vertical-align:middle; background-color:#ff6600; border-style:solid; ">
  793. <![CDATA[]]>
  794. <script type="javascript" ev:event="onclick">
  795. <![CDATA[
  796. fColorClicked();
  797. ]]>
  798. </script>
  799. </caption>
  800. <caption id="C33" style="left:8px; top:92px; width:15px; height:15px; vertical-align:middle; background-color:#ff99cc; border-style:solid; ">
  801. <![CDATA[]]>
  802. <script type="javascript" ev:event="onclick">
  803. <![CDATA[
  804. fColorClicked();
  805. ]]>
  806. </script>
  807. </caption>
  808. <caption id="C22" style="left:103px; top:48px; width:15px; height:15px; vertical-align:middle; background-color:#3366ff; border-style:solid; ">
  809. <![CDATA[]]>
  810. <script type="javascript" ev:event="onclick">
  811. <![CDATA[
  812. fColorClicked();
  813. ]]>
  814. </script>
  815. </caption>
  816. <caption id="C11" style="left:46px; top:27px; width:15px; height:15px; vertical-align:middle; background-color:#808000; border-style:solid; ">
  817. <![CDATA[]]>
  818. <script type="javascript" ev:event="onclick">
  819. <![CDATA[
  820. fColorClicked();
  821. ]]>
  822. </script>
  823. </caption>
  824. <caption id="C1" style="left:8px; top:6px; width:15px; height:15px; vertical-align:middle; background-color:#000000; border-style:solid; ">
  825. <![CDATA[]]>
  826. <script id="script2" type="javascript" ev:event="onclick">
  827. <![CDATA[
  828. fColorClicked();
  829. ]]>
  830. </script>
  831. </caption>
  832. <caption id="C41" style="left:8px; top:115px; width:148px; height:20px; text-align:center; vertical-align:middle; border-style:solid; ">
  833. <![CDATA[No Fill]]>
  834. <script type="javascript" ev:event="onclick">
  835. <![CDATA[
  836. fColorClicked();
  837. ]]>
  838. </script>
  839. </caption>
  840. </group>
  841. <button id="button3" appearance="button" style="left:355px; top:5px; width:23px; height:23px; background-image:../../../com/commonweb/images/icon_folder_open.gif; background-position:center; gradient:linear(0,0,100%,100%,white,#d7e7ff,1); ">
  842. <caption/>
  843. <script type="javascript" ev:event="DOMActivate">
  844. <![CDATA[
  845. var filepath = openImageFileDialog(4096000);
  846. if (filepath != "")
  847. {
  848. fAddImgeByFile(filepath);
  849. }
  850. ]]>
  851. </script>
  852. <hint>
  853. <![CDATA[파일열기]]>
  854. </hint>
  855. </button>
  856. <select1 id="cmb_viewmode" ref="/root/init/selectnode/viewmode" class="combo_search" appearance="minimal" style="left:390px; top:5px; width:137px; height:19px; ">
  857. <choices>
  858. <item>
  859. <label>원본 사이즈</label>
  860. <value>0</value>
  861. </item>
  862. <item>
  863. <label>그림판 사이즈</label>
  864. <value>1</value>
  865. </item>
  866. <item>
  867. <label>가로길이 기준</label>
  868. <value>3</value>
  869. </item>
  870. <item>
  871. <label>세로길이 기준</label>
  872. <value>2</value>
  873. </item>
  874. <item>
  875. <label>가로/세로 비율</label>
  876. <value>4</value>
  877. </item>
  878. </choices>
  879. <script type="javascript" ev:event="xforms-select">
  880. <![CDATA[
  881. //fChgViewMode();
  882. //fClearImge();
  883. var strBase64 = obj_image.SaveImageBase64();
  884. model.setValue("/root/base64", strBase64);
  885. var ShapeInfo = obj_image.GetShapeString();
  886. obj_image.DeleteAllShape();
  887. obj_image.LoadImage("");
  888. var viewMode = model.getValue("/root/init/selectnode/viewmode");
  889. obj_image.SetViewMode(viewMode);
  890. obj_image.LoadImageBase64(strBase64);
  891. obj_image.SetShapeString(ShapeInfo);
  892. ]]>
  893. </script>
  894. </select1>
  895. </group>
  896. <group id="group2" style="left:0px; top:0px; width:530px; height:21px; background-color:#cce8ff; ">
  897. <caption id="ipt_filenm" ref="/root/init/selectnode/imgenm" class="tit_2" style="left:4px; top:4px; width:516px; height:13px; ">가나다라마</caption>
  898. </group>
  899. <button id="button4" class="btn2_letter7" style="left:540px; top:515px; width:97px; height:19px; ">
  900. <caption>Open Image</caption>
  901. <script type="javascript" ev:event="onclick">
  902. <![CDATA[
  903. var file = window.fileDialog("open","",true,"","jpg","이미지 파일|*.bmp;*.jpg;*.gif|Jpeg Files(*.jpg)|*.jpg|Bitmap Files(*.bmp)|*.bmp|TIFF Files(*.tif)|*.tif|All Files (*.*)|*.*|");
  904. if (file != "") {
  905. obj_image.LoadImage(file);
  906. }
  907. ]]>
  908. </script>
  909. </button>
  910. <button id="button5" class="btn2_letter7" style="left:540px; top:540px; width:97px; height:19px; ">
  911. <caption>Save Image</caption>
  912. <script type="javascript" ev:event="onclick">
  913. <![CDATA[
  914. var file = window.fileDialog("save","", false,"","jpg","Jpeg Files(*.jpg)|*.jpg|Bitmap Files(*.bmp)|*.bmp|All Files (*.*)|*.*|");
  915. if (file != "") {
  916. obj_image.SaveImage(0, file);
  917. }
  918. ]]>
  919. </script>
  920. </button>
  921. <button id="button6" class="btn2_letter7" style="left:855px; top:315px; width:97px; height:19px; ">
  922. <caption>다른 색상</caption>
  923. <script type="javascript" ev:event="onclick">
  924. <![CDATA[
  925. // var color = obj_image.GetRGBColorDlg();
  926. var ctrl = document.controls(event.target);
  927. var color;
  928. if(true)
  929. color = obj_image.GetRGBColorDlg();
  930. else
  931. color = ctrl.attribute("background-color");
  932. if (color != "")
  933. {
  934. alert(color);
  935. //obj_image.SetShapeStyle("color", color);
  936. var clickbtn = model.getValue("/root/init/selectnode/colorbt");
  937. if(color == "transparent")
  938. {
  939. color = "";
  940. }
  941. if(clickbtn == "btn_bgcolor")
  942. {
  943. obj_image.SetShapeStyle("background-color", color);
  944. }
  945. else if(clickbtn == "btn_fontcolor")
  946. {
  947. obj_image.SetShapeStyle("color", color);
  948. }
  949. else if(clickbtn == "btn_linecolor")
  950. {
  951. obj_image.SetShapeStyle("border-color", color);
  952. }
  953. // colorpicker.attribute("visibility") = "hidden"
  954. }
  955. ]]>
  956. </script>
  957. </button>
  958. <button id="button7" class="btn2_letter7" style="left:855px; top:275px; width:97px; height:19px; ">
  959. <caption>오른쪽 회전</caption>
  960. <script type="javascript" ev:event="onclick">
  961. <![CDATA[
  962. obj_image.TurnRight();
  963. ]]>
  964. </script>
  965. </button>
  966. <button id="button8" class="btn2_letter7" style="left:965px; top:275px; width:97px; height:19px; ">
  967. <caption>왼쪽 회전</caption>
  968. <script type="javascript" ev:event="onclick">
  969. <![CDATA[
  970. obj_image.TurnLeft();
  971. ]]>
  972. </script>
  973. </button>
  974. <button id="button9" class="btn2_letter7" style="left:540px; top:665px; width:97px; height:19px; ">
  975. <caption>확대</caption>
  976. <script type="javascript" ev:event="onclick">
  977. <![CDATA[
  978. obj_image.Zoom(5);
  979. ]]>
  980. </script>
  981. </button>
  982. <button id="button10" class="btn2_letter7" style="left:540px; top:690px; width:97px; height:19px; ">
  983. <caption>축소</caption>
  984. <script type="javascript" ev:event="onclick">
  985. <![CDATA[
  986. obj_image.Zoom(-5);
  987. ]]>
  988. </script>
  989. </button>
  990. <button id="button13" class="btn2_letter9" style="left:540px; top:590px; width:97px; height:19px; ">
  991. <caption>SaveBMPBase64</caption>
  992. <script type="javascript" ev:event="onclick">
  993. <![CDATA[
  994. var strBase64 = obj_image.SaveImageBase64();
  995. model.setValue("/root/BitmapBase64", strBase64);
  996. model.refresh();
  997. ]]>
  998. </script>
  999. </button>
  1000. <button id="button14" class="btn2_letter7" style="left:540px; top:640px; width:97px; height:19px; ">
  1001. <caption>화면초기화</caption>
  1002. <script type="javascript" ev:event="onclick">
  1003. <![CDATA[
  1004. obj_image.Clear();
  1005. ]]>
  1006. </script>
  1007. </button>
  1008. <button id="button15" class="btn2_letter7" style="left:855px; top:405px; width:97px; height:19px; ">
  1009. <caption>지우개 선택</caption>
  1010. <script type="javascript" ev:event="onclick">
  1011. <![CDATA[
  1012. obj_image.SelectDrawType(6, true);
  1013. ]]>
  1014. </script>
  1015. </button>
  1016. <button id="button16" class="btn2_letter7" style="left:855px; top:355px; width:97px; height:19px; ">
  1017. <caption>영역 선택하기</caption>
  1018. <script type="javascript" ev:event="onclick">
  1019. <![CDATA[
  1020. obj_image.SelectDrawType(7, true);
  1021. ]]>
  1022. </script>
  1023. </button>
  1024. <button id="button18" class="btn2_letter7" style="left:640px; top:155px; width:97px; height:19px; ">
  1025. <caption>Base64 설정</caption>
  1026. <script type="javascript" ev:event="onclick">
  1027. <![CDATA[
  1028. var file = window.fileDialog("open","",true,"","bmp","이미지 파일|*.bmp;*.jpg;*.gif|Jpeg Files(*.jpg)|*.jpg|Bitmap Files(*.bmp)|*.bmp|TIFF Files(*.tif)|*.tif|All Files (*.*)|*.*|");
  1029. if (file == "")
  1030. {
  1031. return;
  1032. }
  1033. /*
  1034. Base64_TrueImgViewer1.ViewImage(file);
  1035. var strBase64 = Base64_TrueImgViewer1.GetBase64EncodedString();
  1036. model.setValue("/root/base64_1", strBase64);
  1037. */
  1038. //Base64_Preview1.SetViewMode(0);
  1039. Base64_Preview1.LoadImage(file);
  1040. var strBase64 = Base64_Preview1.SaveImageBase64();
  1041. model.setValue("/root/base64_1", strBase64);
  1042. ]]>
  1043. </script>
  1044. </button>
  1045. <select id="checkbox1" ref="/root/MakeOneCanvas" overflow="visible" appearance="full" style="left:850px; top:230px; width:115px; height:25px; border-style:none; ">
  1046. <choices>
  1047. <item>
  1048. <label>한장으로 모으기</label>
  1049. <value>1</value>
  1050. </item>
  1051. </choices>
  1052. <script type="javascript" ev:event="xforms-value-changed">
  1053. <![CDATA[
  1054. var Value = checkbox1.value;
  1055. if(Value)
  1056. {
  1057. if(checkbox2.value != true && checkbox3.value != true && checkbox4.value != true) {
  1058. checkbox1.selected = false;
  1059. model.setValue("/root/MakeOneCanvas", 0);
  1060. checkbox1.value = 0;
  1061. alert("선택된 이미지가 없습니다");
  1062. return;
  1063. }
  1064. checkbox1.selected = true;
  1065. if( !obj_image.SetCanvas() )
  1066. {
  1067. checkbox1.selected = false;
  1068. model.setValue("/root/MakeOneCanvas", 0);
  1069. checkbox1.value = 0;
  1070. alert("한장으로 모으기 에러");
  1071. return;
  1072. }
  1073. if(checkbox2.value)
  1074. {
  1075. var Base64Img_1 = model.getValue("/root/base64_1");
  1076. obj_image.AddImageToCanvas(Base64Img_1);
  1077. }
  1078. if(checkbox3.value)
  1079. {
  1080. var Base64Img_2 = model.getValue("/root/base64_2");
  1081. obj_image.AddImageToCanvas(Base64Img_2);
  1082. }
  1083. if(checkbox4.value)
  1084. {
  1085. var Base64Img_3 = model.getValue("/root/base64_3");
  1086. obj_image.AddImageToCanvas(Base64Img_3);
  1087. }
  1088. obj_image.LoadCanvas();
  1089. }
  1090. else {
  1091. checkbox1.selected = false;
  1092. model.setValue("/root/MakeOneCanvas", 0);
  1093. checkbox1.value = 0;
  1094. obj_image.RestoreStatus();
  1095. }
  1096. ]]>
  1097. </script>
  1098. </select>
  1099. <button id="button17" class="btn2_letter7" style="left:850px; top:155px; width:97px; height:19px; ">
  1100. <caption>Base64 설정</caption>
  1101. <script type="javascript" ev:event="onclick">
  1102. <![CDATA[
  1103. var file = window.fileDialog("open","",true,"","bmp","이미지 파일|*.bmp;*.jpg;*.gif|Jpeg Files(*.jpg)|*.jpg|Bitmap Files(*.bmp)|*.bmp|TIFF Files(*.tif)|*.tif|All Files (*.*)|*.*|");
  1104. if (file == "")
  1105. {
  1106. return;
  1107. }
  1108. /*
  1109. Base64_TrueImgViewer2.ViewImage(file);
  1110. var strBase64 = Base64_TrueImgViewer2.GetBase64EncodedString();
  1111. model.setValue("/root/base64_2", strBase64);
  1112. */
  1113. //Base64_Preview2.SetViewMode(0);
  1114. Base64_Preview2.LoadImage(file);
  1115. var strBase64 = Base64_Preview2.SaveImageBase64();
  1116. model.setValue("/root/base64_2", strBase64);
  1117. ]]>
  1118. </script>
  1119. </button>
  1120. <button id="button19" class="btn2_letter7" style="left:1055px; top:155px; width:97px; height:19px; ">
  1121. <caption>Base64 설정</caption>
  1122. <script type="javascript" ev:event="onclick">
  1123. <![CDATA[
  1124. var file = window.fileDialog("open","",true,"","bmp","이미지 파일|*.bmp;*.jpg;*.gif|Jpeg Files(*.jpg)|*.jpg|Bitmap Files(*.bmp)|*.bmp|TIFF Files(*.tif)|*.tif|All Files (*.*)|*.*|");
  1125. if (file == "")
  1126. {
  1127. return;
  1128. }
  1129. /*
  1130. Base64_TrueImgViewer3.ViewImage(file);
  1131. var strBase64 = Base64_TrueImgViewer3.GetBase64EncodedString();
  1132. model.setValue("/root/base64_3", strBase64);
  1133. */
  1134. Base64_Preview3.LoadImage(file);
  1135. var strBase64 = Base64_Preview3.SaveImageBase64();
  1136. model.setValue("/root/base64_3", strBase64);
  1137. ]]>
  1138. </script>
  1139. </button>
  1140. <select id="checkbox2" ref="/root/base64_1_Add" overflow="visible" appearance="full" style="left:580px; top:155px; width:60px; height:20px; border-style:none; ">
  1141. <choices>
  1142. <item>
  1143. <label>추가</label>
  1144. <value>1</value>
  1145. </item>
  1146. </choices>
  1147. <script type="javascript" ev:event="xforms-value-changed">
  1148. <![CDATA[
  1149. var Value = checkbox2.value;
  1150. if(Value == 1) {
  1151. checkbox2.selected = true;
  1152. }
  1153. else {
  1154. checkbox2.selected = false;
  1155. }
  1156. ]]>
  1157. </script>
  1158. </select>
  1159. <select id="checkbox3" ref="/root/base64_2_Add" overflow="visible" appearance="full" style="left:790px; top:155px; width:45px; height:20px; border-style:none; ">
  1160. <choices>
  1161. <item>
  1162. <label>추가</label>
  1163. <value>1</value>
  1164. </item>
  1165. </choices>
  1166. <script type="javascript" ev:event="xforms-value-changed">
  1167. <![CDATA[
  1168. var Value = checkbox3.value;
  1169. if(Value == 1) {
  1170. checkbox3.selected = true;
  1171. }
  1172. else {
  1173. checkbox3.selected = false;
  1174. }
  1175. ]]>
  1176. </script>
  1177. </select>
  1178. <select id="checkbox4" ref="/root/base64_3_Add" overflow="visible" appearance="full" style="left:985px; top:155px; width:55px; height:20px; border-style:none; ">
  1179. <choices>
  1180. <item>
  1181. <label>추가</label>
  1182. <value>1</value>
  1183. </item>
  1184. </choices>
  1185. <script type="javascript" ev:event="xforms-value-changed">
  1186. <![CDATA[
  1187. var Value = checkbox4.value;
  1188. if(Value == 1) {
  1189. checkbox4.selected = true;
  1190. }
  1191. else {
  1192. checkbox4.selected = false;
  1193. }
  1194. ]]>
  1195. </script>
  1196. </select>
  1197. <button id="button20" class="btn2_letter7" style="left:540px; top:565px; width:97px; height:19px; ">
  1198. <caption>LoadBase64</caption>
  1199. <script type="javascript" ev:event="onclick">
  1200. <![CDATA[
  1201. var file = window.fileDialog("open","",true,"","bmp","이미지 파일|*.bmp;*.jpg;*.gif|Jpeg Files(*.jpg)|*.jpg|Bitmap Files(*.bmp)|*.bmp|TIFF Files(*.tif)|*.tif|All Files (*.*)|*.*|");
  1202. if (file != "") {
  1203. /*
  1204. TrueImgViewer.ViewImage(file);
  1205. var strBase64 = TrueImgViewer.GetBase64EncodedString();
  1206. model.setValue("/root/base64", strBase64);
  1207. model.refresh();
  1208. var strGetBase64 = model.getValue("/root/base64");
  1209. obj_image.LoadImageBase64( strGetBase64 );
  1210. */
  1211. PreView.LoadImage(file);
  1212. var strBase64 = PreView.SaveImageBase64();
  1213. model.setValue("/root/base64", strBase64);
  1214. model.refresh();
  1215. var strGetBase64 = model.getValue("/root/base64");
  1216. obj_image.LoadImageBase64( strGetBase64 );
  1217. }
  1218. ]]>
  1219. </script>
  1220. </button>
  1221. <caption id="caption2" style="left:645px; top:230px; width:156px; height:20px; ">추가 기능1. 한장으로 모으기</caption>
  1222. <caption id="caption3" style="left:645px; top:275px; width:156px; height:20px; ">추가 기능2. 이미지 회전</caption>
  1223. <caption id="caption4" style="left:630px; top:185px; width:65px; height:20px; ">
  1224. <![CDATA[<이미지 1>]]>
  1225. </caption>
  1226. <caption id="caption5" style="left:825px; top:185px; width:70px; height:20px; ">
  1227. <![CDATA[<이미지 2>]]>
  1228. </caption>
  1229. <caption id="caption6" style="left:1050px; top:185px; width:65px; height:20px; ">
  1230. <![CDATA[<이미지 3>]]>
  1231. </caption>
  1232. <caption id="caption8" style="left:645px; top:315px; width:180px; height:20px; ">추가 기능3. 컬러 확장다이얼로그</caption>
  1233. <caption id="caption9" style="left:645px; top:355px; width:180px; height:28px; ">
  1234. <![CDATA[추가 기능4. 이미지 자르기
  1235. (선택한 이미지 영역만을 보여줌)]]>
  1236. </caption>
  1237. <caption id="caption10" style="left:645px; top:400px; width:180px; height:28px; ">
  1238. <![CDATA[추가 기능5. 선택영역 자르기
  1239. (선택한 이미지 영역만을 삭제함)]]>
  1240. </caption>
  1241. <select1 id="combo6" ref="/root/init/selectnode/viewmode" appearance="minimal" style="left:645px; top:445px; width:135px; height:19px; ">
  1242. <choices>
  1243. <item>
  1244. <label>원본 사이즈</label>
  1245. <value>0</value>
  1246. </item>
  1247. <item>
  1248. <label>스크린에 가득차게</label>
  1249. <value>1</value>
  1250. </item>
  1251. <item>
  1252. <label>스크린 세로사이즈 기준</label>
  1253. <value>2</value>
  1254. </item>
  1255. <item>
  1256. <label>스크린 가로사이즈 기준</label>
  1257. <value>3</value>
  1258. </item>
  1259. <item>
  1260. <label>스크린 가로/세로 사이즈 기준</label>
  1261. <value>4</value>
  1262. </item>
  1263. <item>
  1264. <label>스크린 줌 모드</label>
  1265. <value>5</value>
  1266. </item>
  1267. </choices>
  1268. <script type="javascript" ev:event="xforms-select">
  1269. <![CDATA[
  1270. var mode = model.getValue("/root/init/selectnode/viewmode");
  1271. obj_image.SetViewMode(mode);
  1272. ]]>
  1273. </script>
  1274. </select1>
  1275. <button id="button21" class="btn2_letter9" style="left:540px; top:490px; width:119px; height:19px; ">
  1276. <caption>그리드 이미지 삽입</caption>
  1277. <script type="javascript" ev:event="onclick">
  1278. <![CDATA[
  1279. //var ShapeInfo = obj_image.GetShapeString();
  1280. //obj_image.DeleteAllShape();
  1281. //obj_image.LoadImage("");
  1282. var SaveBase64Img = obj_image.SaveImageBase64();
  1283. if (SaveBase64Img != "")
  1284. {
  1285. var num = model.getValue("root/gridNum");
  1286. fAddSumnail(num, "temp", SaveBase64Img);
  1287. model.setValue("root/gridNum", num);
  1288. }
  1289. ]]>
  1290. </script>
  1291. </button>
  1292. <!--
  1293. <object id="TrueImgViewer" clsid="{3f3a0456-a902-4041-b5e9-0c078104af94}" style="left:970px; top:320px; width:115px; height:115px; "/>
  1294. <object id="Base64_TrueImgViewer1" clsid="{3f3a0456-a902-4041-b5e9-0c078104af94}" style="left:600px; top:30px; width:115px; height:115px; "/>
  1295. <object id="Base64_TrueImgViewer2" clsid="{3f3a0456-a902-4041-b5e9-0c078104af94}" style="left:810px; top:30px; width:115px; height:115px; "/>
  1296. <object id="Base64_TrueImgViewer3" clsid="{3f3a0456-a902-4041-b5e9-0c078104af94}" style="left:1020px; top:30px; width:115px; height:115px; "/>
  1297. -->
  1298. <object id="PreView" clsid="{72e5d9ed-0d6a-46e8-aead-23144bfef878}" style="left:970px; top:320px; width:115px; height:115px; "/>
  1299. <object id="Base64_Preview1" clsid="{72e5d9ed-0d6a-46e8-aead-23144bfef878}" style="left:600px; top:30px; width:115px; height:115px; "/>
  1300. <object id="Base64_Preview2" clsid="{72e5d9ed-0d6a-46e8-aead-23144bfef878}" style="left:810px; top:30px; width:115px; height:115px; "/>
  1301. <object id="Base64_Preview3" clsid="{72e5d9ed-0d6a-46e8-aead-23144bfef878}" style="left:1020px; top:30px; width:115px; height:115px; "/>
  1302. <button id="button22" class="btn2_letter10" style="left:540px; top:715px; width:130px; height:19px; ">
  1303. <caption>이미지 합치기(Merge)</caption>
  1304. <script type="javascript" ev:event="onclick">
  1305. <![CDATA[
  1306. obj_image.MergeImage();
  1307. ]]>
  1308. </script>
  1309. </button>
  1310. <button id="button23" class="btn2_letter14" style="left:980px; top:245px; width:174px; height:19px; ">
  1311. <caption>한 장으로 모으기 해제(For문)</caption>
  1312. <script type="javascript" ev:event="onclick">
  1313. <![CDATA[
  1314. checkbox1.selected = false;
  1315. model.setValue("/root/MakeOneCanvas", 0);
  1316. checkbox1.value = 0;
  1317. obj_image.RestoreStatus();
  1318. ]]>
  1319. </script>
  1320. </button>
  1321. <button id="button24" class="btn2_letter14" style="left:980px; top:215px; width:174px; height:19px; ">
  1322. <caption>한 장으로 모으기 설정(For문)</caption>
  1323. <script type="javascript" ev:event="onclick">
  1324. <![CDATA[
  1325. var Base64Img_1 = model.getValue("/root/base64_1");
  1326. var Base64Img_2 = model.getValue("/root/base64_2");
  1327. var Base64Img_3 = model.getValue("/root/base64_3");
  1328. if(Base64Img_1 == "" && Base64Img_2 == "" && Base64Img_3 == "") {
  1329. checkbox1.selected = false;
  1330. checkbox2.selected = false;
  1331. checkbox3.selected = false;
  1332. model.setValue("/root/MakeOneCanvas", 0);
  1333. alert("Base64로 저장된 이미지가 없습니다");
  1334. return;
  1335. }
  1336. if( !obj_image.SetCanvas() )
  1337. {
  1338. model.setValue("/root/MakeOneCanvas", 0);
  1339. alert("한장으로 모으기 에러");
  1340. return;
  1341. }
  1342. var i = 0;
  1343. var Base64Array = new Array();
  1344. //Base64Array = new Array(Base64Img_1, Base64Img_2, Base64Img_3);
  1345. if (Base64Img_1 != "")
  1346. {
  1347. Base64Array[0] = Base64Img_1;
  1348. }
  1349. if (Base64Img_2 != "")
  1350. {
  1351. Base64Array[1] = Base64Img_2;
  1352. }
  1353. if (Base64Img_3 != "")
  1354. {
  1355. Base64Array[2] = Base64Img_3;
  1356. }
  1357. var count = Base64Array.length;
  1358. alert("Base64 이미지 개수: " + count);
  1359. for(i = 0; i < count; i++)
  1360. {
  1361. obj_image.AddImageToCanvas(Base64Array[i]);
  1362. }
  1363. obj_image.LoadCanvas();
  1364. model.setValue("/root/MakeOneCanvas", 1);
  1365. checkbox1.value = true;
  1366. ]]>
  1367. </script>
  1368. </button>
  1369. <button id="button25" class="btn2_letter7" style="left:820px; top:475px; width:97px; height:19px; ">
  1370. <caption>GetMetraData</caption>
  1371. <script type="javascript" ev:event="onclick">
  1372. <![CDATA[
  1373. var data = obj_image.GetMetaData();
  1374. alert(data);
  1375. model.setValue("/root/MetaData" ,data);
  1376. ]]>
  1377. </script>
  1378. </button>
  1379. <button id="button26" class="btn2_letter8" style="left:820px; top:500px; width:108px; height:19px; ">
  1380. <caption>GetShapeString</caption>
  1381. <script type="javascript" ev:event="onclick">
  1382. <![CDATA[
  1383. var data = obj_image.GetShapeString();
  1384. alert(data);
  1385. model.setValue("/root/ShapeString" ,data);
  1386. ]]>
  1387. </script>
  1388. </button>
  1389. <button id="button27" class="btn2_letter8" style="left:820px; top:555px; width:108px; height:19px; ">
  1390. <caption>SetShapeString</caption>
  1391. <script type="javascript" ev:event="onclick">
  1392. <![CDATA[
  1393. var data = model.getValue("/root/ShapeString");
  1394. obj_image.SetShapeString(data);
  1395. ]]>
  1396. </script>
  1397. </button>
  1398. <button id="button28" class="btn2_letter9" style="left:540px; top:615px; width:109px; height:19px; ">
  1399. <caption>SaveJPGBase64</caption>
  1400. <script type="javascript" ev:event="onclick">
  1401. <![CDATA[
  1402. var strBase64 = obj_image.SaveJpegBase64();
  1403. model.setValue("/root/JpegBase64", strBase64);
  1404. model.refresh();
  1405. ]]>
  1406. </script>
  1407. </button>
  1408. <button id="button29" class="btn2_letter10" style="left:960px; top:720px; width:130px; height:19px; ">
  1409. <caption>ConvertJpegBase64</caption>
  1410. <script type="javascript" ev:event="DOMActivate">
  1411. <![CDATA[
  1412. model.refresh();
  1413. var strBase64 = model.getValue("/root/BitmapBase64");
  1414. if (strBase64 == "")
  1415. {
  1416. alert("SaveBMPBase64 를 먼저 실행하세요");
  1417. }
  1418. var strJpegBase64 = obj_image.ConvertJpegBase64(strBase64);
  1419. model.setValue("/root/JpegBase64" , strJpegBase64);
  1420. ]]>
  1421. </script>
  1422. </button>
  1423. <caption id="caption11" style="left:700px; top:585px; width:458px; height:140px; ">
  1424. <![CDATA[비트맵 Base64 코드를 Jpeg Base64 코드로 저장한다.
  1425. 1. Open Image 메소드를 이용하여 비트맵 이미지를 오픈한 후
  1426. 이미지사이즈를 원본사이즈로 변경한다.. (올바른 테스트를 위하여 비트맵을 연다)
  1427. 2. 비트맵 Base64 코드를 얻기 위하여 SaveBMPBase64 메소드를 실행한다.
  1428. 3. ConvertJpegBase64 메소드를 실행한 후 마우스 우클릭으로
  1429. View Instance로 결과를 확인한다.
  1430. 비트맵 Base64 코드 => /root/BitmapBase64
  1431. JPEG Base64 코드 => /root/JpegBase64]]>
  1432. </caption>
  1433. <button id="button30" class="btn2_letter8" style="left:985px; top:565px; width:108px; height:19px; ">
  1434. <caption>Add Thumbnail</caption>
  1435. <script type="javascript" ev:event="onclick">
  1436. <![CDATA[
  1437. var strBase64 = model.getValue("/root/BitmapBase64");
  1438. obj_thumbnail.LoadImageBase64(strBase64);
  1439. strBase64 = obj_thumbnail.GetThumnailBase64(0, 0);
  1440. model.setValue("/root/Thumnail", strBase64);
  1441. obj_thumbnail.LoadImageBase64(strBase64);
  1442. ]]>
  1443. </script>
  1444. </button>
  1445. <object id="obj_thumbnail" clsid="{72e5d9ed-0d6a-46e8-aead-23144bfef878}" style="left:990px; top:450px; width:100px; height:100px; "/>
  1446. <object id="obj_sumnail" clsid="{72e5d9ed-0d6a-46e8-aead-23144bfef878}" style="left:700px; top:475px; width:100px; height:100px; "/>
  1447. <button id="button33" class="btn2_letter8" style="left:540px; top:465px; width:108px; height:19px; ">
  1448. <caption>클립보드 테스트</caption>
  1449. <script type="javascript" ev:event="onclick">
  1450. <![CDATA[
  1451. var base64str = obj_image.GetClipboardImage();
  1452. if (base64str == "")
  1453. {
  1454. alert("클립보드에 이미지 데이터가 없습니다.");
  1455. return;
  1456. }
  1457. model.setValue("/root/ClipboardData", base64str);
  1458. obj_image.LoadImageBase64( model.getValue("/root/ClipboardData") );
  1459. ]]>
  1460. </script>
  1461. </button>
  1462. </xhtml:body>
  1463. </xhtml:html>