Object Report
	Version='5.0.0.0'
	Title='你的报表标题'
	Object Font
		Name='宋体'
		Size=105000,0
		Weight=400
		Charset=134
	End
	Object Printer
		Oriention=Landscape
	End
	Items Parameter
		Item
			Name='Comment'
			Value='演示部件框的自定义绘制功能\r\n\r\n将部件框的“自绘”属性设为“是”，部件框将成为自绘部件框，其绘制输出将用用户自己通过调用 IGRGraphics 接口的方法来实现。绘制实现有两种方式；其一是在部件框的“绘制脚本”中写报表脚本实现；其二是响应报表的“ControlCustomDraw”事件写程序代码实现。\r\n\r\n调用部件框的“DrawDefault”方法可以将其本身绘出。\r\n'
		End
	End
	Items Section
		Item
			Type=ReportHeader
			Name='ReportHeader1'
			BackColor=White
			Height=8.81062
			Items Control
				Item
					Type=StaticBox
					Name='StaticBox1'
					BackColor=Window
					Left=0.608542
					Top=0.211667
					Width=5.82083
					Height=1.19063
					WordWrap=T
					Text='下面图案通过报表脚本代码绘出，在预览视图或查询视图可以看到运行结果：'
				End
				Item
					Type=StaticBox
					Name='sbScriptDraw'
					BackColor=Window
					BorderStyles=[DrawLeft|DrawTop|DrawRight|DrawBottom]
					Left=0.608542
					Top=1.5875
					Width=5.79438
					Height=3.59833
					CustomDraw=T
					CustomDrawScript='function GetColorValue(r,g,b)\r\n{\r\n   return r + g*256 + b*256*256;\r\n}\r\n\r\nvar Graphics = Report.Graphics;\r\n\r\nvar x = Graphics.Left;\r\nvar y = Graphics.Top;\r\nvar width = Graphics.Width;\r\nvar height = Graphics.Height;\r\n\r\nvar PartSize = height/3;\r\nvar DrawLeft = x + (width - PartSize)/2;\r\nvar DrawRight = DrawLeft + PartSize;\r\nvar DrawXCenter = (DrawLeft + DrawRight)/2;\r\n\r\nvar DrawTop = y;\r\nvar DrawBottom = y + height;\r\n\r\n//设定绘出线型\r\nGraphics.SelectPen(2, GetColorValue(255, 0, 0), 0/*grpsSolid*/);\r\n\r\n//设定填充色\r\nGraphics.SelectFillColor( GetColorValue(0, 255, 255) );\r\n\r\n//画箭头两边斜线\r\nGraphics.MoveTo(DrawLeft, DrawTop+PartSize);\r\nGraphics.LineTo(DrawXCenter, DrawTop);\r\nGraphics.LineTo(DrawRight, DrawTop+PartSize);\r\n\r\n//画箭头竖线\r\nGraphics.MoveTo(DrawXCenter, DrawTop);\r\nGraphics.LineTo(DrawXCenter, DrawTop+PartSize*2);\r\n\r\n//画出圆圈\r\nGraphics.Ellipse(DrawLeft, DrawTop+PartSize*2, PartSize, PartSize, true);\r\n\r\n//恢复填充色设定，SelectFillColor调用之后，必须对应调用RestoreFillColor\r\nGraphics.RestoreFillColor();\r\n\r\n//恢复绘出线型设定，SelectPen调用之后，必须对应调用RestorePen\r\nGraphics.RestorePen();\r\n'
					Text='StaticBox2'
				End
				Item
					Type=StaticBox
					Name='StaticBox3'
					BackColor=Window
					Left=14.8167
					Top=0.238125
					Width=5.79438
					Height=1.19063
					WordWrap=T
					Text='下面图案通过报表的自绘事件在程序代码中实现，运行例子“Advance\\CustomDraw”查看运行结果：'
				End
				Item
					Type=StaticBox
					Name='sbEventDraw'
					BackColor=Window
					BorderStyles=[DrawLeft|DrawTop|DrawRight|DrawBottom]
					Left=14.8167
					Top=1.61396
					Width=5.79438
					Height=3.59833
					CustomDraw=T
					Text='StaticBox2'
				End
				Item
					Type=StaticBox
					Name='StaticBox4'
					BackColor=Window
					Left=7.77875
					Top=0.185208
					Width=5.82083
					Height=1.19063
					WordWrap=T
					Text='调用部件框的"DrawDefault"方法进行默认绘制，然后再输出一个椭圆：'
				End
				Item
					Type=StaticBox
					Name='StaticBox5'
					BackColor=Window
					Object Font
						Name='宋体'
						Size=157500,0
						Bold=T
						Charset=134
					End
					Left=7.77875
					Top=1.56104
					Width=5.79438
					Height=3.59833
					CustomDraw=T
					CustomDrawScript='function GetColorValue(r,g,b)\r\n{\r\n   return r + g*256 + b*256*256;\r\n}\r\n\r\n//默认绘制\r\nSender.DrawDefault();\r\n\r\nvar Graphics = Report.Graphics;\r\n\r\nvar x = Graphics.Left;\r\nvar y = Graphics.Top;\r\nvar width = Graphics.Width;\r\nvar height = Graphics.Height;\r\n\r\n//设定绘出线型\r\nGraphics.SelectPen(2, GetColorValue(255, 0, 0), 0/*grpsSolid*/);\r\n\r\n//画出圆圈\r\nGraphics.Ellipse(x, y, width , height, false);\r\n\r\n//恢复绘出线型设定，SelectPen调用之后，必须对应调用RestorePen\r\nGraphics.RestorePen();\r\n'
					TextAlign=MiddleCenter
					Text='默认绘制文字'
				End
			End
		End
	End
End
