Dynamic Web TWAINTWAIN掃描識別工具添加文本到映像

來源:互聯網
上載者:User

標籤:cWeb   http   color   java   os   io   for   ar   

Dynamic Web TWAINTWAIN掃描識別工具添加文本到映像Dynamic Web TWAIN 是應用於Web應用程式的TWAIN掃描識別工具,只需在TWAIN介面寫幾行代碼,就可以用相容TWAIN的掃描器掃描文檔或從數位相機/採集卡中擷取映像,並對採集下來的映像進行處理。版本支援

Dynamic Web TWAIN各版本v7及以上

文法

Boolean ObjectName.AddText(Short ImageIndex, Int x, Int y, String Text, Int TextColor, Int
BackgroundColor, float BackgroundRoundRadius, float BackgroundOpacity)

參數
  • Short ImageIndex:靶心圖表像索引
  • Int x:文本的X座標
  • Int y:文本的Y座標
  • String Text:要添加的文本
  • Int TextColor:文本顏色
  • Int BackgroundColor:背景色
  • float BackgroundRoundRadius:範圍是0到0.5;註:Mac版不支援這個參數。
  • float BackgroundOpacity:指定添加文本背景的不透明度,範圍是0到1.0;注意:Mac版支援0到1。
傳回值

Boolean:True表示成功,FALSE表示失敗

標記

IfThrowException屬性為True時,發生錯誤時會拋出一個異常。當返回FALSE或拋出異常時,檢查 ErrorCode 屬性和ErrorString屬性擷取錯誤資訊。

樣本

下面是一個JavaScript樣本:

 

<script language="javascript"type="text/javascript">  DWObject = document.getElementById("iDynamicWebTwain");//iDynamicWebTwain is the id of the Dynamic Web TWAIN on the page (An object or an embed).  functionbtnAddText_onclick() {        DWObject.AddText(        DWObject.CurrentImageIndexInBuffer,        document.getElementById("addText_Left").value,//Value for setting the x coordinate for the text        document.getElementById("addText_Top").value,//Value for setting the y coordinate for the text        document.getElementById("addText_Text").value,//The text to be added        document.getElementById("addText_TxtColor").value,//The color of the text        document.getElementById("addText_BgColor").value,//The background color of the text        document.getElementById("addText_BGRoundRadius").value,//The value for the background radius        document.getElementById("addText_BGOpacity").value//The value for the background opacity    );  }     </script>

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.