Graphics.DrawImageUnscaled メソッド

定義

指定したイメージを座標ペアで指定された位置に元の物理サイズで描画します。

オーバーロード

DrawImageUnscaled(Image, Int32, Int32)

指定したイメージを座標ペアで指定された位置に元の物理サイズで描画します。

DrawImageUnscaled(Image, Int32, Int32, Int32, Int32)

指定した位置に、指定したイメージを元の物理サイズで描画します。

DrawImageUnscaled(Image, Point)

指定した位置に、指定したイメージを元の物理サイズで描画します。

DrawImageUnscaled(Image, Rectangle)

指定した位置に、指定したイメージを元の物理サイズで描画します。

DrawImageUnscaled(Image, Int32, Int32)

ソース:
Graphics.cs
ソース:
Graphics.cs
ソース:
Graphics.cs

指定したイメージを座標ペアで指定された位置に元の物理サイズで描画します。

public:
 void DrawImageUnscaled(System::Drawing::Image ^ image, int x, int y);
public void DrawImageUnscaled (System.Drawing.Image image, int x, int y);
member this.DrawImageUnscaled : System.Drawing.Image * int * int -> unit
Public Sub DrawImageUnscaled (image As Image, x As Integer, y As Integer)

パラメーター

image
Image

描画する Image

x
Int32

描画イメージの左上隅の x 座標。

y
Int32

描画イメージの左上隅の y 座標。

例外

imagenullです。

次のコード例は、Windows フォームで使用するように設計されており、イベント ハンドラーのPaintパラメーターである が必要PaintEventArgseです。 コードは、次のアクションを実行します。

  • 例の フォルダーに、SampImag.jpg JPEG ファイルから画像を作成します。

  • イメージの左上隅を描画するポイントを作成します。

  • 物理サイズを使用してイメージ全体を描画します。

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 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

注釈

には Image 、ピクセル幅の値と水平解像度の値 (1 インチあたりのドット数) が格納されます。 画像の物理的な幅 (インチ単位) は、ピクセルの幅を水平方向の解像度で割った値です。 たとえば、ピクセル幅が 216 で、水平方向の解像度が 72 ドット/インチの画像の物理的な幅は 3 インチです。 同様の注釈は、ピクセルの高さと物理的な高さに適用されます。

メソッドは DrawImageUnscaled 、物理サイズを使用してイメージを描画するため、ディスプレイ デバイスの解像度 (1 インチあたりのドット数) に関係なく、イメージのサイズがインチ単位で正しく設定されます。 たとえば、画像のピクセル幅が 216 で、水平方向の解像度が 72 ドット/インチとします。 を呼び出 DrawImageUnscaled して、解像度が 96 ドット/インチのデバイスでそのイメージを描画する場合、レンダリングされるイメージのピクセル幅は (216/72)*96 = 288 になります。

適用対象

DrawImageUnscaled(Image, Int32, Int32, Int32, Int32)

ソース:
Graphics.cs
ソース:
Graphics.cs
ソース:
Graphics.cs

指定した位置に、指定したイメージを元の物理サイズで描画します。

public:
 void DrawImageUnscaled(System::Drawing::Image ^ image, int x, int y, int width, int height);
public void DrawImageUnscaled (System.Drawing.Image image, int x, int y, int width, int height);
member this.DrawImageUnscaled : System.Drawing.Image * int * int * int * int -> unit
Public Sub DrawImageUnscaled (image As Image, x As Integer, y As Integer, width As Integer, height As Integer)

パラメーター

image
Image

描画する Image

x
Int32

描画イメージの左上隅の x 座標。

y
Int32

描画イメージの左上隅の y 座標。

width
Int32

使用しません。

height
Int32

使用しません。

例外

imagenullです。

注釈

には Image 、ピクセル幅の値と水平解像度の値 (1 インチあたりのドット数) が格納されます。 画像の物理的な幅 (インチ単位) は、ピクセルの幅を水平方向の解像度で割った値です。 たとえば、ピクセル幅が 216 で、水平方向の解像度が 72 ドット/インチの画像の物理的な幅は 3 インチです。 同様の注釈は、ピクセルの高さと物理的な高さに適用されます。

