K
Ken Beauchesne
I have bitmap that is 248 x 175 and contains an image, I want
to scroll the left most 240 by ten pixels , clear pixels 230-240 and update
a new image in the rightmost 10 pixels then display the updated bitmap.
I have tried a bunch of things and what happens is the CF does not
have an unscaled version of draw image and what happens is the
size between images appears to be scaled, this is what I have done.
Paper has a bunch of vertical lines spaced by 10 pixels I want to scroll by
10 and draw a new line, but the new drawn lines are much greater that 10
pixels
apart.
Bitmap Paper = new Bitmap(248,175)
Graphics globalPaper = Graphics.FromImage(Paper);
Bitmap Bm = new Bitmap(240,175)
Graphics Gp = Graphics.FromImage(Bm);
Rectangle Rt1 = new Rectangle(0,0,230,175);
Rectangle Rt = new Rectangle(10,0,240,175);
Gp.Clear(Color.WhiteSmoke);
Gp.DrawImage(Paper,0,0,Rt,GraphicsUnit.Pixel); // move 10 thru 240
globalPaper.Clear(Color.WhiteSmoke); // clear
the orig
globalPaper.DrawImage(Bm,0,0,rt1,GraphicsUnit.Pixel); // update the
bitmap
globalPaper.DrawLine(pen, 230, 0 , 230 , 175);
in the onPaint it displays to the screen
anyone have a clue of what to do
thanks
Ken B
to scroll the left most 240 by ten pixels , clear pixels 230-240 and update
a new image in the rightmost 10 pixels then display the updated bitmap.
I have tried a bunch of things and what happens is the CF does not
have an unscaled version of draw image and what happens is the
size between images appears to be scaled, this is what I have done.
Paper has a bunch of vertical lines spaced by 10 pixels I want to scroll by
10 and draw a new line, but the new drawn lines are much greater that 10
pixels
apart.
Bitmap Paper = new Bitmap(248,175)
Graphics globalPaper = Graphics.FromImage(Paper);
Bitmap Bm = new Bitmap(240,175)
Graphics Gp = Graphics.FromImage(Bm);
Rectangle Rt1 = new Rectangle(0,0,230,175);
Rectangle Rt = new Rectangle(10,0,240,175);
Gp.Clear(Color.WhiteSmoke);
Gp.DrawImage(Paper,0,0,Rt,GraphicsUnit.Pixel); // move 10 thru 240
globalPaper.Clear(Color.WhiteSmoke); // clear
the orig
globalPaper.DrawImage(Bm,0,0,rt1,GraphicsUnit.Pixel); // update the
bitmap
globalPaper.DrawLine(pen, 230, 0 , 230 , 175);
in the onPaint it displays to the screen
anyone have a clue of what to do
thanks
Ken B