Click here to Skip to main content
15,902,189 members
Home / Discussions / Graphics
   

Graphics

 
GeneralRe: openGL SwapBuffers Pin
Nishad S14-Jan-09 17:41
Nishad S14-Jan-09 17:41 
GeneralRe: openGL SwapBuffers Pin
Dan14-Jan-09 20:40
Dan14-Jan-09 20:40 
GeneralRe: openGL SwapBuffers Pin
Nishad S14-Jan-09 21:03
Nishad S14-Jan-09 21:03 
GeneralRe: openGL SwapBuffers Pin
Nishad S14-Jan-09 23:49
Nishad S14-Jan-09 23:49 
GeneralRe: openGL SwapBuffers Pin
Dan15-Jan-09 9:27
Dan15-Jan-09 9:27 
GeneralRe: openGL SwapBuffers Pin
Nishad S18-Jan-09 17:24
Nishad S18-Jan-09 17:24 
QuestionHaving trouble with transformations [Christian Graus please save me] Pin
gantww12-Jan-09 16:35
gantww12-Jan-09 16:35 
GeneralRe: Having trouble with transformations [Christian Graus please save me] Pin
Luc Pattyn12-Jan-09 18:39
sitebuilderLuc Pattyn12-Jan-09 18:39 
Hi,

you would need one or more of the transform methods in the Graphics class.
Graphics.TranslateTransform does translation, such as moving the origin to the center;
Graphics.ScaleTransform does scaling, and if you use a negative number you are actually flipping the drawing;
Graphics.RotateTransform does rotations, which you don't seem to need.

I trust all of these internally construct a single 3*3 transformation matrix which then gets applied
to all the drawing methods called thereafter.

When you would use more than one of the above, you can choose the order; first scale, then translate,
or first translate, then scale can be made to result in exactly the same, but it would require different parameter values since the first transformation gets applied to the parameters of the second translation.

You can also calculate the entire transformation matrix yourself and just use Graphics.Matrix

Hint: initially you will probably make mistakes in the polarity and magnitude of the transformation parameters, sending your points way outside your plotting area, hence I suggest you start with a very small drawing in a big surface, improving the chance you do see something. You then can fix whatever needs fixing step by step.

Smile | :)

Luc Pattyn [Forum Guidelines] [My Articles]

I use ListBoxes for line-oriented text, and PictureBoxes for pictures, not drawings.


GeneralRe: Having trouble with transformations [Christian Graus please save me] Pin
Mark Churchill13-Jan-09 17:46
Mark Churchill13-Jan-09 17:46 
GeneralRe: Having trouble with transformations [Christian Graus please save me] Pin
Luc Pattyn13-Jan-09 18:08
sitebuilderLuc Pattyn13-Jan-09 18:08 
GeneralRe: Having trouble with transformations [Christian Graus please save me] Pin
gantww29-Jan-09 11:14
gantww29-Jan-09 11:14 
GeneralRe: Having trouble with transformations [Christian Graus please save me] Pin
Luc Pattyn29-Jan-09 11:30
sitebuilderLuc Pattyn29-Jan-09 11:30 
QuestionOpenGL Bitmap fonts not being displayed on some hardware Pin
McDave12-Jan-09 13:16
McDave12-Jan-09 13:16 
AnswerRe: OpenGL Bitmap fonts not being displayed on some hardware Pin
McDave13-Jan-09 0:13
McDave13-Jan-09 0:13 
QuestionProblem in GDI+ Pin
vinay_K12-Jan-09 2:04
vinay_K12-Jan-09 2:04 
AnswerRe: Problem in GDI+ Pin
Henry Minute12-Jan-09 2:16
Henry Minute12-Jan-09 2:16 
QuestionGDI+ refresh image (C++) Pin
Valdyr11-Jan-09 9:14
Valdyr11-Jan-09 9:14 
AnswerRe: GDI+ refresh image (C++) Pin
Tim Craig11-Jan-09 17:03
Tim Craig11-Jan-09 17:03 
GeneralRe: GDI+ refresh image (C++) [modified] Pin
Valdyr11-Jan-09 23:25
Valdyr11-Jan-09 23:25 
GeneralRe: GDI+ refresh image (C++) Pin
Tim Craig12-Jan-09 9:53
Tim Craig12-Jan-09 9:53 
GeneralRe: GDI+ refresh image (C++) Pin
Valdyr12-Jan-09 13:46
Valdyr12-Jan-09 13:46 
QuestionRe: GDI+ refresh image (C++) [modified] Pin
Valdyr13-Jan-09 1:46
Valdyr13-Jan-09 1:46 
AnswerRe: GDI+ refresh image (C++) Pin
Mark Salsbery13-Jan-09 6:38
Mark Salsbery13-Jan-09 6:38 
GeneralRe: GDI+ refresh image (C++) Pin
Valdyr13-Jan-09 9:07
Valdyr13-Jan-09 9:07 
GeneralRe: GDI+ refresh image (C++) Pin
Mark Salsbery13-Jan-09 9:27
Mark Salsbery13-Jan-09 9:27 

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.