📄 class_c_ocr_example_image_view.html
字号:
<td class="md" valign="top"> ) </td> <td class="md" nowrap><code> [private]</code></td> </tr> </table> </td> </tr></table><table cellspacing="5" cellpadding="0" border="0"> <tr> <td> </td> <td><p>From CAknView Deactivate this view <p>Definition at line <a class="el" href="_ocr_example_image_view_8cpp-source.html#l00207">207</a> of file <a class="el" href="_ocr_example_image_view_8cpp-source.html">OcrExampleImageView.cpp</a>.<p>References <a class="el" href="_ocr_example_image_view_8h-source.html#l00262">iContainer</a>.<div class="fragment"><pre class="fragment"><a name="l00208"></a>00208 {<a name="l00209"></a>00209 <span class="keywordflow">if</span> (<a class="code" href="class_c_ocr_example_image_view.html#6dc94c8cd7c107bc61701348814020e6">iContainer</a>)<a name="l00210"></a>00210 {<a name="l00211"></a>00211 <a class="code" href="class_c_ocr_example_image_view.html#6dc94c8cd7c107bc61701348814020e6">iContainer</a>->MakeVisible(EFalse);<a name="l00212"></a>00212 }<a name="l00213"></a>00213 }</pre></div><p> </td> </tr></table><a class="anchor" name="3ae77c2aed5e1270a13c14bd5aa415fe"></a><!-- doxytag: member="COcrExampleImageView::DynInitMenuPaneL" ref="3ae77c2aed5e1270a13c14bd5aa415fe" args="(TInt aResourceId, CEikMenuPane *aMenuPane)" --><p><table class="mdTable" cellpadding="2" cellspacing="0"> <tr> <td class="mdRow"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td class="md" nowrap valign="top">void COcrExampleImageView::DynInitMenuPaneL </td> <td class="md" valign="top">( </td> <td class="md" nowrap valign="top">TInt </td> <td class="mdname" nowrap> <em>aResourceId</em>, </td> </tr> <tr> <td class="md" nowrap align="right"></td> <td class="md"></td> <td class="md" nowrap>CEikMenuPane * </td> <td class="mdname" nowrap> <em>aMenuPane</em></td> </tr> <tr> <td class="md"></td> <td class="md">) </td> <td class="md" colspan="2"><code> [private]</code></td> </tr> </table> </td> </tr></table><table cellspacing="5" cellpadding="0" border="0"> <tr> <td> </td> <td><p>From MEikMenuObserver Dynamically customize menu items <dl compact><dt><b>Parameters:</b></dt><dd> <table border="0" cellspacing="2" cellpadding="0"> <tr><td valign="top"></td><td valign="top"><em>aResourceId</em> </td><td>Menu pane resource ID </td></tr> <tr><td valign="top"></td><td valign="top"><em>aMenuPane</em> </td><td>Menu pane pointer </td></tr> </table></dl><p>Definition at line <a class="el" href="_ocr_example_image_view_8cpp-source.html#l00221">221</a> of file <a class="el" href="_ocr_example_image_view_8cpp-source.html">OcrExampleImageView.cpp</a>.<p>References <a class="el" href="class_c_ocr_example_image_view.html#8e0e9e3030ee220d737a3e9e733390ec9a6601df59f457cc199cb4794fdbbd7b">EImageAnalyzed</a>, <a class="el" href="class_c_ocr_example_image_view.html#8e0e9e3030ee220d737a3e9e733390ec553253ec36b6a826ce4923c5dcf95a12">EInit</a>, <a class="el" href="_ocr_example_image_view_8h-source.html#l00301">iCrosshairEnabled</a>, and <a class="el" href="_ocr_example_image_view_8h-source.html#l00298">iState</a>.<div class="fragment"><pre class="fragment"><a name="l00223"></a>00223 {<a name="l00224"></a>00224 <span class="keywordflow">if</span> ( aResourceId == R_IMAGE_VIEW_MENU )<a name="l00225"></a>00225 {<a name="l00226"></a>00226 aMenuPane->SetItemDimmed( EOcrExampleCmdAnalyzeImage,<a name="l00227"></a>00227 ((<a class="code" href="class_c_ocr_example_image_view.html#63052a309baec315239b427aa7647b76">iState</a> == <a class="code" href="class_c_ocr_example_image_view.html#8e0e9e3030ee220d737a3e9e733390ec553253ec36b6a826ce4923c5dcf95a12">EInit</a>) || <a class="code" href="class_c_ocr_example_image_view.html#b7e54289c236dbd01581864006b4069f">iCrosshairEnabled</a>));<a name="l00228"></a>00228 aMenuPane->SetItemDimmed( EOcrExampleCmdRecognizeImage,<a name="l00229"></a>00229 ((<a class="code" href="class_c_ocr_example_image_view.html#63052a309baec315239b427aa7647b76">iState</a> != <a class="code" href="class_c_ocr_example_image_view.html#8e0e9e3030ee220d737a3e9e733390ec9a6601df59f457cc199cb4794fdbbd7b">EImageAnalyzed</a>) || <a class="code" href="class_c_ocr_example_image_view.html#b7e54289c236dbd01581864006b4069f">iCrosshairEnabled</a>));<a name="l00230"></a>00230 aMenuPane->SetItemDimmed( EOcrExampleCmdToggleCrosshair,<a name="l00231"></a>00231 (<a class="code" href="class_c_ocr_example_image_view.html#63052a309baec315239b427aa7647b76">iState</a> == <a class="code" href="class_c_ocr_example_image_view.html#8e0e9e3030ee220d737a3e9e733390ec553253ec36b6a826ce4923c5dcf95a12">EInit</a>));<a name="l00232"></a>00232 aMenuPane->SetItemDimmed( EOcrExampleCmdRecognizeBlockMenu,<a name="l00233"></a>00233 ((<a class="code" href="class_c_ocr_example_image_view.html#63052a309baec315239b427aa7647b76">iState</a> == <a class="code" href="class_c_ocr_example_image_view.html#8e0e9e3030ee220d737a3e9e733390ec553253ec36b6a826ce4923c5dcf95a12">EInit</a>) || (!<a class="code" href="class_c_ocr_example_image_view.html#b7e54289c236dbd01581864006b4069f">iCrosshairEnabled</a>)));<a name="l00234"></a>00234 }<a name="l00235"></a>00235 }</pre></div><p> </td> </tr></table><a class="anchor" name="09a548f36fef23b5490ecdf57e2bdd1a"></a><!-- doxytag: member="COcrExampleImageView::ImageOperationCompleteL" ref="09a548f36fef23b5490ecdf57e2bdd1a" args="(TInt aError)" --><p><table class="mdTable" cellpadding="2" cellspacing="0"> <tr> <td class="mdRow"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td class="md" nowrap valign="top">void COcrExampleImageView::ImageOperationCompleteL </td> <td class="md" valign="top">( </td> <td class="md" nowrap valign="top">TInt </td> <td class="mdname1" valign="top" nowrap> <em>aError</em> </td> <td class="md" valign="top"> ) </td> <td class="md" nowrap><code> [private, virtual]</code></td> </tr> </table> </td> </tr></table><table cellspacing="5" cellpadding="0" border="0"> <tr> <td> </td> <td><p>From MImageHandlerCallback. Called when image loading/scaling has completed <p>Implements <a class="el" href="class_n_o_c_r_utils_1_1_m_image_handler_callback.html#3db218089f2258a62d37b47650b805b6">NOCRUtils::MImageHandlerCallback</a>.<p>Definition at line <a class="el" href="_ocr_example_image_view_8cpp-source.html#l00266">266</a> of file <a class="el" href="_ocr_example_image_view_8cpp-source.html">OcrExampleImageView.cpp</a>.<p>References <a class="el" href="_rect_scaler_8cpp-source.html#l00028">NOCRUtils::TRectScaler::CalculateFactor()</a>, <a class="el" href="_ocr_example_image_view_8cpp-source.html#l00330">DisplayWarningL()</a>, <a class="el" href="class_c_ocr_example_image_view.html#8e0e9e3030ee220d737a3e9e733390ecc7b1c96e80ea74eab865de4fc9f448ea">EImageOpened</a>, <a class="el" href="class_c_ocr_example_image_view.html#8e0e9e3030ee220d737a3e9e733390ec553253ec36b6a826ce4923c5dcf95a12">EInit</a>, <a class="el" href="_ocr_example_image_view_8h-source.html#l00304">iBackgroundTaskDone</a>, <a class="el" href="_ocr_example_image_view_8h-source.html#l00274">iBitMap</a>, <a class="el" href="_ocr_example_image_view_8h-source.html#l00262">iContainer</a>, <a class="el" href="_ocr_example_image_view_8h-source.html#l00268">iData</a>, <a class="el" href="_ocr_example_image_container_8h-source.html#l00045">TScreenUpdateData::iRectScaler</a>, <a class="el" href="_ocr_example_image_container_8h-source.html#l00036">TScreenUpdateData::iScaledBitMap</a>, and <a class="el" href="_ocr_example_image_view_8h-source.html#l00298">iState</a>.<div class="fragment"><pre class="fragment"><a name="l00267"></a>00267 {<a name="l00268"></a>00268 <a class="code" href="class_c_ocr_example_image_view.html#a7f5826c4c1c2cbee83739946a8a013b">iBackgroundTaskDone</a> = ETrue; <span class="comment">// to dismiss wait-note</span><a name="l00269"></a>00269 <span class="keywordflow">if</span> (aError)<a name="l00270"></a>00270 {<a name="l00271"></a>00271 _LIT(KFailed,<span class="stringliteral">"Loading/scaling image failed"</span>);<a name="l00272"></a>00272 <a class="code" href="class_c_ocr_example_image_view.html#5d97b3005d7025da3ce0f8f008328e43">DisplayWarningL</a>(KFailed, aError);<a name="l00273"></a>00273 }<a name="l00274"></a>00274 <span class="keywordflow">else</span><a name="l00275"></a>00275 {<a name="l00276"></a>00276 <span class="comment">// we should now have the image and also another one (resized to fit</span><a name="l00277"></a>00277 <span class="comment">// the screen). Calculate the factors (needed later, when adjusting</span><a name="l00278"></a>00278 <span class="comment">// TRect-info analyzed from the original image)</span><a name="l00279"></a>00279 <span class="comment">//</span><a name="l00280"></a>00280 <a class="code" href="class_c_ocr_example_image_view.html#e72899bf23845a10c6b7559c2e896baa">iData</a>.<a class="code" href="class_t_screen_update_data.html#d8df217ecaec20976c2b240f971a5034">iRectScaler</a>.<a class="code" href="class_n_o_c_r_utils_1_1_t_rect_scaler.html#a6b4fc57b5dda0378f9f21a73f7bdb13">CalculateFactor</a>(<a class="code" href="class_c_ocr_example_image_view.html#9eb6fa3188758350a81b83400892e787">iBitMap</a>->SizeInPixels(),<a name="l00281"></a>00281 <a class="code" href="class_c_ocr_example_image_view.html#e72899bf23845a10c6b7559c2e896baa">iData</a>.<a class="code" href="class_t_screen_update_data.html#ea6eefa2a3b0315b12fbb5ab0532a849">iScaledBitMap</a>->SizeInPixels());<a name="l00282"></a>00282 <span class="keywordflow">if</span> (<a class="code" href="class_c_ocr_example_image_view.html#63052a309baec315239b427aa7647b76">iState</a> == <a class="code" href="class_c_ocr_example_image_view.html#8e0e9e3030ee220d737a3e9e733390ec553253ec36b6a826ce4923c5dcf95a12">EInit</a>)<a name="l00283"></a>00283 {<a name="l00284"></a>00284 <a class="code" href="class_c_ocr_example_image_view.html#63052a309baec315239b427aa7647b76">iState</a> = <a class="code" href="class_c_ocr_example_image_view.html#8e0e9e3030ee220d737a3e9e733390ecc7b1c96e80ea74eab865de4fc9f448ea">EImageOpened</a>;<a name="l00285"></a>00285 }<a name="l00286"></a>00286 <a class="code" href="class_c_ocr_example_image_view.html#6dc94c8cd7c107bc61701348814020e6">iContainer</a>->DrawDeferred();<a name="l00287"></a>00287 }<a name="l00288"></a>00288 }</pre></div><p> </td> </tr></table><a class="anchor" name="5cf1fbd18ad3ec441cedf31760963484"></a><!-- doxytag: member="COcrExampleImageView::RecognizeBlockComplete" ref="5cf1fbd18ad3ec441cedf31760963484" args="(TInt aError, const TOCRTextRgnInfo *aBlocks, const TInt aBlockCount)" --><p><table class="mdTable" cellpadding="2" cellspacing="0"> <tr> <td class="mdRow"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td class="md" nowrap valign="top">void COcrExampleImageView::RecognizeBlockComplete </td> <td class="md" valign="top">( </td> <td class="md" nowrap valign="top">TInt </td> <td class="mdname" nowrap> <em>aError</em>, </td> </tr> <tr> <td class="md" nowrap align="right"></td> <td class="md"></td> <td class="md" nowrap>const TOCRTextRgnInfo * </td> <td class="mdname" nowrap> <em>aBlocks</em>, </td> </tr> <tr> <td class="md" nowrap align="right"></td> <td class="md"></td> <td class="md" nowrap>const TInt </td> <td class="mdname" nowrap> <em>aBlockCount</em></td> </tr> <tr> <td class="md"></td> <td class="md">) </td> <td class="md" colspan="2"><code> [private]</code></td> </tr> </table> </td> </tr></table><table cellspacing="5" cellpadding="0" border="0"> <tr> <td> </td> <td>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -