新手关于GDI+画心电图的显示问题
以下是我显示出4S心电数据图的代码
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.Net;
using System.Net.Sockets;
using System.IO;
using System.Threading;
using System.Globalization;
using Server;
using ZedGraph;
namespace Server
{
public partial class Pic : Form
{
public Pic()
{
InitializeComponent();
//this.Size = new System.Drawing.Size(700,500);
this.AutoScrollMinSize = new Size(700, 500);//设置自动滚动的最小尺寸
}
public string OpenFilePath;
private void Pic_Load(object sender, EventArgs e)
{
// panel1.Width = 900;
// panel1.Height =500;
pictureBox1.Width =1440;
pictureBox1.Height =600;
// pictureBox1.Location = new Point(0, 0);
}
private void button1_Click(object sender, EventArgs e)
{
Graphics g = pictureBox1.CreateGraphics();
g.ScaleTransform(1.0f,-1.0f); //翻转函数(所有 Y轴的方面 记得 加负号)
Pen pen = new Pen(Color.Red);
byte[] rdata = new byte[2048];//设置2k的读取缓冲区
Stream stream = File.OpenRead(OpenFilePath);//流文件实例
BinaryReader bread = new BinaryReader(stream);//读取文件
bread.Read(rdata, 0, 1440);//读出的是10进制数据
bread.Close();
PointF[] pY = new PointF[1440];
PointF[] pL = new PointF[1440];
PointF pt;
&