次の方法で共有


Graphics.DrawImageUnscaled メソッド (Image, Int32, Int32, Int32, Int32)

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

Overloads Public Sub DrawImageUnscaled( _
   ByVal image As Image, _   ByVal x As Integer, _   ByVal y As Integer, _   ByVal width As Integer, _   ByVal height As Integer _)
[C#]
public void DrawImageUnscaled(Imageimage,intx,inty,intwidth,intheight);
[C++]
public: void DrawImageUnscaled(Image* image,intx,inty,intwidth,intheight);
[JScript]
public function DrawImageUnscaled(
   image : Image,x : int,y : int,width : int,height : int);

パラメータ

  • image
    描画する Image オブジェクト。
  • x
    描画イメージの左上隅の x 座標。
  • y
    描画イメージの左上隅の x 座標。
  • width
    使用されていません。
  • height
    使用されていません。

戻り値

このメソッドは値を返しません。

解説

Image オブジェクトは、ピクセル幅の値および水平方向の解像度 (dpi) の値を格納します。イメージの物理的な幅 (インチ) は、ピクセル幅を水平解像度で割った値です。たとえば、ピクセル幅 216、水平解像度 72 dpi のイメージの物理的な幅は 3 インチです。ピクセルの高さと物理的な高さについても同様です。

DrawImageUnscaled メソッドは物理サイズを使用してイメージを描画するため、イメージは表示デバイスの解像度 (dpi) に関係なく、インチで示された正確なサイズで描画されます。たとえば、ピクセル幅が 216、水平解像度が 72 dpi のイメージがあるとします。解像度が 96 dpi のデバイスに DrawImageUnscaled を呼び出してイメージを描画すると、描画されるイメージのピクセル幅は (216/72)*96 = 288 になります。

DrawImageUnscaled(image, x, y, width, height) 呼び出しは、DrawImage(image, x, y) 呼び出しとまったく同じ意味を持ちます。

必要条件

プラットフォーム: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 ファミリ

参照

Graphics クラス | Graphics メンバ | System.Drawing 名前空間 | Graphics.DrawImageUnscaled オーバーロードの一覧