======== 描画処理 ======== .. highlight:: cpp .. _draw_line: 線分を描く ========== .. literalinclude:: code/cpp/sample_draw_line.cpp 実行結果: .. image:: image/lines.png :scale: 30% .. _draw_rectangle: 矩形を描く ========== .. literalinclude:: code/cpp/sample_draw_rectangle.cpp 実行結果: .. image:: image/rectangles.png :scale: 30% 円を描く ======== .. literalinclude:: code/cpp/sample_draw_circle.cpp 実行結果: .. image:: image/draw_circles.png :scale: 30% 楕円・円弧を描く ================ .. literalinclude:: code/cpp/sample_draw_ellipse.cpp 実行結果: .. image:: image/ellipses.png :scale: 30% 折れ線を描く ============ .. literalinclude:: code/cpp/sample_draw_polylines.cpp 実行結果: .. image:: image/polylines.png :scale: 30% ポリゴンを描く ============== .. literalinclude:: code/cpp/sample_draw_fillpoly.cpp 実行結果: .. image:: image/fillpoly.png :scale: 30% テキストを描く ============== 現在のところ(OpenCV-2.2),下記以外のフォントはサポートされていないので,日本語などのマルチバイト文字などを描画することはできません. .. literalinclude:: code/cpp/sample_draw_text.cpp 実行結果: .. image:: image/draw_text.png :scale: 30%