ImageAttributes.SetWrapMode 메서드
정의
중요
일부 정보는 릴리스되기 전에 상당 부분 수정될 수 있는 시험판 제품과 관련이 있습니다. Microsoft는 여기에 제공된 정보에 대해 어떠한 명시적이거나 묵시적인 보증도 하지 않습니다.
래핑 모드를 설정합니다.
오버로드
| Name | Description |
|---|---|
| SetWrapMode(WrapMode) |
셰이프 또는 셰이프 경계에서 질감을 타일하는 방법을 결정하는 데 사용되는 래핑 모드를 설정합니다. 질감이 채우는 셰이프보다 작을 때 채우기 위해 셰이프에 바일링됩니다. |
| SetWrapMode(WrapMode, Color) |
셰이프 또는 셰이프 경계에서 질감을 타일하는 방법을 결정하는 데 사용되는 래핑 모드 및 색을 설정합니다. 질감이 채우는 셰이프보다 작을 때 채우기 위해 셰이프에 바일링됩니다. |
| SetWrapMode(WrapMode, Color, Boolean) |
셰이프 또는 셰이프 경계에서 질감을 타일하는 방법을 결정하는 데 사용되는 래핑 모드 및 색을 설정합니다. 질감이 채우는 셰이프보다 작을 때 채우기 위해 셰이프에 바일링됩니다. |
SetWrapMode(WrapMode)
- Source:
- ImageAttributes.cs
- Source:
- ImageAttributes.cs
- Source:
- ImageAttributes.cs
- Source:
- ImageAttributes.cs
- Source:
- ImageAttributes.cs
- Source:
- ImageAttributes.cs
- Source:
- ImageAttributes.cs
- Source:
- ImageAttributes.cs
셰이프 또는 셰이프 경계에서 질감을 타일하는 방법을 결정하는 데 사용되는 래핑 모드를 설정합니다. 질감이 채우는 셰이프보다 작을 때 채우기 위해 셰이프에 바일링됩니다.
public:
void SetWrapMode(System::Drawing::Drawing2D::WrapMode mode);
public void SetWrapMode(System.Drawing.Drawing2D.WrapMode mode);
member this.SetWrapMode : System.Drawing.Drawing2D.WrapMode -> unit
Public Sub SetWrapMode (mode As WrapMode)
매개 변수
예제
다음 코드 예제는 Windows Forms 사용하도록 설계되었으며 PaintEventArgs 이벤트 처리기의 매개 변수인 ePaint 필요합니다. 코드는 다음 작업을 수행합니다.
ImageCircle3.jpg 파일(빨간색으로 채워진 작은 원)을 열고 화면에 그립니다.
개체를 ImageAttributes 만들고 열거형을 WrapMode .로 Tile설정합니다.
TextureBrushCircle3.jpg 파일에서 using 이미지를 만듭니다.
빨간색으로 채워진 작은 원으로 채워진 화면에 사각형을 그립니다.
void SetWrapModeExample( PaintEventArgs^ e )
{
// Create a filled, red circle, and save it to Circle3.jpg.
Bitmap^ myBitmap = gcnew Bitmap( 50,50 );
Graphics^ g = Graphics::FromImage( myBitmap );
g->Clear( Color::White );
g->FillEllipse( gcnew SolidBrush( Color::Red ), Rectangle(0,0,25,25) );
myBitmap->Save( "Circle3.jpg" );
// Create an Image object from the Circle3.jpg file, and draw it
// to the screen.
Image^ myImage = Image::FromFile( "Circle3.jpg" );
e->Graphics->DrawImage( myImage, 20, 20 );
// Set the wrap mode.
ImageAttributes^ imageAttr = gcnew ImageAttributes;
imageAttr->SetWrapMode( WrapMode::Tile );
// Create a TextureBrush.
Rectangle brushRect = Rectangle(0,0,25,25);
TextureBrush^ myTBrush = gcnew TextureBrush( myImage,brushRect,imageAttr );
// Draw to the screen a rectangle filled with red circles.
e->Graphics->FillRectangle( myTBrush, 100, 20, 200, 200 );
}
private void SetWrapModeExample(PaintEventArgs e)
{
// Create a filled, red circle, and save it to Circle3.jpg.
Bitmap myBitmap = new Bitmap(50, 50);
Graphics g = Graphics.FromImage(myBitmap);
g.Clear(Color.White);
g.FillEllipse(new SolidBrush(Color.Red),
new Rectangle(0, 0, 25, 25));
myBitmap.Save("Circle3.jpg");
// Create an Image object from the Circle3.jpg file, and draw it
// to the screen.
Image myImage = Image.FromFile("Circle3.jpg");
e.Graphics.DrawImage(myImage, 20, 20);
// Set the wrap mode.
ImageAttributes imageAttr = new ImageAttributes();
imageAttr.SetWrapMode(WrapMode.Tile);
// Create a TextureBrush.
Rectangle brushRect = new Rectangle(0,0,25,25);
TextureBrush myTBrush = new TextureBrush(myImage, brushRect, imageAttr);
// Draw to the screen a rectangle filled with red circles.
e.Graphics.FillRectangle(myTBrush, 100, 20, 200, 200);
}
Public Sub SetWrapModeExample(ByVal e As PaintEventArgs)
' Create a filled, red circle, and save it to Circle3.jpg.
Dim myBitmap As New Bitmap(50, 50)
Dim g As Graphics = Graphics.FromImage(myBitmap)
g.Clear(Color.White)
g.FillEllipse(New SolidBrush(Color.Red), New Rectangle(0, 0, _
25, 25))
myBitmap.Save("Circle3.jpg")
' Create an Image object from the Circle3.jpg file, and draw
' it to the screen.
Dim myImage As Image = Image.FromFile("Circle3.jpg")
e.Graphics.DrawImage(myImage, 20, 20)
' Set the wrap mode.
Dim imageAttr As New ImageAttributes
imageAttr.SetWrapMode(WrapMode.Tile)
' Create a TextureBrush.
Dim brushRect As New Rectangle(0, 0, 25, 25)
Dim myTBrush As New TextureBrush(myImage, brushRect, imageAttr)
' Draw to the screen a rectangle filled with red circles.
e.Graphics.FillRectangle(myTBrush, 100, 20, 200, 200)
End Sub
설명
메서드를 SetWrapMode(WrapMode) 호출하는 것은 매개 변수를 호출 SetWrapMode(WrapMode, Color) 하고 전달하는 Color.Blackcolor 것과 같습니다.
Color.Black 는 렌더링된 이미지 외부의 픽셀 색을 지정합니다. 모드 매개 변수가 설정되고 메서드에 Clamp 전달된 DrawImage 원본 사각형이 이미지 자체보다 큰 경우 이 색이 표시됩니다.
적용 대상
SetWrapMode(WrapMode, Color)
- Source:
- ImageAttributes.cs
- Source:
- ImageAttributes.cs
- Source:
- ImageAttributes.cs
- Source:
- ImageAttributes.cs
- Source:
- ImageAttributes.cs
- Source:
- ImageAttributes.cs
- Source:
- ImageAttributes.cs
- Source:
- ImageAttributes.cs
셰이프 또는 셰이프 경계에서 질감을 타일하는 방법을 결정하는 데 사용되는 래핑 모드 및 색을 설정합니다. 질감이 채우는 셰이프보다 작을 때 채우기 위해 셰이프에 바일링됩니다.
public:
void SetWrapMode(System::Drawing::Drawing2D::WrapMode mode, System::Drawing::Color color);
public void SetWrapMode(System.Drawing.Drawing2D.WrapMode mode, System.Drawing.Color color);
member this.SetWrapMode : System.Drawing.Drawing2D.WrapMode * System.Drawing.Color -> unit
Public Sub SetWrapMode (mode As WrapMode, color As Color)
매개 변수
- color
- Color
ImageAttributes 렌더링된 이미지 외부의 픽셀 색을 지정하는 개체입니다. 모드 매개 변수가 설정 Clamp 되고 전달된 DrawImage 원본 사각형이 이미지 자체보다 큰 경우 이 색이 표시됩니다.
예제
코드 예제는 메서드를 참조하세요 SetWrapMode(WrapMode) .
적용 대상
SetWrapMode(WrapMode, Color, Boolean)
- Source:
- ImageAttributes.cs
- Source:
- ImageAttributes.cs
- Source:
- ImageAttributes.cs
- Source:
- ImageAttributes.cs
- Source:
- ImageAttributes.cs
- Source:
- ImageAttributes.cs
- Source:
- ImageAttributes.cs
- Source:
- ImageAttributes.cs
셰이프 또는 셰이프 경계에서 질감을 타일하는 방법을 결정하는 데 사용되는 래핑 모드 및 색을 설정합니다. 질감이 채우는 셰이프보다 작을 때 채우기 위해 셰이프에 바일링됩니다.
public:
void SetWrapMode(System::Drawing::Drawing2D::WrapMode mode, System::Drawing::Color color, bool clamp);
public void SetWrapMode(System.Drawing.Drawing2D.WrapMode mode, System.Drawing.Color color, bool clamp);
member this.SetWrapMode : System.Drawing.Drawing2D.WrapMode * System.Drawing.Color * bool -> unit
Public Sub SetWrapMode (mode As WrapMode, color As Color, clamp As Boolean)
매개 변수
- color
- Color
렌더링된 이미지 외부의 픽셀 색을 지정하는 색 개체입니다. 모드 매개 변수가 설정 Clamp 되고 전달된 DrawImage 원본 사각형이 이미지 자체보다 큰 경우 이 색이 표시됩니다.
- clamp
- Boolean
이 매개 변수는 효과가 없습니다.
false로 설정합니다.
예제
코드 예제는 메서드를 참조하세요 SetWrapMode(WrapMode) .