Graphics.DrawImageUnscaled メソッド (Image, Rectangle)
アセンブリ: System.Drawing (system.drawing.dll 内)

Dim instance As Graphics Dim image As Image Dim rect As Rectangle instance.DrawImageUnscaled(image, rect)


Image は、ピクセル幅の値および水平方向の解像度 (dpi) の値を格納します。イメージの物理的な幅 (インチ) は、ピクセル幅を水平解像度で割った値です。たとえば、ピクセル幅 216、水平解像度 72 dpi のイメージの物理的な幅は 3 インチです。ピクセルの高さと物理的な高さについても同様です。
DrawImageUnscaled メソッドは物理サイズを使用してイメージを描画するため、イメージは表示デバイスの解像度 (dpi) に関係なく、インチで示された正確なサイズで描画されます。たとえば、ピクセル幅が 216、水平解像度が 72 dpi のイメージがあるとします。DrawImageUnscaled を呼び出して、96 dpi (1 インチあたりのドット数) の解像度のデバイスにこのイメージを描画すると、レンダリングされたイメージの幅は (216/72)*96 = 288 (ピクセル) になります。

Windows 98, Windows 2000 SP4, Windows Millennium Edition, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition
開発プラットフォームの中には、.NET Framework によってサポートされていないバージョンがあります。サポートされているバージョンについては、「システム要件」を参照してください。


Graphics.DrawImageUnscaled メソッド (Image, Int32, Int32)
アセンブリ: System.Drawing (system.drawing.dll 内)

Dim instance As Graphics Dim image As Image Dim x As Integer Dim y As Integer instance.DrawImageUnscaled(image, x, y)


Image は、ピクセル幅の値および水平方向の解像度 (dpi) の値を格納します。イメージの物理的な幅 (インチ) は、ピクセル幅を水平解像度で割った値です。たとえば、ピクセル幅 216、水平解像度 72 dpi のイメージの物理的な幅は 3 インチです。ピクセルの高さと物理的な高さについても同様です。
DrawImageUnscaled メソッドは物理サイズを使用してイメージを描画するため、イメージは表示デバイスの解像度 (dpi) に関係なく、インチで示された正確なサイズで描画されます。たとえば、ピクセル幅が 216、水平解像度が 72 dpi のイメージがあるとします。DrawImageUnscaled を呼び出して、96 dpi (1 インチあたりのドット数) の解像度のデバイスにこのイメージを描画すると、レンダリングされたイメージの幅は (216/72)*96 = 288 (ピクセル) になります。

