输出文本和画线已通过下面方式实现
''' <summary>
''' DrawLineを設定します。
''' </summary>
Sub DrawLine(intA As Integer, intB As Integer, intC As Integer, intD As Integer)
Dim ra1 As New RenderArea()
ra1.X = 0
ra1.Y = 0
Dim rpoly1 As New RenderPolygon()
rpoly1.Line.Points = New UnitPoint() { _
New UnitPoint(intA, intB), _
New UnitPoint(intC, intD)
}
'rpoly1.Line.Closed = True
'' 塗りつぶし色を設定
'rpoly1.Style.ShapeFillColor = Color.Gainsboro
'' パディングを設定
'rpoly1.Style.Padding.All = "0.5cm"
'rpoly1.Style.BackColor = Color.Cornsilk
ra1.Children.Add(rpoly1)
_Document.Outlines.Add("RenderPolygon", rpoly1)
' 最後にドキュメントに外側のRenderAreaを追加します。
_Document.Body.Children.Add(ra1)
End Sub
''' <summary>
''' CtlTextを取得または設定します。
''' </summary>
Property CtlText As String
Get
Return MyBase.StatusText
End Get
Set(value As String)
Dim rt As RenderText = New RenderText
rt.Style.Font = Me.Font
rt.X = _CurrentX
rt.Y = _CurrentY
'rt.SplitVertBehavior = SplitBehaviorEnum.Never
'rt.Height = Unit.Auto
'rt.Width = Unit.Auto
'rt.Style.Borders.All = LineDef.Empty
'rt.Style.TextAngle = 0
rt.Text = value
_Document.Body.Children.Add(rt)
End Set
End Property |