RegionData.Data プロパティとは? わかりやすく解説

Weblio 辞書 > コンピュータ > .NET Framework クラス ライブラリ リファレンス > RegionData.Data プロパティの意味・解説 

RegionData.Data プロパティ

Region オブジェクト指定するバイト配列取得または設定します

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

使用例使用例
Private Sub DemonstrateRegionData2(ByVal
 e As PaintEventArgs)

    'Create a simple region.
    Dim region1 As New Region(New
 Rectangle(10, 10, 100, 100))

    ' Extract the region data.
    Dim region1Data As System.Drawing.Drawing2D.RegionData
 = region1.GetRegionData
    Dim data1() As Byte
    data1 = region1Data.Data

    ' Create a second region.
    Dim region2 As New Region

    ' Get the region data for the second region.
    Dim region2Data As System.Drawing.Drawing2D.RegionData
 = region2.GetRegionData()

    ' Set the Data property for the second region to the Data from the
 first region.
    region2Data.Data = data1

    ' Construct a third region using the modified RegionData of the
 second region.
    Dim region3 As New Region(region2Data)

    ' Dispose of the first and second regions.
    region1.Dispose()
    region1.Dispose()

    ' Call ExcludeClip passing in the third region.
    e.Graphics.ExcludeClip(region3)

    ' Fill in the client rectangle.
    e.Graphics.FillRectangle(Brushes.Red, Me.ClientRectangle)

    region3.Dispose()

End Sub
private void DemonstrateRegionData2(PaintEventArgs
 e)
{

    //Create a simple region.
    Region region1 = new Region(new Rectangle(10,
 10, 100, 100));

    // Extract the region data.
    System.Drawing.Drawing2D.RegionData region1Data = region1.GetRegionData();
    byte[] data1;
    data1 = region1Data.Data;

    // Create a second region.
    Region region2 = new Region();

    // Get the region data for the second region.
    System.Drawing.Drawing2D.RegionData region2Data = region2.GetRegionData();

    // Set the Data property for the second region to the Data from
 the first region.
    region2Data.Data = data1;

    // Construct a third region using the modified RegionData of the
 second region.
    Region region3 = new Region(region2Data);

    // Dispose of the first and second regions.
    region1.Dispose();
    region1.Dispose();

    // Call ExcludeClip passing in the third region.
    e.Graphics.ExcludeClip(region3);

    // Fill in the client rectangle.
    e.Graphics.FillRectangle(Brushes.Red, this.ClientRectangle);

    region3.Dispose();

}
private:
   void DemonstrateRegionData2( PaintEventArgs^ e )
   {
      //Create a simple region.
      System::Drawing::Region^ region1 = gcnew System::Drawing::Region( Rectangle(10,10,100,100)
 );

      // Extract the region data.
      System::Drawing::Drawing2D::RegionData^ region1Data = region1->GetRegionData();
      array<Byte>^data1;
      data1 = region1Data->Data;

      // Create a second region.
      System::Drawing::Region^ region2 = gcnew System::Drawing::Region;

      // Get the region data for the second region.
      System::Drawing::Drawing2D::RegionData^ region2Data = region2->GetRegionData();

      // Set the Data property for the second region to the Data from
 the first region.
      region2Data->Data = data1;

      // Construct a third region using the modified RegionData of the
 second region.
      System::Drawing::Region^ region3 = gcnew System::Drawing::Region( region2Data
 );

      // Dispose of the first and second regions.
      delete region1;
      delete region2;

      // Call ExcludeClip passing in the third region.
      e->Graphics->ExcludeClip( region3 );

      // Fill in the client rectangle.
      e->Graphics->FillRectangle( Brushes::Red, this->ClientRectangle
 );
      delete region3;
   }
private void DemonstrateRegionData2(PaintEventArgs
 e)
{
    //Create a simple region.
    Region region1 = new Region(new Rectangle(10,
 10, 100, 100));

    // Extract the region data.
    System.Drawing.Drawing2D.RegionData region1Data = 
        region1.GetRegionData();
    ubyte data1[];

    data1 = region1Data.get_Data();

    // Create a second region.
    Region region2 = new Region();

    // Get the region data for the second region.
    System.Drawing.Drawing2D.RegionData region2Data = 
        region2.GetRegionData();

    // Set the Data property for the second region to the Data 
    // from the first region.
    region2Data.set_Data(data1);

    // Construct a third region using the modified RegionData 
    // of the second region.
    Region region3 = new Region(region2Data);

    // Dispose of the first and second regions.
    region1.Dispose();
    region1.Dispose();

    // Call ExcludeClip passing in the third region.
    e.get_Graphics().ExcludeClip(region3);

    // Fill in the client rectangle.
    e.get_Graphics().FillRectangle(Brushes.get_Red(), 
        this.get_ClientRectangle());
    region3.Dispose();
} //DemonstrateRegionData2
プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照
関連項目
RegionData クラス
RegionData メンバ
System.Drawing.Drawing2D 名前空間


このページでは「.NET Framework クラス ライブラリ リファレンス」からRegionData.Data プロパティを検索した結果を表示しています。
Weblioに収録されているすべての辞書からRegionData.Data プロパティを検索する場合は、下記のリンクをクリックしてください。
 全ての辞書からRegionData.Data プロパティ を検索

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

辞書ショートカット

すべての辞書の索引

RegionData.Data プロパティのお隣キーワード
検索ランキング

   

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



RegionData.Data プロパティのページの著作権
Weblio 辞書 情報提供元は 参加元一覧 にて確認できます。

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

©2025 GRAS Group, Inc.RSS