Graphics.DrawImageUnscaledとは? わかりやすく解説

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

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

名前空間: System.Drawing
アセンブリ: System.Drawing (system.drawing.dll 内)
構文構文

Public Sub DrawImageUnscaled ( _
    image As Image, _
    rect As Rectangle _
)
Dim instance As Graphics
Dim image As Image
Dim rect As Rectangle

instance.DrawImageUnscaled(image, rect)
public void DrawImageUnscaled (
    Image image,
    Rectangle rect
)
public:
void DrawImageUnscaled (
    Image^ image, 
    Rectangle rect
)
public void DrawImageUnscaled (
    Image image, 
    Rectangle rect
)
public function DrawImageUnscaled (
    image : Image, 
    rect : Rectangle
)

パラメータ

image

描画する Image

rect

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

例外例外
例外種類条件

ArgumentNullException

imagenull 参照 (Visual Basic では Nothing) です。

解説解説

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

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

プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照

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

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

名前空間: System.Drawing
アセンブリ: System.Drawing (system.drawing.dll 内)
構文構文

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

instance.DrawImageUnscaled(image, x, y)
public void DrawImageUnscaled (
    Image image,
    int x,
    int y
)
public:
void DrawImageUnscaled (
    Image^ image, 
    int x, 
    int y
)
public void DrawImageUnscaled (
    Image image, 
    int x, 
    int y
)
public function DrawImageUnscaled (
    image : Image, 
    x : int, 
    y : int
)

パラメータ

image

描画する Image

x

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

y

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

例外例外
例外種類条件

ArgumentNullException

imagenull 参照 (Visual Basic では Nothing) です。

解説解説

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
プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照

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

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

名前空間: System.Drawing
アセンブリ: System.Drawing (system.drawing.dll 内)
構文構文

Public Sub DrawImageUnscaled ( _
    image As Image, _
    point As Point _
)
Dim instance As Graphics
Dim image As Image
Dim point As Point

instance.DrawImageUnscaled(image, point)
public void DrawImageUnscaled (
    Image image,
    Point point
)
public:
void DrawImageUnscaled (
    Image^ image, 
    Point point
)
public void DrawImageUnscaled (
    Image image, 
    Point point
)
public function DrawImageUnscaled (
    image : Image, 
    point : Point
)

パラメータ

image

描画する Image

point

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

例外例外
例外種類条件

ArgumentNullException

imagenull 参照 (Visual Basic では Nothing) です。

解説解説

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
プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照

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

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

名前空間: System.Drawing
アセンブリ: 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)
public void DrawImageUnscaled (
    Image image,
    int x,
    int y,
    int width,
    int height
)
public:
void DrawImageUnscaled (
    Image^ image, 
    int x, 
    int y, 
    int width, 
    int height
)
public void DrawImageUnscaled (
    Image image, 
    int x, 
    int y, 
    int width, 
    int height
)
public function DrawImageUnscaled (
    image : Image, 
    x : int, 
    y : int, 
    width : int, 
    height : int
)

パラメータ

image

描画する Image

x

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

y

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

width

使用されていません。

height

使用されていません。

例外例外
例外種類条件

ArgumentNullException

imagenull 参照 (Visual Basic では Nothing) です。

解説解説

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

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

プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照

Graphics.DrawImageUnscaled メソッド




英和和英テキスト翻訳>> Weblio翻訳
英語⇒日本語日本語⇒英語
  

辞書ショートカット

すべての辞書の索引

「Graphics.DrawImageUnscaled」の関連用語

Graphics.DrawImageUnscaledのお隣キーワード
検索ランキング

   

英語⇒日本語
日本語⇒英語
   



Graphics.DrawImageUnscaledのページの著作権
Weblio 辞書 情報提供元は 参加元一覧 にて確認できます。

   
日本マイクロソフト株式会社日本マイクロソフト株式会社
© 2025 Microsoft.All rights reserved.

©2025 GRAS Group, Inc.RSS