123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619 |
- <?xml version="1.0" encoding="utf-8"?>
- <FDL version="1.5">
- <TypeDefinition url="..\..\..\default_typedef.xml"/>
- <Form id="SSMRF04600" position="absolute 0 0 205 155" titletext="이미지 편집팔레트" onload="SSMRF04600_onload">
- <Layouts>
- <Layout>
- <!--
- <Div position="absolute 0 0 400 175" id="grp_imgedit">
- <Layouts>
- <Layout>
- -->
- <Button position="absolute 154 2 177 25" id="btn_point" class="icon_point" text="" tooltiptext="표시" onclick="btn_point_onclick"/>
- <Button position="absolute 4 2 27 25" id="btn_select" class="icon_select" text="" tooltiptext="선택" onclick="btn_select_onclick"/>
- <Button position="absolute 104 2 127 25" id="btn_rect" class="icon_rect" text="" tooltiptext="사각형" onclick="btn_rect_onclick"/>
- <Button position="absolute 54 2 77 25" id="btn_line" class="icon_line" text="" tooltiptext="선" onclick="btn_line_onclick"/>
- <Button position="absolute 79 27 102 50" id="btn_fontcolor" class="icon_font_color" text="" tooltiptext="글색" onclick="Button_onclick"/>
- <Button position="absolute 179 2 202 25" id="btn_del" class="icon_eraser" text="" onclick="btn_eraser_onclick" tooltiptext="지우개"/>
- <Button position="absolute 79 2 102 25" id="btn_freeline" class="icon_freeline" text="" tooltiptext="자유 곡선" onclick="btn_freeline_onclick"/>
- <Button position="absolute 104 27 127 50" id="btn_bgcolor" class="icon_fill_color" text="" tooltiptext="배경색" onclick="Button_onclick"/>
- <Div position="absolute 44 53 200 153" id="colorpicker" visible="false" mode="">
- <Layouts>
- <Layout>
- <Static text="" onclick="Static_onclick" position="absolute 27 64 42 79" style="background:#ffcc99;border:1 solid #808080ff ;align:center middle;" anchor="default" id="C34"/>
- <Static text="" onclick="Static_onclick" position="absolute 122 32 137 47" style="background:#800080;border:1 solid #808080ff ;align:center middle;" anchor="default" id="C23"/>
- <Static text="" onclick="Static_onclick" position="absolute 65 16 80 31" style="background:#008000;border:1 solid #808080ff ;align:center middle;" anchor="default" id="C12"/>
- <Static text="" onclick="Static_onclick" position="absolute 27 0 42 15" style="background:#993300;border:1 solid #808080ff ;align:center middle;" anchor="default" id="C2"/>
- <Static text="" onclick="Static_onclick" position="absolute 46 64 61 79" style="background:#ffff99;border:1 solid #808080ff ;align:center middle;" anchor="default" id="C35"/>
- <Static text="" onclick="Static_onclick" position="absolute 141 32 156 47" style="background:#999999;border:1 solid #808080ff ;align:center middle;" anchor="default" id="C24"/>
- <Static text="" onclick="Static_onclick" position="absolute 84 16 99 31" style="background:#008080;border:1 solid #808080ff ;align:center middle;" anchor="default" id="C13"/>
- <Static text="" onclick="Static_onclick" position="absolute 46 0 61 15" style="background:#333300;border:1 solid #808080ff ;align:center middle;" anchor="default" id="C3"/>
- <Static text="" onclick="Static_onclick" position="absolute 65 64 80 79" style="background:#ccffcc;border:1 solid #808080ff ;align:center middle;" anchor="default" id="C36"/>
- <Static text="" onclick="Static_onclick" position="absolute 8 48 23 63" style="background:#ff00ff;border:1 solid #808080ff ;align:center middle;" anchor="default" id="C25"/>
- <Static text="" onclick="Static_onclick" position="absolute 103 16 118 31" style="background:#0000ff;border:1 solid #808080ff ;align:center middle;" anchor="default" id="C14"/>
- <Static text="" onclick="Static_onclick" position="absolute 65 0 80 15" style="background:#003300;border:1 solid #808080ff ;align:center middle;" anchor="default" id="C4"/>
- <Static text="" onclick="Static_onclick" position="absolute 84 64 99 79" style="background:#ccffff;border:1 solid #808080ff ;align:center middle;" anchor="default" id="C37"/>
- <Static text="" onclick="Static_onclick" position="absolute 27 48 42 63" style="background:#ffcc00;border:1 solid #808080ff ;align:center middle;" anchor="default" id="C26"/>
- <Static text="" onclick="Static_onclick" position="absolute 122 16 137 31" style="background:#666699;border:1 solid #808080ff ;align:center middle;" anchor="default" id="C15"/>
- <Static text="" onclick="Static_onclick" position="absolute 84 0 99 15" style="background:#003366;border:1 solid #808080ff ;align:center middle;" anchor="default" id="C5"/>
- <Static text="" onclick="Static_onclick" position="absolute 103 64 118 79" style="background:#99ccff;border:1 solid #808080ff ;align:center middle;" anchor="default" id="C38"/>
- <Static text="" onclick="Static_onclick" position="absolute 46 48 61 63" style="background:#ffff00;border:1 solid #808080ff ;align:center middle;" anchor="default" id="C27"/>
- <Static text="" onclick="Static_onclick" position="absolute 141 16 156 31" style="background:#808080;border:1 solid #808080ff ;align:center middle;" anchor="default" id="C16"/>
- <Static text="" onclick="Static_onclick" position="absolute 103 0 118 15" style="background:#000080;border:1 solid #808080ff ;align:center middle;" anchor="default" id="C6"/>
- <Static text="" onclick="Static_onclick" position="absolute 122 64 137 79" style="background:#cc99ff;border:1 solid #808080ff ;align:center middle;" anchor="default" id="C39"/>
- <Static text="" onclick="Static_onclick" position="absolute 65 48 80 63" style="background:#00ff00;border:1 solid #808080ff ;align:center middle;" anchor="default" id="C28"/>
- <Static text="" onclick="Static_onclick" position="absolute 8 32 23 47" style="background:#ff0000;border:1 solid #808080ff ;align:center middle;" anchor="default" id="C17"/>
- <Static text="" onclick="Static_onclick" position="absolute 122 0 137 15" style="background:#333399;border:1 solid #808080ff ;align:center middle;" anchor="default" id="C7"/>
- <Static text="" onclick="Static_onclick" position="absolute 84 48 99 63" style="background:#00ffff;border:1 solid #808080ff ;align:center middle;" anchor="default" id="C29"/>
- <Static text="" onclick="Static_onclick" position="absolute 27 32 42 47" style="background:#ff9900;border:1 solid #808080ff ;align:center middle;" anchor="default" id="C18"/>
- <Static text="" onclick="Static_onclick" position="absolute 141 0 156 15" style="background:#333333;border:1 solid #808080ff ;align:center middle;" anchor="default" id="C8"/>
- <Static text="" onclick="Static_onclick" position="absolute 46 32 61 47" style="background:#99cc00;border:1 solid #808080ff ;align:center middle;" anchor="default" id="C19"/>
- <Static text="" onclick="Static_onclick" position="absolute 8 16 23 31" style="background:#800000;border:1 solid #808080ff ;align:center middle;" anchor="default" id="C9"/>
- <Static text="" onclick="Static_onclick" position="absolute 141 64 156 79" style="background:#ffffff;border:1 solid #808080ff ;align:center middle;" anchor="default" id="C40"/>
- <Static text="" onclick="Static_onclick" position="absolute 103 48 118 63" style="background:#00ccff;border:1 solid #808080ff ;align:center middle;" anchor="default" id="C30"/>
- <Static text="" onclick="Static_onclick" position="absolute 122 48 137 63" style="background:#993366;border:1 solid #808080ff ;align:center middle;" anchor="default" id="C31"/>
- <Static text="" onclick="Static_onclick" position="absolute 65 32 80 47" style="background:#339966;border:1 solid #808080ff ;align:center middle;" anchor="default" id="C20"/>
- <Static text="" onclick="Static_onclick" position="absolute 141 48 156 63" style="background:#c0c0c0;border:1 solid #808080ff ;align:center middle;" anchor="default" id="C32"/>
- <Static text="" onclick="Static_onclick" position="absolute 84 32 99 47" style="background:#33cccc;border:1 solid #808080ff ;align:center middle;" anchor="default" id="C21"/>
- <Static text="" onclick="Static_onclick" position="absolute 27 16 42 31" style="background:#ff6600;border:1 solid #808080ff ;align:center middle;" anchor="default" id="C10"/>
- <Static text="" onclick="Static_onclick" position="absolute 8 64 23 79" style="background:#ff99cc;border:1 solid #808080ff ;align:center middle;" anchor="default" id="C33"/>
- <Static text="" onclick="Static_onclick" position="absolute 103 32 118 47" style="background:#3366ff;border:1 solid #808080ff ;align:center middle;" anchor="default" id="C22"/>
- <Static text="" onclick="Static_onclick" position="absolute 46 16 61 31" style="background:#808000;border:1 solid #808080ff ;align:center middle;" anchor="default" id="C11"/>
- <Static text="" onclick="Static_onclick" position="absolute 8 0 23 15" style="background:#000000;border:1 solid #808080ff ;align:center middle;" anchor="default" id="C1"/>
- <Static text="No Fill" onclick="Static_onclick" position="absolute 8 80 156 100" style="border:1 solid #808080ff ;align:center middle;" anchor="default" id="C41"/>
- </Layout>
- </Layouts>
- </Div>
- <Button position="absolute 129 27 152 50" id="btn_linecolor" class="icon_line_color" text="" onclick="Button_onclick" tooltiptext="선색"/>
- <Button position="absolute 29 2 52 25" id="btn_text" class="icon_text" text="" tooltiptext="글" onclick="btn_text_onclick"/>
- <Button position="absolute 29 27 52 50" id="btn_undo" class="icon_levelup" text="" tooltiptext="되돌리기" onclick="btn_undo_onclick"/>
- <Button position="absolute 54 27 77 50" id="btn_redo" class="icon_leveldown" text="" tooltiptext="되살리기" onclick="btn_redo_onclick"/>
- <Button position="absolute 4 27 27 50" id="btn_drawcancel" class="icon_x" text="" tooltiptext="처음상태로" onclick="btn_drawcancel_onclick"/>
- <Button position="absolute 129 2 152 25" id="btn_round" class="icon_round" text="" tooltiptext="원" onclick="btn_round_onclick"/>
- <Button position="absolute 154 27 177 50" id="btn_fileopen" text="" style="background:transparent URL('IMG::emr\MR\open_folder.png');border:0 solid #038cb5ff ;" tooltiptext="폴더열기" onclick="btn_fileopen_onclick"/>
- <!--
- </Layout>
- </Layouts>
- </Div>
- -->
- </Layout>
- </Layouts>
- <Objects>
- <Dataset id="ds_data_imgeInfo" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false">
- <ColumnInfo>
- <Column id="degnitemcd" type="STRING" size="256"/>
- <Column id="degnitemno" type="STRING" size="256"/>
- <Column id="degnitemlevlcd" type="STRING" size="256"/>
- <Column id="degnitemnm" type="STRING" size="256"/>
- </ColumnInfo>
- </Dataset>
- <Dataset id="ds_data_selectnode" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false">
- <ColumnInfo>
- <Column id="fontfamily" type="STRING" size="256"/>
- <Column id="fontstyle" type="STRING" size="256"/>
- <Column id="fontsize" type="STRING" size="256"/>
- <Column id="borderstyle" type="STRING" size="256"/>
- <Column id="borderwidth" type="STRING" size="256"/>
- <Column id="fontcolor" type="STRING" size="256"/>
- <Column id="backcolor" type="STRING" size="256"/>
- <Column id="linecolor" type="STRING" size="256"/>
- <Column id="imgenm" type="STRING" size="256"/>
- <Column id="imgeno" type="STRING" size="256"/>
- <Column id="viewmode" type="STRING" size="256"/>
- <Column id="colorbt" type="STRING" size="256"/>
- <Column id="fillstyle" type="STRING" size="256"/>
- <Column id="opacity" type="STRING" size="256"/>
- <Column id="lineweight" type="STRING" size="256"/>
- </ColumnInfo>
- </Dataset>
- <Dataset id="ds_data_localimage" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false">
- <ColumnInfo>
- <Column id="objid" type="STRING" size="256"/>
- <Column id="degnitemlevlcd" type="STRING" size="256"/>
- <Column id="LocalYN" type="STRING" size="256"/>
- <Column id="LocalFileName" type="STRING" size="256"/>
- <Column id="srcimge" type="BLOB" size="256"/>
- </ColumnInfo>
- </Dataset>
- </Objects>
- <Script type="xscript4.0"><![CDATA[/***************************************************************************************
- * System Name :
- * Job Name :
- * Creator :
- * Make Date : 2014-09-17
- * Description :
- *---------------------------------------------------------------------------------------
- * Modify Date Modifier Modify Description
- *---------------------------------------------------------------------------------------
- * 2014-09-17 Live Converter TF->XP
- *
- *---------------------------------------------------------------------------------------
- ****************************************************************************************/
- //=======================================================================================
- // Lib Include
- //---------------------------------------------------------------------------------------
- include "com_commonxp::comm_main.xjs";
- include "emr_commonxp::EMRCommon.xjs";
- //=======================================================================================
- // Global Form Variable
- //---------------------------------------------------------------------------------------
- // 이미지 컴포넌트.
- var obj_imge;
- // 파일 업로드 사이즈
- var gDefaultFileSize = 2048000;
- var gLastBackgroundColor;
- var gLastFontColor;
- var gLastLineColor;
- //=======================================================================================
- // Function
- //---------------------------------------------------------------------------------------
- /****************************************************************************************
- * Argument : N/A
- * Description : 부모창의 ActiveX Component ID를 가져온다.
- ****************************************************************************************/
- function lf_getObjectImg()
- {
- var objParent = this.parent;
- var objComponent = objParent.components;
- var nCompCnt = objComponent.length;
- var palName = this.name;
- var palNo = palName.replace("ivw_imgedit_", "");
- var objNm = ""; // 이미지 ActiveX 명
- var objNo = ""; // 이미지 ActiveX 디자인 번호
- for(var i=0; i < nCompCnt; i++)
- {
- if(objComponent[i] instanceof ActiveX)
- {
- objNm = objComponent[i].name;
- objNo = objNm.replace("IMG_", "");
- if(palNo == objNo)
- return objComponent[i];
- }
- }
- }
- /****************************************************************************************
- * Argument : nMaxBytes - file size, bMulti - file Multi open boolen
- * Description : 이미지 로드용 대화상자 열기.
- ****************************************************************************************/
- function lf_openImageFileDialogEx(nMaxBytes, bMulti)
- {
- var nFileLoadType = 2;
- if(utlf_isNull(bMulti)||!bMulti){
- nFileLoadType = 0;
- }
-
- var vFiledlg = new FileDialog;
- vFiledlg.filter = "All Files (*.*)|*.*|JPEG Files(*.jpg)|*.jpg|GIF Files(*.gif)|*.gif|BMP Files(*.bmp)|*.bmp";
-
- var vFileInfo;
- if(nFileLoadType==0){
- vFileInfo = new Array();
- vFileInfo[0] = vFiledlg.open("FileOpen", nFileLoadType);
- }else{
- vFileInfo = vFiledlg.open("FileOpen", nFileLoadType);
- }
-
- if(!utlf_isNull(vFileInfo)){
- var nFileCnt = vFileInfo.length;
- for(var i=0; i<nFileCnt; i++){
- var vFile = vFileInfo[i];
- if(!utlf_isNull(nMaxBytes)){
- // 파일 크기 확인
- var nFileSize = vFile.getFileSize();
- if (nFileSize>nMaxBytes) {
- sysf_messageBox("파일 크기가 최대 크기인 2M를", "E003");
- return;
- }
- }
- }
- }
- return vFileInfo;
- }
- /****************************************************************************************
- * Argument : N/A
- * Description : 라이브이미지 ActiveX 컨트롤에 이미지 파일을 불러들인다.
- ****************************************************************************************/
- function lf_AddImgeByFile()
- {
- // BLOB 사이즈가 2M로 설정됨에 따라 업로드 파일사이즈를 제한함.
- // gDefaultFileSize - 2048000
- var vFileInfo = lf_openImageFileDialogEx(gDefaultFileSize, false);
- if(utlf_isNull(vFileInfo)){
- return;
- }
-
- var nRow = ds_data_imgeInfo.rowposition;
- var degnitemlevlcd = ds_data_imgeInfo.getColumn(nRow, "degnitemlevlcd");
- var degnitemcd = ds_data_imgeInfo.getColumn(nRow, "degnitemcd").substr(0, 7);
- var degnitemno = ds_data_imgeInfo.getColumn(nRow, "degnitemno");
- var degnitemnm = ds_data_imgeInfo.getColumn(nRow, "degnitemnm");
-
- // 서식내에 이미지 개수를 확인
- var objRecItemDS = this.parent.objects["ds_data_recitem"];
-
- var sFilePath = vFileInfo[0].fullpath;
- var sFileName = vFileInfo[0].filename;
- var recitemNode = objRecItemDS.findRowExpr("degnitemkind=='IMG'&°nitemlevlcd=='"+degnitemlevlcd+"'&°nitemno=='"+degnitemno+"'");
-
- var nRowCnt = objRecItemDS.getRowCount();
- for(var i=0; i<nRowCnt; i++){
- var tmpDegnitemno = objRecItemDS.getColumn(i, "degnitemno");
- var tmpDegnitemcd = objRecItemDS.getColumn(i, "degnitemlevlcd");
-
- if(degnitemlevlcd==tmpDegnitemcd&°nitemno==tmpDegnitemno){
- utlf_addLog("degnitemlevlcd : " + degnitemlevlcd + " || tmpDegnitemcd : " + tmpDegnitemcd)
- var nRow = ds_data_localimage.rowposition;
- if(nRow<0){
- ds_data_localimage.clearData();
- nRow = ds_data_localimage.addRow();
- }
-
- ds_data_localimage.setColumn(nRow, "objid" , "IMG_"+tmpDegnitemno);
- ds_data_localimage.setColumn(nRow, "LocalYN" , "Y");
- ds_data_localimage.setColumn(nRow, "LocalFileName" , sFileName);
- ds_data_localimage.setColumn(nRow, "degnitemlevlcd", degnitemlevlcd);
-
- obj_imge.Clear();
-
- // 뷰모드를 가로/세로 비율로 변경
- obj_imge.SetViewMode(4);
-
- obj_imge.LoadImage(sFilePath);
-
- // BMP 형식대로 리턴.
- var strBase64 = obj_imge.SaveImageBase64();
- if(recitemNode>-1){
- ds_data_localimage.setColumn(nRow, "srcimge", strBase64);
- }
-
- var nEnvSrcimge = lf_mmbfGetUserEnvQuestValue("074");
- if( nEnvSrcimge == "001" ){
- dsf_writeFileToDs(vFileInfo[0], objRecItemDS, recitemNode, "srcimge")
- }
-
- lf_reSizeImg(obj_imge);
- }
- }
- }
- /****************************************************************************************
- * Argument : N/A
- * Description : 색상을 입히기 위해 팔레트를 클릭했을때 발생하는 함수.
- ****************************************************************************************/
- function lf_ColorClicked(obj, bDetail)
- {
- var objItem = obj;
- if(utlf_isNull(bDetail)){
- bDetail = false;
- }
-
- var sColor;
- if(bDetail){
- sColor = obj_imge.GetRGBColorDlg();
- if(utlf_isNull(sColor)){
- return;
- }
- }else{
- sColor = new String(objItem.style.background.color);
- if(sColor.length>7){
- sColor = sColor.substr(0, sColor.length-2);
- }
- }
-
- if(sColor=="transparent"){
- sColor = "";
- }
-
- var clickbtn = colorpicker.mode;
- if(clickbtn == "btn_bgcolor"){
- // 배경색
- obj_imge.SetShapeStyle("background-color", sColor);
- obj_imge.SetShapeStyle("fill-color", sColor);
- // 마지막으로 선택한 배경색을 인스턴스에 저장해둠.
- gLastBackgroundColor = sColor;
- }else if(clickbtn == "btn_fontcolor"){
- // 텍스트
- obj_imge.SetShapeStyle("color", sColor);
- gLastFontColor = sColor;
- }else if(clickbtn == "btn_linecolor"){
- // 선색
- obj_imge.SetShapeStyle("border-color", sColor);
-
- gLastLineColor = sColor;
- }
- colorpicker.visible = false;
- }
- //=======================================================================================
- // Transaction Callback
- //---------------------------------------------------------------------------------------
- /****************************************************************************************
- * Argument : 01.sSvcId : 서비스 ID
- * : 02.nErrorCode : 에러코드
- * : 03.sErrorMsg : 에러메시지
- * Description : cf_의 콜백함수
- ****************************************************************************************/
- function cf_(sSvcId, nErrorCode, sErrorMsg){
- }
- //=======================================================================================
- // Event
- //---------------------------------------------------------------------------------------
- /****************************************************************************************
- * Components : Form
- * Components ID : SSMRF04600
- * Event : onload
- * Argument : 01.obj : Object Event has occurred
- * : 02.e : Event Object
- * Description : 화면 초기화
- ****************************************************************************************/
- function SSMRF04600_onload(obj:Form, e:LoadEventInfo)
- {
- frmf_initForm(obj);
-
- ds_data_selectnode.clearData();
- var nAddRow = ds_data_selectnode.addRow();
- ds_data_selectnode.setColumn(nAddRow, "fontfamily" , "굴림");
- ds_data_selectnode.setColumn(nAddRow, "fontstyle" , 0);
- ds_data_selectnode.setColumn(nAddRow, "fontsize" , 10);
- ds_data_selectnode.setColumn(nAddRow, "borderstyle", "solid");
- ds_data_selectnode.setColumn(nAddRow, "borderwidth", 2);
- ds_data_selectnode.setColumn(nAddRow, "viewmode" , 4);
- ds_data_selectnode.setColumn(nAddRow, "fillstyle" , "transparent");
-
- obj_imge = lf_getObjectImg();
-
- ds_data_imgeInfo.clearData();
- ds_data_imgeInfo.addRow();
-
- }
- /****************************************************************************************
- * Components : Button
- * Components ID : btn_select
- * Event : onclick
- * Argument : 01.obj : Object Event has occurred
- * : 02.e : Event Object
- * Description : 선택.
- ****************************************************************************************/
- function btn_select_onclick(obj:Button, e:ClickEventInfo)
- {
- obj_imge.SelectDrawType(0, false);
- }
- /****************************************************************************************
- * Components : Button
- * Components ID : btn_text
- * Event : onclick
- * Argument : 01.obj : Object Event has occurred
- * : 02.e : Event Object
- * Description : 글.
- ****************************************************************************************/
- function btn_text_onclick(obj:Button, e:ClickEventInfo)
- {
- obj_imge.DeselectAllShape();
- obj_imge.SelectDrawType(4, false);
- }
- /****************************************************************************************
- * Components : Button
- * Components ID : btn_line
- * Event : onclick
- * Argument : 01.obj : Object Event has occurred
- * : 02.e : Event Object
- * Description : 선.
- ****************************************************************************************/
- function btn_line_onclick(obj:Button, e:ClickEventInfo)
- {
- obj_imge.DeselectAllShape();
- obj_imge.SelectDrawType(1, true);
- obj_imge.SetShapeStyle("border-color", "black");
- obj_imge.SetShapeStyle("border-width", "2");
- }
- /****************************************************************************************
- * Components : Button
- * Components ID : btn_freeline
- * Event : onclick
- * Argument : 01.obj : Object Event has occurred
- * : 02.e : Event Object
- * Description : 자유 곡선.
- ****************************************************************************************/
- function btn_freeline_onclick(obj:Button, e:ClickEventInfo)
- {
- obj_imge.DeselectAllShape();
- obj_imge.SelectDrawType(5, true);
- obj_imge.SetShapeStyle("border-color", "black");
- obj_imge.SetShapeStyle("border-width", "2");
- }
- /****************************************************************************************
- * Components : Button
- * Components ID : btn_rect
- * Event : onclick
- * Argument : 01.obj : Object Event has occurred
- * : 02.e : Event Object
- * Description : 사각형.
- ****************************************************************************************/
- function btn_rect_onclick(obj:Button, e:ClickEventInfo)
- {
- obj_imge.DeselectAllShape();
- obj_imge.SelectDrawType(2, true);
- obj_imge.SetShapeStyle("border-color", "black");
- obj_imge.SetShapeStyle("border-width", "2");
- }
- /****************************************************************************************
- * Components : Button
- * Components ID : btn_round
- * Event : onclick
- * Argument : 01.obj : Object Event has occurred
- * : 02.e : Event Object
- * Description : 원.
- ****************************************************************************************/
- function btn_round_onclick(obj:Button, e:ClickEventInfo)
- {
- obj_imge.DeselectAllShape();
- obj_imge.SelectDrawType(3, true);
- obj_imge.SetShapeStyle("border-color", "black");
- obj_imge.SetShapeStyle("border-width", "2");
- }
- /****************************************************************************************
- * Components : Button
- * Components ID : btn_point
- * Event : onclick
- * Argument : 01.obj : Object Event has occurred
- * : 02.e : Event Object
- * Description : 표시.
- ****************************************************************************************/
- function btn_point_onclick(obj:Button, e:ClickEventInfo)
- {
- obj_imge.DeselectAllShape();
-
- obj_imge.SetBaseSize(10, 10);
- obj_imge.SetShapeStyle("border-color", "red");
- obj_imge.SetShapeStyle("border-width", "2");
- obj_imge.SelectDrawType(3, true);
- }
- /****************************************************************************************
- * Components : Button
- * Components ID : btn_eraser
- * Event : onclick
- * Argument : 01.obj : Object Event has occurred
- * : 02.e : Event Object
- * Description : 지우개.
- ****************************************************************************************/
- function btn_eraser_onclick(obj:Button, e:ClickEventInfo)
- {
- // obj_imge.SelectDrawType(101, true);
- // obj_imge.SetShapeStyle("eraser-size", "20");
- obj_imge.DeleteShape();
- }
- /****************************************************************************************
- * Components : Button
- * Components ID : btn_drawcancel
- * Event : onclick
- * Argument : 01.obj : Object Event has occurred
- * : 02.e : Event Object
- * Description : 초기화.
- ****************************************************************************************/
- function btn_drawcancel_onclick(obj:Button, e:ClickEventInfo)
- {
- obj_imge.DeleteAllShape();
- }
- /****************************************************************************************
- * Components : Button
- * Components ID : btn_undo
- * Event : onclick
- * Argument : 01.obj : Object Event has occurred
- * : 02.e : Event Object
- * Description : 이전상태.
- ****************************************************************************************/
- function btn_undo_onclick(obj:Button, e:ClickEventInfo)
- {
- obj_imge.Undo();
- }
- /****************************************************************************************
- * Components : Button
- * Components ID : btn_redo
- * Event : onclick
- * Argument : 01.obj : Object Event has occurred
- * : 02.e : Event Object
- * Description : 다음상태.
- ****************************************************************************************/
- function btn_redo_onclick(obj:Button, e:ClickEventInfo)
- {
- obj_imge.Redo();
- }
- /****************************************************************************************
- * Components : Button
- * Components ID : btn_fontcolor
- * Event : onclick
- * Argument : 01.obj : Object Event has occurred
- * : 02.e : Event Object
- * Description : 글색, 배경색, Line 색
- ****************************************************************************************/
- function Button_onclick(obj:Button, e:ClickEventInfo)
- {
- var sMode = colorpicker.mode;
- var bVisible = colorpicker.visible;
- if(utlf_isNull(sMode)||sMode!=obj.name){
- colorpicker.mode = obj.name;
- colorpicker.visible = true;
- }else{
- colorpicker.mode = "";
- colorpicker.visible = false;
- }
- }
- /****************************************************************************************
- * Components : Button
- * Components ID : btn_fileopen
- * Event : onclick
- * Argument : 01.obj : Object Event has occurred
- * : 02.e : Event Object
- * Description : 이미지 파일을 가져온다.
- ****************************************************************************************/
- function btn_fileopen_onclick(obj:Button, e:ClickEventInfo)
- {
- lf_AddImgeByFile();
- }
- /****************************************************************************************
- * Components : Static
- * Components ID : Static
- * Event : onclick
- * Argument : 01.obj : Object Event has occurred
- * : 02.e : Event Object
- * Description : 색상을 입히기 위해 팔레트를 클릭했을때 발생하는 함수.
- ****************************************************************************************/
- function Static_onclick(obj:Static, e:ClickEventInfo)
- {
- lf_ColorClicked(obj);
- }
- function lf_reSizeImg(obj_imge){
-
- if( !obj_imge instanceof ActiveX && utlf_isNull(obj_imge.orgHeight) && utlf_isNull(obj_imge.orgWidth) ){
- return;
- }
-
- var sz = obj_imge.GetImageSizeEx(false);
- var arrSz = sz.split("|");
-
- if(obj_imge.orgWidth <= arrSz[0]){
- obj_imge.position.width = obj_imge.orgWidth;
- }else{
- obj_imge.position.width = arrSz[0];
- }
-
-
- if(obj_imge.orgHeight <= arrSz[1]){
- obj_imge.position.height = obj_imge.orgHeight;
- }else{
- obj_imge.position.height = arrSz[1];
- }
- }]]></Script>
- </Form>
- </FDL>
|