TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Suman Raj
NA
287
13.5k
Create Isocandella according to gridsize in picturebox
Nov 4 2018 11:53 PM
//Initial
private double[,] HaloData = { { 1, 1 }, { 1, 2 }, { 1, 3 } };//2 dimensional array
private Size size = new Size(800, 200);
Graphics g;
Bitmap graph;
public Isocandella()
{
InitializeComponent();
pictureBoxIsocandella.Image = new Bitmap(pictureBoxIsocandella.Width, pictureBoxIsocandella.Height);
g = Graphics.FromImage(pictureBoxIsocandella.Image);
}
public image(double[,] data)
{
this.HaloData = data;
this.FunctionName =Function;
}
//load
private void Isocandella_Load(object sender, EventArgs e)
{
DrawHalo(min, max);
DrawGrid();
}
private void DrawGrid()
{
Pen linePen = new Pen(System.Drawing.Color.CornflowerBlue);
g.Clear(this.BackColor);
for (int i = 1; i < 21; i++)
{
//Draw verticle line
g.DrawLine(linePen,
(this.ClientSize.Width / 20) * i,
0,
(this.ClientSize.Width / 20) * i,
this.ClientSize.Height);
//Draw horizontal line
g.DrawLine(linePen,
0,
(this.ClientSize.Height / 10) * i,
this.ClientSize.Width,
(this.ClientSize.Height / 10) * i);
}
linePen.Dispose();
}
private void DrawHalo(double min, double max)
{
ColorScale cs = new ColorScale(min, max);
for (int i = 0; i < 3; i++)//how to give array row and coloumn size after < get automatically
{
for (int j = 0; j < 3; j++)
{
Color c = cs.getColor(HaloData[i,j]);
graph.SetPixel((int)HaloData[i,0],(int)HaloData[j,0],Color.Purple);
}
}
}
Solve this for me
Reply
Answers (
0
)
how to save image in database in binary format using ajax
Difference between strlen() and sizeof() for string in C ?