Click here to Skip to main content
15,896,207 members
Home / Discussions / C#
   

C#

 
AnswerRe: Static KeyWord Pin
N a v a n e e t h5-Apr-09 22:04
N a v a n e e t h5-Apr-09 22:04 
QuestionDataGridView updating datasource problem Pin
half-life5-Apr-09 21:24
half-life5-Apr-09 21:24 
AnswerRe: DataGridView updating datasource problem Pin
Greg Chelstowski5-Apr-09 22:07
Greg Chelstowski5-Apr-09 22:07 
GeneralRe: DataGridView updating datasource problem Pin
half-life5-Apr-09 22:25
half-life5-Apr-09 22:25 
GeneralRe: DataGridView updating datasource problem Pin
Henry Minute6-Apr-09 1:57
Henry Minute6-Apr-09 1:57 
GeneralRe: DataGridView updating datasource problem Pin
half-life6-Apr-09 2:03
half-life6-Apr-09 2:03 
GeneralRe: DataGridView updating datasource problem Pin
Henry Minute6-Apr-09 2:08
Henry Minute6-Apr-09 2:08 
QuestionSizing issue with rotate Graphic Pin
FrankeyJames5-Apr-09 20:22
FrankeyJames5-Apr-09 20:22 
Okay, I thought this should be for a new thread....


I have an existing image.


originalImage = new Bitmap(path.ToString());

Bitmap newImage = new Bitmap(originalImage.Width, originalImage.Height);
g = Graphics.FromImage(newImage);

Matrix matrix = new Matrix();
matrix.Rotate(10f);

g.TranslateTransform( ((float)originalImage.Width) / 2,  ((float)originalImage.Height) / 2);
g.RotateTransform(10f);
g.TranslateTransform(-((float)originalImage.Width) / 2, -((float)originalImage.Height) / 2);


g.DrawImage(originalImage, 0, 0);


This works just as I want it to in terms of rotating on an axis in the center of a picture instead of 0,0 (x,y)coords. However, say my original picture is (wXh) 473x640 and when resized 10f I know it's supposed to be 577x712 or so. The reason it's bigger is that when the picture is rotated, say, angle of 10, the top left corner is no longer within the original dimension of the image and therefore apear cut off. I do not want this. I want the image to resize as needed to fit the entire contents of a rotated image.

Any idears? Setting the g.DrawImage and setting the width height, even to the known values needed, just exands the image is the Graphics object, so it appears, already lopped off parts of my image to stay within the initial constraints. I don't know how to mkae the Graphic larger bigger without affecting the Bitmap it initially used....


If there are any good sources for .net graphics that'd be great. I can't find an examples in dr. google and my pro c# book doens't have any such examples.
AnswerRe: Sizing issue with rotate Graphic Pin
Christian Graus5-Apr-09 20:29
protectorChristian Graus5-Apr-09 20:29 
GeneralRe: Sizing issue with rotate Graphic Pin
FrankeyJames5-Apr-09 20:57
FrankeyJames5-Apr-09 20:57 
GeneralRe: Sizing issue with rotate Graphic Pin
Christian Graus5-Apr-09 21:07
protectorChristian Graus5-Apr-09 21:07 
GeneralRe: Sizing issue with rotate Graphic Pin
FrankeyJames5-Apr-09 21:19
FrankeyJames5-Apr-09 21:19 
GeneralRe: Sizing issue with rotate Graphic Pin
Luc Pattyn6-Apr-09 3:14
sitebuilderLuc Pattyn6-Apr-09 3:14 
QuestionHow to Execute C# / SQL statement in outlook Pin
dabuskol5-Apr-09 20:14
dabuskol5-Apr-09 20:14 
AnswerRe: How to Execute C# / SQL statement in outlook Pin
Christian Graus5-Apr-09 20:21
protectorChristian Graus5-Apr-09 20:21 
QuestionHow to make FTP Pin
E_Gold5-Apr-09 19:56
E_Gold5-Apr-09 19:56 
AnswerRe: How to make FTP Pin
Rajdeep.NET is BACK5-Apr-09 20:03
Rajdeep.NET is BACK5-Apr-09 20:03 
GeneralRe: How to make FTP Pin
stancrm5-Apr-09 21:03
stancrm5-Apr-09 21:03 
QuestionHow to preserve file attributes Pin
sumit70345-Apr-09 19:51
sumit70345-Apr-09 19:51 
AnswerRe: How to preserve file attributes Pin
stancrm5-Apr-09 21:04
stancrm5-Apr-09 21:04 
QuestionHiding a process....help guys! Pin
Rajdeep.NET is BACK5-Apr-09 19:45
Rajdeep.NET is BACK5-Apr-09 19:45 
AnswerRe: Hiding a process....help guys! Pin
King Julien5-Apr-09 20:19
King Julien5-Apr-09 20:19 
GeneralRe: Hiding a process....help guys! Pin
Christian Graus5-Apr-09 20:30
protectorChristian Graus5-Apr-09 20:30 
GeneralRe: Hiding a process....help guys! Pin
King Julien5-Apr-09 20:48
King Julien5-Apr-09 20:48 
GeneralRe: Hiding a process....help guys! Pin
Rajdeep.NET is BACK5-Apr-09 21:36
Rajdeep.NET is BACK5-Apr-09 21:36 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.