Leadtools.Controlsアセンブリ > Leadtools.Controls名前空間 :ImageViewerクラス |
public class ImageViewer : System.Windows.Forms.ScrollableControl
'Declaration
Public Class ImageViewer Inherits System.Windows.Forms.ScrollableControl
LEADTOOLS ImageViewerクラスは、オプションのインタラクティブUI操作で一つ以上のイメージを示すコントロールを表します。それは、Adobe AcrobatなどのMS-ペイントまたは複数の項目アプリケーションなどの単一の項目アプリケーションをサポートします。
LEADTOOLS主なデモは、主なimageを表示するために、単一のレイアウトモードで画像ビューワインスタンスを使います
LEADTOOLSドキュメントビューワは、ページのサムネイルを表示するために、垂直方向のレイアウトで画像ビューワインスタンスを使います
そして、主なコンテンツを表示する二重のレイアウトでによるもう一つの画像ビューワインスタンス
ImageViewerは、以下の機能をサポートします
各々それ自身の画像データ、サイズとオプションの追加の変換による単一であるか複数の項目
ラスターとSVGイメージの内部サポートとディスクファイルまたはURLから直接ロードすることを含むドキュメント
単一の、垂直と水平のレイアウトの内部サポートによる拡張可能なレイアウトシステム
パニング、ズーム、拡大鏡、ラバーバンディングとより多くの豊かな組み込みで完全にカスタマイズ可能で拡張可能なユーザーインターフェース対話操作サポート。マウスとタッチの両方の入力をサポートします。
完全にカスタマイズ可能な外観とposition
自動とカスタムは、モードをスクロールします
Ownerは、レンダリングを描画します
サイズモード(フィット、適当なページなど)による無限のズームを含む表示オプション、任意の角度の回転、フリップ、逆の、カラー反転と低レベル変換
高く、ヒットテストのために項目操作をレベル調整して、自動的に特定の項目またはページへ行きます
画像ビューワと外部のソース(例えばファイルシステムまたは他の画像ビューワインスタンス)間のドラッグアンドドロップ
フローターとリージョンサポート
多数のイメージを処理するための仮想化モード
機能性の各々のグループに関するより徹底的な情報のための以下のトピックを参照してください
このサンプルはImageViewerを作成して、対話モードをパン/ズームに設定して、それにimageを追加します。
Imports Leadtools Imports Leadtools.Controls Imports Leadtools.Codecs Imports Leadtools.Drawing Imports Leadtools.ImageProcessing Imports Leadtools.ImageProcessing.Color <TestMethod> Public Sub ImageViewer_Example() ' Create the form that holds the ImageViewer CType(New MyForm(), MyForm).ShowDialog() End Sub Private Class MyForm : Inherits Form Public Sub New() Me.Size = New Size(800, 800) End Sub ' LEADTOOLS ImageViewer to be used with this example Private _imageViewer As ImageViewer ' Information label Private _label As Label ' Generic state value used by the examples Private _firstCall As Boolean = True Protected Overrides Sub OnLoad(ByVal e As EventArgs) ' Create a panel to the top Dim panel As New Panel() panel.Dock = DockStyle.Top panel.BorderStyle = BorderStyle.FixedSingle Me.Controls.Add(panel) ' Add an "Example" button to the panel Dim button As New Button() button.Text = "&Example" AddHandler button.Click, Sub(sender, e1) Example() panel.Controls.Add(button) ' Add a label to the panel _label = New Label() _label.Top = button.Bottom _label.Width = 800 _label.Text = "Example..." panel.Controls.Add(_label) ' Create the image viewer taking the rest of the form _imageViewer = New ImageViewer() _imageViewer.Dock = DockStyle.Fill _imageViewer.BackColor = Color.Bisque Me.Controls.Add(_imageViewer) _imageViewer.BringToFront() ' Add Pan/Zoom interactive mode ' Click and drag to pan, CTRL-Click and drag to zoom in and out _imageViewer.DefaultInteractiveMode = New ImageViewerPanZoomInteractiveMode() ' Load an image Using codecs As New RasterCodecs() _imageViewer.Image = codecs.Load(Path.Combine(ImagesPath.Path, "image1.cmp")) End Using _firstCall = True MyBase.OnLoad(e) End Sub Private Sub Example() ' Example code goes here End Sub End Class
using Leadtools; using Leadtools.Controls; using Leadtools.Codecs; using Leadtools.Drawing; using Leadtools.ImageProcessing; using Leadtools.ImageProcessing.Color; public void ImageViewer_Example() { // Create the form that holds the ImageViewer new MyForm().ShowDialog(); } class MyForm : Form { public MyForm() { this.Size = new Size(800, 800); } // LEADTOOLS ImageViewer to be used with this example private ImageViewer _imageViewer; // Information label private Label _label; // Generic state value used by the examples private bool _firstCall = true; protected override void OnLoad(EventArgs e) { // Create a panel to the top var panel = new Panel(); panel.Dock = DockStyle.Top; panel.BorderStyle = BorderStyle.FixedSingle; this.Controls.Add(panel); // Add an "Example" button to the panel var button = new Button(); button.Text = "&Example"; button.Click += (sender, e1) => Example(); panel.Controls.Add(button); // Add a label to the panel _label = new Label(); _label.Top = button.Bottom; _label.Width = 800; _label.Text = "Example..."; panel.Controls.Add(_label); // Create the image viewer taking the rest of the form _imageViewer = new ImageViewer(); _imageViewer.Dock = DockStyle.Fill; _imageViewer.BackColor = Color.Bisque; this.Controls.Add(_imageViewer); _imageViewer.BringToFront(); // Add Pan/Zoom interactive mode // Click and drag to pan, CTRL-Click and drag to zoom in and out _imageViewer.DefaultInteractiveMode = new ImageViewerPanZoomInteractiveMode(); // Load an image using (var codecs = new RasterCodecs()) _imageViewer.Image = codecs.Load(Path.Combine(ImagesPath.Path, "image1.cmp")); _firstCall = true; base.OnLoad(e); } private void Example() { // Example code goes here } }