次の例は、Windows フォームでの使用を意図してデザインされており、Paint イベント ハンドラのパラメータである PaintEventArgse が必要です。このコードは次のアクションを実行します。
Public Sub DrawImageUnscaledInt(ByVal e As PaintEventArgs) ' Create image. Dim newImage As Image = Image.FromFile("SampImag.jpg") ' Create coordinates for upper-left corner of image. Dim x As Integer = 100 Dim y As Integer = 100 ' Draw image to screen. e.Graphics.DrawImageUnscaled(newImage, x, y) End Sub
public void DrawImageUnscaledInt(PaintEventArgs e) { // Create image. Image newImage = Image.FromFile("SampImag.jpg"); // Create coordinates for upper-left corner of image. int x = 100; int y = 100; // Draw image to screen. e.Graphics.DrawImageUnscaled(newImage, x, y); }
public: void DrawImageUnscaledInt( PaintEventArgs^ e ) { // Create image. Image^ newImage = Image::FromFile( "SampImag.jpg" ); // Create coordinates for upper-left corner of image. int x = 100; int y = 100; // Draw image to screen. e->Graphics->DrawImageUnscaled( newImage, x, y ); }
public void DrawImageUnscaledInt(PaintEventArgs e) { // Create image. Image newImage = Image.FromFile("SampImag.jpg"); // Create coordinates for upper-left corner of image. int x = 100; int y = 100; // Draw image to screen. e.get_Graphics().DrawImageUnscaled(newImage, x, y); } //DrawImageUnscaledInt

Windows 98, Windows 2000 SP4, Windows Millennium Edition, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition
開発プラットフォームの中には、.NET Framework によってサポートされていないバージョンがあります。サポートされているバージョンについては、「システム要件」を参照してください。


Graphics.DrawImageUnscaled メソッド (Image, Point)
アセンブリ: System.Drawing (system.drawing.dll 内)

Dim instance As Graphics Dim image As Image Dim point As Point instance.DrawImageUnscaled(image, point)


Image は、ピクセル幅の値および水平方向の解像度 (dpi) の値を格納します。イメージの物理的な幅 (インチ) は、ピクセル幅を水平解像度で割った値です。たとえば、ピクセル幅 216、水平解像度 72 dpi のイメージの物理的な幅は 3 インチです。ピクセルの高さと物理的な高さについても同様です。
DrawImageUnscaled メソッドは物理サイズを使用してイメージを描画するため、イメージは表示デバイスの解像度 (dpi) に関係なく、インチで示された正確なサイズで描画されます。たとえば、ピクセル幅が 216、水平解像度が 72 dpi のイメージがあるとします。DrawImageUnscaled を呼び出して、96 dpi (1 インチあたりのドット数) の解像度のデバイスにこのイメージを描画すると、レンダリングされたイメージの幅は (216/72)*96 = 288 (ピクセル) になります。

次の例は、Windows フォームでの使用を意図してデザインされており、Paint イベント ハンドラのパラメータである PaintEventArgse が必要です。このコードは次のアクションを実行します。
Public Sub DrawImageUnscaledPoint(ByVal e As PaintEventArgs) ' Create image. Dim newImage As Image = Image.FromFile("SampImag.jpg") ' Create point for upper-left corner of image. Dim ulCorner As New Point(100, 100) ' Draw image to screen. e.Graphics.DrawImageUnscaled(newImage, ulCorner) End Sub
public void DrawImageUnscaledPoint(PaintEventArgs e) { // Create image. Image newImage = Image.FromFile("SampImag.jpg"); // Create point for upper-left corner of image. Point ulCorner = new Point(100, 100); // Draw image to screen. e.Graphics.DrawImageUnscaled(newImage, ulCorner); }
public: void DrawImageUnscaledPoint( PaintEventArgs^ e ) { // Create image. Image^ newImage = Image::FromFile( "SampImag.jpg" ); // Create point for upper-left corner of image. Point ulCorner = Point(100,100); // Draw image to screen. e->Graphics->DrawImageUnscaled( newImage, ulCorner ); }
public void DrawImageUnscaledPoint(PaintEventArgs e) { // Create image. Image newImage = Image.FromFile("SampImag.jpg"); // Create point for upper-left corner of image. Point ulCorner = new Point(100, 100); // Draw image to screen. e.get_Graphics().DrawImageUnscaled(newImage, ulCorner); } //DrawImageUnscaledPoint

Windows 98, Windows 2000 SP4, Windows Millennium Edition, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition
開発プラットフォームの中には、.NET Framework によってサポートされていないバージョンがあります。サポートされているバージョンについては、「システム要件」を参照してください。


Graphics.DrawImageUnscaled メソッド (Image, Int32, Int32, Int32, Int32)
アセンブリ: System.Drawing (system.drawing.dll 内)

Public Sub DrawImageUnscaled ( _ image As Image, _ x As Integer, _ y As Integer, _ width As Integer, _ height As Integer _ )
Dim instance As Graphics Dim image As Image Dim x As Integer Dim y As Integer Dim width As Integer Dim height As Integer instance.DrawImageUnscaled(image, x, y, width, height)


Image は、ピクセル幅の値および水平方向の解像度 (dpi) の値を格納します。イメージの物理的な幅 (インチ) は、ピクセル幅を水平解像度で割った値です。たとえば、ピクセル幅 216、水平解像度 72 dpi のイメージの物理的な幅は 3 インチです。ピクセルの高さと物理的な高さについても同様です。
DrawImageUnscaled メソッドは物理サイズを使用してイメージを描画するため、イメージは表示デバイスの解像度 (dpi) に関係なく、インチで示された正確なサイズで描画されます。たとえば、ピクセル幅が 216、水平解像度が 72 dpi のイメージがあるとします。DrawImageUnscaled を呼び出して、96 dpi (1 インチあたりのドット数) の解像度のデバイスにこのイメージを描画すると、レンダリングされたイメージの幅は (216/72)*96 = 288 (ピクセル) になります。

Windows 98, Windows 2000 SP4, Windows Millennium Edition, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition
開発プラットフォームの中には、.NET Framework によってサポートされていないバージョンがあります。サポートされているバージョンについては、「システム要件」を参照してください。


Graphics.DrawImageUnscaled メソッド

名前 | 説明 |
---|---|
Graphics.DrawImageUnscaled (Image, Point) | 指定した位置に、指定したイメージを元の物理サイズで描画します。 |
Graphics.DrawImageUnscaled (Image, Rectangle) | 指定した位置に、指定したイメージを元の物理サイズで描画します。 |
Graphics.DrawImageUnscaled (Image, Int32, Int32) | 指定したイメージを座標ペアで指定された位置に元の物理サイズで描画します。 |
Graphics.DrawImageUnscaled (Image, Int32, Int32, Int32, Int32) | 指定した位置に、指定したイメージを元の物理サイズで描画します。 |

- Graphics.DrawImageUnscaledのページへのリンク