Cpp.xml 3.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124
  1. <?xml version="1.0" encoding="utf-8"?>
  2. <?xml-stylesheet type="text/xsl" href="../Xsl/doc2html.xsl"?>
  3. <doc>
  4. <title>C/C++ Demos</title>
  5. <chapter>
  6. <title>C/C++ Demos</title>
  7. <par>These C/C++ demos currently exist:</par>
  8. <blist>
  9. <li><link url="#benchmark">Benchmark</link></li>
  10. <li><link url="#test">Small Test</link></li>
  11. </blist>
  12. <note>
  13. If you want to use Imaging in C/C++ you must include
  14. <icode>ImagingImport.h</icode> header and link compiled
  15. <icode>ImagingImport.c</icode> file (both located in
  16. <keyword>Source\Wrappers\Cpp</keyword> directory)
  17. and for C++ use namespace
  18. <icode>Imaging</icode>. You must call <ref>ImLoadLibrary</ref>
  19. before usage of any Imaging functions and you must call
  20. <ref>ImFreeLibrary</ref> when you don't want to use library anymore.
  21. </note>
  22. <note>
  23. All non-Object Pascal programs using Imaging require <b>VampyreImaging.dll</b>
  24. (Windows) or <b>libVampyreImaging.so</b> (Linux) to run.
  25. Compiled Imaging library must be located somewhere on system's
  26. search path for these demos to work.
  27. </note>
  28. <!-- BENCHMARK DEMO ****************************** -->
  29. <lcap><anchor name="benchmark">Benchmark</anchor></lcap>
  30. <par>
  31. This is not actually benchmark like Object Pascal
  32. <link url="Pascal.xml#benchmark">version</link> because
  33. all measured functions are called from external library, but it
  34. shows how to use Imaging dll from C/C++ at least.
  35. </par>
  36. <table>
  37. <title>Demo Information</title>
  38. <row>
  39. <td><b>Name</b></td>
  40. <td>Benchmark</td>
  41. </row>
  42. <row>
  43. <td><b>Language</b></td>
  44. <td>C++</td>
  45. </row>
  46. <row>
  47. <td><b>Source Path</b></td>
  48. <td>(Imaging Root)\Demos\Cpp\Benchmark</td>
  49. </row>
  50. <row>
  51. <td><b>Exe Path</b></td>
  52. <td>(Imaging Root)\Demos\Bin\BenchCpp.exe</td>
  53. </row>
  54. <row>
  55. <td><b>Platforms (tested)</b></td>
  56. <td><b>W</b>in32</td>
  57. </row>
  58. <row>
  59. <td><b>Compilers (tested)</b></td>
  60. <td>MSVC 8.0 <b>W</b>, GCC 3.4.2 <b>W</b></td>
  61. </row>
  62. <row>
  63. <td><b>Demo shows usage of</b></td>
  64. <td>low level (using dyn. library wrapper)</td>
  65. </row>
  66. </table>
  67. <par>
  68. For details look at Object Pascal
  69. <link url="Pascal.xml#benchmark">version</link>. There are only two
  70. differences: </par>
  71. <olist>
  72. <li> Log file with result is called Results.Cpp.</li>
  73. <li>
  74. Executable must be located
  75. in Demos\Bin or anywhere in the subdirectories of Demos\Cpp dir to
  76. be able to find used data files.</li>
  77. </olist>
  78. <!-- SMALL TEST DEMO ****************************** -->
  79. <lcap><anchor name="test">Small Test</anchor></lcap>
  80. <par>
  81. Simple test program that shows how to use Imaging library from C/C++
  82. environment.</par>
  83. <table>
  84. <title>Demo Information</title>
  85. <row>
  86. <td><b>Name</b></td>
  87. <td>Small Test</td>
  88. </row>
  89. <row>
  90. <td><b>Language</b></td>
  91. <td>C/C++</td>
  92. </row>
  93. <row>
  94. <td><b>Source Path</b></td>
  95. <td>(Imaging Root)\Demos\Cpp\Test</td>
  96. </row>
  97. <row>
  98. <td><b>Exe Path</b></td>
  99. <td>(Imaging Root)\Demos\Bin\test[.exe]</td>
  100. </row>
  101. <row>
  102. <td><b>Platforms (tested)</b></td>
  103. <td><b>W</b>in32, <b>L</b>inux</td>
  104. </row>
  105. <row>
  106. <td><b>Compilers (tested)</b></td>
  107. <td>MSVC 8.0 <b>W</b>, GCC 3.4.2 <b>WL</b></td>
  108. </row>
  109. <row>
  110. <td><b>Imaging interface</b></td>
  111. <td>low level (using dyn. library wrapper)</td>
  112. </row>
  113. </table>
  114. <par>
  115. Test image is created and diagonal line is drawn across it.
  116. Then it is saved to <b>ctestimage.png</b> file.</par>
  117. </chapter>
  118. </doc>