MESCIUS SPREAD for Windows Forms 15.0J
Picture コンストラクタ(Image,RenderStyle,Color,Int32)
使用例 

Imageオブジェクト

RenderStyle設定

透過色を含むColorオブジェクト
透過許容誤差
指定した画像、スタイル、透過色、透過許容誤差を持つピクチャを作成します。
構文
'宣言
 
Public Function New( _
   ByVal i As Image, _
   ByVal style As RenderStyle, _
   ByVal transparencyColor As Color, _
   ByVal transparencyTolerance As Integer _
)

パラメータ

i
Imageオブジェクト
style

RenderStyle設定

transparencyColor
透過色を含むColorオブジェクト
transparencyTolerance
透過許容誤差
使用例
次のサンプルコードは、ダイアログの左上にピクチャを描画します。
private void DrawPicture(System.Windows.Forms.PaintEventArgs e)
{
Graphics g = e.Graphics;
FarPoint.Win.Picture p = new FarPoint.Win.Picture(Image.FromFile("d:\\earth.ico"), RenderStyle.Normal, Color.White, 50);
g.DrawImage(p.Image, 20, 20);
}
Private Sub DrawPicture(ByVal e As PaintEventArgs)
Dim g As Graphics = e.Graphics
Dim p As New FarPoint.Win.Picture(Image.FromFile("d:\earth.ico"), RenderStyle.Normal, Color.White, 50)
g.DrawImage(p.Image, 20, 20)
End Sub
参照

Picture クラス
Picture メンバ
オーバーロード一覧

 

 


© MESCIUS inc. All rights reserved.