メソッドは DrawImageUnscaled 、物理サイズを使用してイメージを描画するため、ディスプレイ デバイスの解像度 (1 インチあたりのドット数) に関係なく、イメージのサイズがインチ単位で正しく設定されます。 たとえば、画像のピクセル幅が 216 で、水平方向の解像度が 72 ドット/インチとします。 を呼び出 DrawImageUnscaled して、解像度が 96 ドット/インチのデバイスでそのイメージを描画する場合、レンダリングされるイメージのピクセル幅は (216/72)*96 = 288 になります。

適用対象

DrawImageUnscaled(Image, Point)

ソース:
Graphics.cs
ソース:
Graphics.cs
ソース:
Graphics.cs

指定した位置に、指定したイメージを元の物理サイズで描画します。

public:
 void DrawImageUnscaled(System::Drawing::Image ^ image, System::Drawing::Point point);
public void DrawImageUnscaled (System.Drawing.Image image, System.Drawing.Point point);
member this.DrawImageUnscaled : System.Drawing.Image * System.Drawing.Point -> unit
Public Sub DrawImageUnscaled (image As Image, point As Point)

パラメーター

image
Image

描画する Image

point
Point

描画するイメージの左上隅を指定する Point 構造体。

例外

imagenullです。

次のコード例は、Windows フォームで使用するように設計されており、イベント ハンドラーのPaintパラメーターである が必要PaintEventArgseです。 コードは、次のアクションを実行します。

  • 例の フォルダーに SampImag.jpg JPEG ファイルから画像を作成します。

  • イメージの左上隅を描画するポイントを作成します。

  • 物理サイズを使用してイメージ全体を描画します。

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.Graphics.DrawImageUnscaled(newImage, ulCorner);
}
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

注釈

には Image 、ピクセル幅の値と水平解像度の値 (1 インチあたりのドット数) が格納されます。 画像の物理的な幅 (インチ単位) は、ピクセルの幅を水平方向の解像度で割った値です。 たとえば、ピクセル幅が 216 で、水平方向の解像度が 72 ドット/インチの画像の物理的な幅は 3 インチです。 同様の注釈は、ピクセルの高さと物理的な高さに適用されます。

メソッドは DrawImageUnscaled 、物理サイズを使用してイメージを描画するため、ディスプレイ デバイスの解像度 (1 インチあたりのドット数) に関係なく、イメージのサイズがインチ単位で正しく設定されます。 たとえば、画像のピクセル幅が 216 で、水平方向の解像度が 72 ドット/インチとします。 を呼び出 DrawImageUnscaled して、解像度が 96 ドット/インチのデバイスでそのイメージを描画する場合、レンダリングされるイメージのピクセル幅は (216/72)*96 = 288 になります。

適用対象

DrawImageUnscaled(Image, Rectangle)

ソース:
Graphics.cs
ソース:
Graphics.cs
ソース:
Graphics.cs

指定した位置に、指定したイメージを元の物理サイズで描画します。

public:
 void DrawImageUnscaled(System::Drawing::Image ^ image, System::Drawing::Rectangle rect);
public void DrawImageUnscaled (System.Drawing.Image image, System.Drawing.Rectangle rect);
member this.DrawImageUnscaled : System.Drawing.Image * System.Drawing.Rectangle -> unit
Public Sub DrawImageUnscaled (image As Image, rect As Rectangle)

パラメーター

image
Image

描画する Image

rect
Rectangle

描画するイメージの左上隅を指定する Rectangle。 四角形の X プロパティおよび Y プロパティは、左上隅を指定します。 Width プロパティおよび Height プロパティは無視されます。

例外

imagenullです。

注釈

には Image 、ピクセル幅の値と水平解像度の値 (1 インチあたりのドット数) が格納されます。 画像の物理的な幅 (インチ単位) は、ピクセルの幅を水平方向の解像度で割った値です。 たとえば、ピクセル幅が 216 で、水平方向の解像度が 72 ドット/インチの画像の物理的な幅は 3 インチです。 同様の注釈は、ピクセルの高さと物理的な高さに適用されます。

メソッドは DrawImageUnscaled 、物理サイズを使用してイメージを描画するため、ディスプレイ デバイスの解像度 (1 インチあたりのドット数) に関係なく、イメージのサイズがインチ単位で正しく設定されます。 たとえば、画像のピクセル幅が 216 で、水平方向の解像度が 72 ドット/インチとします。 を呼び出 DrawImageUnscaled して、解像度が 96 ドット/インチのデバイスでそのイメージを描画する場合、レンダリングされるイメージのピクセル幅は (216/72)*96 = 288 になります。

適用対象