(在线等)用Graphics画了两个图,显示的时候有一个被遮盖,拜求!!!
代码如下:
Dim bm As Bitmap
bm = New Bitmap(600, 250)
Dim i As Integer
i = 5
Dim gph As Graphics
gph = Graphics.FromImage(bm)
gph.Clear(Color.Snow)
gph.DrawString(" ××公司××器件2002年度销售情况一览表", New Font("宋体", 16), Brushes.Black, 5, 5)
gph.DrawRectangle(Pens.Black, 1, 1, 598, 248)
Dim myrec As New Point(535, 30)
Dim myDec As New Point(560, 26)
gph.DrawRectangle(Pens.Black, myrec.X, myrec.Y, 20, 10)
GetColor(i)
gph.FillRectangle(New SolidBrush(mycolor), myrec.X, myrec.Y, 20, 10)
myrec.Y += 15
myDec.Y += 15
'bm.Save(Response.OutputStream, ImageFormat.Jpeg)
gph.Dispose()
Dim bp As New Bitmap(600, 300)
Dim gp As Graphics
gp = Graphics.FromImage(bp)
gp.Clear(Color.Snow)
gp.DrawPie(Pens.Red, 50, 50, 150, 150, 0, 30)
gp.DrawPie(Pens.Black, 50, 50, 150, 150, 30, 60)
gp.FillPie(New SolidBrush(Color.Blue), 50, 50, 150, 150, 0, 30)
gp.FillPie(New SolidBrush(Color.Yellow), 50, 50, 150, 150, 30, 60)
bp.Save(Response.OutputStream, ImageFormat.Jpeg)
gp.Dispose()
=========================================
只能看到第一个被保存的图片,
请问有什么办法可以解决吗?
实在不行就只有保存到硬盘上再用表格显示图片了...
-------------
各位大虾,谢了啊!