DesignerGlyph.OnPaint 메서드

정의

파생 클래스에서 재정의된 경우 활동 디자이너 화면에 문자 모양을 렌더링하는 데 필요한 작업을 수행합니다.

protected:
 abstract void OnPaint(System::Drawing::Graphics ^ graphics, bool activated, System::Workflow::ComponentModel::Design::AmbientTheme ^ ambientTheme, System::Workflow::ComponentModel::Design::ActivityDesigner ^ designer);
protected abstract void OnPaint (System.Drawing.Graphics graphics, bool activated, System.Workflow.ComponentModel.Design.AmbientTheme ambientTheme, System.Workflow.ComponentModel.Design.ActivityDesigner designer);
abstract member OnPaint : System.Drawing.Graphics * bool * System.Workflow.ComponentModel.Design.AmbientTheme * System.Workflow.ComponentModel.Design.ActivityDesigner -> unit
Protected MustOverride Sub OnPaint (graphics As Graphics, activated As Boolean, ambientTheme As AmbientTheme, designer As ActivityDesigner)

매개 변수

graphics
Graphics

채우기 및 그리기 작업을 수행할 Graphics입니다.

activated
Boolean

문자 모양이 디자인 화면에 표시되면 true이고, 그렇지 않을 경우에는 false입니다.

ambientTheme
AmbientTheme

앰비언트 속성 설정에 액세스할 때 사용할 AmbientTheme입니다.

designer
ActivityDesigner

사용자 작업에 대한 정보를 가져올 ActivityDesigner입니다.

예제

다음 코드 예제에서는 OnPaint 메서드를 재정의하는 방법을 보여 줍니다. 코드는 문자 모양이 연결되는 Activity Designer에 문자 모양 개체를 그리는 방법을 사용자 지정합니다.

이 코드 예제는 DesignerGlyphProvider.cs 파일에 있는 Workflow Monitor SDK 샘플의 일부입니다. 자세한 내용은 워크플로 모니터합니다.

protected override void OnPaint(Graphics graphics, bool activated, AmbientTheme ambientTheme, ActivityDesigner designer)
{
    Bitmap bitmap = Resources.Executing;
    bitmap.MakeTransparent(Color.FromArgb(0, 255, 255));
    if (bitmap != null)
        graphics.DrawImage(bitmap, GetBounds(designer, activated), new Rectangle(Point.Empty, bitmap.Size), GraphicsUnit.Pixel);
}
Protected Overrides Sub OnPaint(ByVal graphics As System.Drawing.Graphics, ByVal activated As Boolean, ByVal ambientTheme As System.Workflow.ComponentModel.Design.AmbientTheme, ByVal designer As System.Workflow.ComponentModel.Design.ActivityDesigner)
    Dim bitmap As Bitmap = AppResources.Executing
    bitmap.MakeTransparent(Color.FromArgb(0, 255, 255))

    If Not bitmap Is Nothing Then
        graphics.DrawImage(bitmap, GetBounds(designer, activated), New Rectangle(Point.Empty, bitmap.Size), GraphicsUnit.Pixel)
    End If
End Sub

설명

OnPaintCommentIndicatorPen을 사용하여 채울 주석 문자 모양 및 CommentIndicatorBrush의 경계를 그립니다.

적용 대상

추가 정보